Game programming is an exciting and rewarding activity. Games are simulations of real or fictional events, the sole aim of which is for the user to have fun. Being simulations, they're excellent programming exercises that allow you to create complex software systems without having any real world task to solve. Games also provide (almost) instant gratification. You can see, interact with, play and share your results. And finally, games appeal to our creative sides, something often lacking in programming tasks.
Before you get started, download the example code to follow along. You can copy and paste from your Web browser, but later articles in this series will contain media files (graphics, sound, etc) that the example programs will need in order to run.