Now that we have some of the more basic concepts under our belts, we are ready to make some games. In this chapter, we will build some programs that will teach you the basics: Sphere1 “Sphere9. These programs will evolve to eventually produce a game in which you will land a spacecraft on an island s landing pad.
In this final game, there are several other things that you need to take into account. You will be flying over water, and you must use your thrusters to position yourself so that you can land properly. In addition, you cannot waste fuel because doing so will cause the spacecraft to miss the target island and get very wet, thus ending the game. The game will also eventually include background music, sound effects, and a game menu.
The goal of these programs is to prepare you for the full-blown aircraft flight simulator that we will explore in the next chapter. These programs have been designed to get you ready in small steps; in fact, our first program will be fairly simple ”it will just involve moving a sphere-shaped spacecraft around the screen. After this, the programs will get progressively more complicated. Needless to say, along the way you are going to learn quite a bit about programming.
On the CD The code for each of these programs can be found on the CD-ROM that comes with this book, so you do not need to type in the code if you do not feel like it. However, please bear in mind that you will get much more out of the book if you do enter the code!