If you are hooked on video games and have a basic knowledge of C++ and visual programming, you will be hooked on Beginning Game Programming. Clear, practical lessons based on C++ programming are the basis of this book's lessons. By focusing on the Windows API to construct games, you will learn game theory in double-buffered graphics, sprite animation, digitized sound effects and music. A fully functional game engine provided on CD, along with tools, code and graphics, will give you the ability to create your own games in the future. Learn the art and science of game programming with help from Beginning Game Programming.
Introduction.
How This Book Is Structured. What You'll Need.
I. GETTING STARTED.
1. Learning the Basics of Game Creation.
Getting to Know Video Games. Learning Game Design Essentials. Object-Oriented Programming and Games. Exploring the Tools of the Trade. Summary. Field Trip
2. Creating an Engine for Games.
What Is a Game Engine? Pondering the Role of a Game Engine. Developing a Game Engine. Building the Blizzard Example. Summary. Extreme Game Makeover.
3. Learning to Draw Basic Graphics.
Graphics Essentials. Examining Graphics in Windows. Painting Windows. Building the Crop Circles Example. Summary. Field Trip.
4. Drawing Graphical Images.
The Basics of Bitmap Images. Looking Inside a Bitmap. Developing a Bitmap Class. Building the Slideshow Example. Summary. Extreme Game Makeover.
II. INTERACTING WITH GAME PLAYERS.
5. Controlling Games with the Keyboard and Mouse.
Gaming and User Input. Taking a Look at User Input Devices. Assessing Keyboard Input for Games. Tracking the Mouse. Revamping the Game Engine for Input. Building the UFO Example. Summary. Field Trip.
6. Example Game: Brainiac.
How Does the Game Play? Designing the Game. Building the Game. Testing the Game. Summary. Extreme Game Makeover.
7. Improving Input with Joysticks.
Understanding Joystick Basics. Calibrating Joysticks. Tracking Joystick Movements. Revamping the Game Engine
for Joysticks. Building the UFO 2 Example. Summary. Field Trip.
8. Example Game: Light Cycles.
How Does the Game Play? Designing the Game. Building the Game. Testing the Game. Summary. Extreme Game Makeover.
III. ANIMATING GAMES WITH SPRITES.
9. Making Things Move with Sprite Animation.
Understanding the Basics of Animation. 2D Versus 3D Animation. Understanding the Types of 2D Animation. Applying Sprite Animation to Games. Designing an All-Purpose Sprite. Creating the Sprite Class. Building the Planets Example Program. Summary. Field Trip.
10. Managing a World of Sprites.
Assessing the Need for
Sprite Management. Designing a Sprite Manager. Adding the Sprite Manager
to the Game Engine. Eliminating Flicker with Double-Buffering. Building the Planets 2 Example. Summary. Extreme Game Makeover.
11. Example Game: Henway.
How Does the Game Play? Designing the Game. Building the Game. Testing the Game. Summary. Extreme Game Makeover.
IV. MAKING NOISE WITH SOUND AND MUSIC.
12. Playing Digital Sound Effects.
Understanding Digital Sound. Getting to Know Windows Waves. Exploring Sound Tools. Creating and Editing Sounds. Finding Sounds and Music. Accessing Wave Sounds. Playing Wave Sounds. Building the Brainiac 2 Example Program. Summary. Field Trip.
13. Playing MIDI Music.
Feeling the Music with MIDI. Understanding the Windows Media Control Interface. Using the MCI to Play MIDI Music. Adding MIDI Music Support to
the Game Engine. Building the Henway 2 Example Program. Summary. Field Trip.
14. Example Game: Battle Office.
How Does the Game Play? Designing the Game. Building the Game. Testing the Game. Summary. Field Trip.
V. TAKING ANIMATION TO THE NEXT LEVEL.
15. Animating the Appearance of Sprites.
Frame Animation Revisited. Designing an Animated Sprite. Adding Animated Sprite Support to the Game Engine. Building the Battle Office 2
Example Program. Summary. Extreme Game Makeover.
16. Creating Backgrounds for Your Sprites.
Assessing the Significance of Game Backgrounds. Understanding the Types of Game Backgrounds. Adding Background Support to the Game Engine. Building the Roids Example. Summary. Field Trip.
17. Example Game: Meteor Defense.
How Does the Game Play? Designing the Game. Enhancing Sprites in the Game Engine. Building the Game. Testing the Game. Summary. Extreme Game Makeover.
VI. ADDING BRAINS TO YOUR GAMES.
18. Teaching Games to Think.
Understanding Artificial Intelligence. Exploring Types of Game AI. Developing an AI Strategy. Building the Roids 2 Example Program. Summary. Field Trip.
19. Example Game: Space Out.
How Does the Game Play? Designing the Game. Adding Yet Another Sprite Feature to
the Game Engine. Building the Game. Testing the Game. Summary.
VII. SPICING UP YOUR GAMES.
20. Adding Pizzazz to Your Game with a Splash Screen.
The Importance of a Splash Screen. Looking Behind a Splash Screen. Building the Space Out 2 Game. Summary. Field Trip.
21. Showing Off Your Game with Demo Mode.
What Is Demo Mode? The Nuts and Bolts of Demo Mode. Building the Space Out 3 Game. Summary. Extreme Game Makeover.
22. Keeping Track of High Scores.
The Significance of Keeping Score. Modeling High Score Data. Storing and Retrieving High Score Data. Building the Space Out 4 Game. Summary. Field Trip.
VIII. ONE FOR THE ROAD.
23. Changing Perspective with Scrolling Backgrounds.
What Is a Scrolling Background? Understanding How Scrolling Backgrounds Work. Adding Scrolling Background Support to the Game Engine. Building the Wanderer Example. Summary. Extreme Game Makeover.
24. Example Game: Stunt Jumper.
How Does the Game Play? Designing the Game. Building the Game. Testing the Game. Summary. Extreme Game Makeover. Field Trip.
IX. APPENDIXES ON CD-ROM.
Appendix A: Selecting a Game Development Tool.
Microsoft Visual C++. Borland C++Builder. Bloodshed Dev-C++. DJGPP.
Appendix B: A C++ Programming Primer.
C++ Language Basics. The C++ Development Cycle. Creating a Simple C++ Program. Documenting Code with Comments. Providing Code Separation with Whitespace. Organizing Code into Functions. Manipulating Data with Expressions. Enhancing the Program Example. Variables and Constants. The if Statement. Relational Operators. Functions. Global Variables. Modules. Doing Things More Than Once. Doing Things at Least Once. Doing Things Zero or More Times. The for Loop. switch Statements. Incrementing and Decrementing. Learning the Bare Essentials of Classes. Where to Go Now.
Appendix C: A Windows Game Programming Primer.
Windows Programming Essentials. Peeking Inside a Windows Program. Building the Skeleton Example.
Appendix D: Creating Graphics for Games.
Assessing Game Graphics. Exploring Graphics Tools. Creating and Editing Graphics. Finding Graphics.
Index.