Hour 3 … Time to make some enemies!

Enemy Creation!

Now that I have a player controlled by the ‘Accelerometer’ (emulated with my mouse at the moment), I should really introduce some enemies to dodge.

Thinking about how to implement them is always a good start, so I started thinking about how they should act in the world, and what information will each of them need. All they really need at the moment is:

  • Position – A position in the world
  • Velocity – The enemies speed

And how should the enemies move?

  • Randomly?
  • Towards the Player?
  • Should they speed up gradually?

So after thinking about all of these, I decided to make my enemies move towards the player and gradually gain in speed. Also, for the time being, I’ve made it so that they spawn one every second at a random location in the world.

What happens when the enemies manage to get the player?!

  • Game Over?
  • Respawn and start again,
  • Respawn with one less life?

I think in the end game, it will probably end up being ‘Game Over’ and will bring up a menu with, ‘Retry or Menu’ for example. But for now, since this is still a small prototype, I’ve made it so that the player just respawns in the corner of the level, ready to fight another day. So here is the product after implementing the Enemies after Hour 3:

It’s starting to look and feel a bit more like a game!

————–

Hour 3 over … There are a few directions to take for tomorrows hour, I could start thinking about menus, and a little bit of behind the scenes work, or I could try to implement the destroying of enemies. I’ll think about this overnight, and will blog what I do tomorrow!

Advertisements