Snaxe: Hour 4

Submitted by davidc on Wed, 14/09/2011 - 00:58

Okay kid, this is where it gets complicated. Since this is just a throwaway prototype, I'm going to bend a lot of rules from now on to speed things up. For example, the game logic was originally completely encapsulated (in fact I had the full game simulated 'in memory' before writing a single line of graphical code). But now to save some time, I'm going to mix a lot of the presentation logic into those same classes, and do the nasty with member variable visibility. So if you're reading this after I've released the source code, bear in mind that davidc is a naughty boy, but he had a legitimate excuse.

I didn't have a lot of time today, what with a trip to Poland and other work, so there's only been an hour of progress. Here's what's changed this hour:

Powerups now cause a brief animation of the score gain above the snake's head. "Game over" is now declared when only one snake is left alive. After 30 seconds, the game now speeds up every 10 seconds by 5% - but only if one snake is ahead of the others (the idea being that this will help prevent ties).

Most of the rest of the hour was spent upgrading my event management and interpolation library classes from being JME3-specific. I despise having to deal with three kinds of Color and five kinds of Vector3f all over the place...

I took a lot of notes today though, and brainstormed a little with a friend on the train, so here are some thoughts about features that could help make this more unique than a bog-standard Snake/Tron game.

  • Eight degrees of movement instead of four. Or possibly three-hundred-and-sixty, though this would probably require a complete rewrite.
  • As well as skulls, bombs that blow up an area around them (possibly killing other players) if someone hits them.
  • Rabbits that jump around and don't just sit there waiting to be eaten.
  • A "super-fun speedy time" where the game gives a countdown and then goes into a super-fast mode for a few seconds. Though I worry about the latency of the mobile phone control.
  • A power-up that makes you invulnerable/transparent for a time, letting you walk through anything (possibly including the level's edges), but if any part of your body is over an obstacle when it wears off, you die.
  • A power-up that makes you speedy for a time.
  • Making the level scroll around when the position of all snakes allows it. So if everyone is in the bottom left, the walls could shift that way. Coop mode anyone?
  • AI-controlled snakes of various possible personalities.
  • Radioactivity: if you are radioactive, you gradually lose score over time. And anyone within a couple of squares of you also becomes radioactive. There would be an antidote on the field, but only one at a time, so there'd be a rush for it.
  • Bezier curves to form deliciously smooth snakes, particular if using fluid movement. But that might take away from the retro feel.
  • Floating text on powerups (done).
  • Countdown before starting the level - since people will have to look at the projector to play, they'll need a few seconds to familiarise themselves with the controls on their phone.
  • Ensure start positions/directions are guaranteed 'safe' for a couple of moves, for the same reason.
  • No 'evil' powerups (skulls etc) for the first 30 seconds, for the same reason.
  • Have the movement buttons on the edge of the phone screen, so you don't have to look at the phone to make sure you're touching one (damn these newfangled non-tactile screens!)
  • Start the level with a quick flash through of everyone's name and their snake, sequentially, to make it clear which snake you are.

Some or none of these may get added.

Tomorrow I'm going to work on the network interface. Edward Mccaughan is also attending the party and has built some software for multiplayer games on mobile phones, so hopefully he'll pop along to the atelier tomorrow and we can get that integrated.

Well, here's the current screenshot:

Next: Hours 5-7.