Wednesday, October 5, 2011

Let's Make A Game Episode 22: Blow'd Up

Where we left off last time, we wanted to make the game end somehow. As it is, once you lose all your health, the score resets. That's all. There's not even an indicator that you lost, no "A LOSER IS YOU" words on the screen or anything.
One of the ways we can resolve this is by having a visual indicator. I would like there to be multiple explosions over your character to let you know that you just got BLOWED UP GOOD. The most simple method would be a simple for/next loop:
For (1,3)
{
    AddExplosion(Player.Position);
}
Except this method sucks. Since the game loop is so fast, the three explosions sound like one. There's no delay. If we trim it back to one explosion, once again, it happens so fast that the player may not even realize that they lost.

Another option would be to create the explosion and then toss in an Initialize() call to restart everything, but that doesn't seem to work very well either. Once again, the loop is so fast that you can't even tell that the explosion happened. There has to be a better way.

No comments:

Post a Comment