Putting It All Together 

There is no 'right' way to write a game. Different programmers use a wide range of techniques, each with their own benefits and drawbacks.

These are roughly the steps I go through when writing a game. These are based on my own experience, so will probably be wildly different from the way other programmers write games.

Feel free to ignore them...

1) Create a framework for the game

This typically involves putting the game into graphics mode, loading some graphics, setting up the main game loop and providing a 'Quit' key.

2) Get some background scenery happening

This could be anything from a simple 'TileBlock' to an 8-way scrolling tile-map.

3) Add some good guys

This includes the actual player, player missiles and so on. This may also include detecting collisions with the backdrop, especially for platform style games.

4) Add some bad guys

This includes bad guy bullets and so on.

5) Add collision code

Once you have some collision code going, you can start adding things like 'score' and 'lives' to the game.

6) Play the game and tweak it

Adjust difficulty levels and so on.

7) Add other game elements

These include power-ups, special effects, high-score tables, intro screens and anything else you can think of!

8) Goto 3

If you find yourself spending a lot of time on step (6), then your game is probably coming along quite nicely!

Here are some tips for improving the speed of your game:

And some general advice:

But, more than anything else, enjoy yourself.

If you end up ignoring all the above advice, and write some huge, kludgy behemoth of a game, it doesn't really matter as long as it was fun.

Because if you enjoyed writing the game, there's a very good chance people will enjoy playing it!