Latest game engine updates

I’ve been busy working on the game engine. My focus lately has been to actually work on the gameplay itself as opposed to just refactoring everything over and over again. The best way to make sure I get a game done (and not just the tech) is to actually work on one.

Draw!!

Here’s the first thing I put together. It’s a simple little game where you control a little cowboy dude. The goal is simple: avoid being shot by the computer player and try to shoot him. Once in a while a little power up will appear. If you grab it, you can shoot a little bit faster and via a spread shot. This was done way back in October of this year.

The art and music were all done by me. The sound effects were re-used from Doom. The game engine is all mine. That includes the renderer (yeah, nothing fancy) and the audio (pseudo-8 bit noise).

Beat ’em up AI attempt

Next up is a first attempt at some beat ’em up AI. It’s really bad. The animation state machine is pretty choppy as well. It just looks really ugly. However, one thing that I thought worked out well were the fake leaves falling off the trees. This was done in November.

Decent AI

Now this is more like it. I took a look at how Streets of Rage 2 does AI and figured out a few things:

  1. Enemies go through various states. They’re often just standing far away, standing close up, or transitioning between the two states.
  2. Enemies walk a lot slower than the player. This allows the player to catch up to them or run away. If the enemies walk at the same speed as the player, it makes for a bad experience.
  3. Enemies never turn their back on the player. They’re always facing them. This is even more important when the enemy is backing away as it looks more natural if they do not turn.
  4. Only a few enemies at a time should ever attack the player. The rest of the time, they should stand back at a distance. It helps to randomize their position when standing far away so that it looks natural.

After learning these rules, I came up with this: