17. Planning a Game

We’re going to make a simple space shooter game.

Vertically scroll, shoot lasers, avoid the enemy ships.

First, we are going to set up several game “states”

  1. Title Screen
  2. Game Mode
  3. Pause Mode
  4. Game Over
  5. Boss Fight Mode
  6. Victory Mode

Here is our outline of the game code…

  1. Initialize
  2. Draw Title Screen
  3. Start Title Loop
    1. Get Input (wait for Start)
    2. Play Music
  4. Draw Game Screen
  5. Start Game Loop
    1. Get Input
    2. Move your ship
    3. Spawn Ships
    4. Move enemy ships and bullets
    5. Collisions
    6. Play Music
  6. If Run out of Lives, Draw Game Over Screen
  7. -Play Game Over Music
  8. -Loop Back to Title
  9. If reach end, Start Boss Fight Mode
  10. If win, Start Victory Mode, Draw Victory Screen
  11. -and play Victory Music

First, create some graphics for the game.

Then, write some music.

I’m going to get the title screen working, with music, then I’ll get the Game Mode working.

I decided to use a Sprite Zero Hit to split screen the Scoreboard and the action, which will be vertically scrolling. Here’s a quick sketch I did in Photoshop…

Plan

I also decided to use Sprites for some of the text, like ‘Pause’ and ‘Game Over’. I thought that would be easiest.

Let’s get started, I’ll show you some code next time…I’m still trying to stick to the ‘make a game entirely in C’ concept, and this is just example code, so it won’t be too fancy.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s