Creating an Engine for Games for Windows
(Page 1 of 11 )
Building a game engine organizes code in your games so that the game-specific code is isolated from the general Windows application code. Read on to see how to design and develop a basic game engine for Windows game programming. (From
Beginning Game Programming, by Michael Morrison, 2005, Sams, ISBN: 0672326590.)
Note - While Pong gets credit for being the first publicly identifiable video game, I think it's safe to say that Space Invaders was the first video game to really captivate the world's imagination. Released in 1978 by Taito, Space Invaders was the original vertical shooter that set the stage for many an alien shoot-em-up to come. Space Invaders enjoyed such frenzied popularity in Japan that the country encountered a coin shortage and had to quadruple its supply of yen. Space Invaders still lives on today in quite a few modern games, as well as in revamped 3D versions of the classic original. In 2004, the original stand-up Space Invaders arcade game was re-released so that it could be enjoyed by a new generation of gamers—to ensure that the game would continue to rake in quarters, the cost was increased to 50 cents per play.
A game is a specialized type of program, but it is still just a program written in a programming language. This means that you can create a game just as you would any other Windows program; for an example of a minimal graphical Windows program, check out the Skeleton application in Appendix C, "A Windows Game Programming Primer."
Certain game-specific tasks must be carried out in all games. Therefore, it would be quite helpful to organize the code in your games so that the game-specific code is isolated from the general Windows application code. In isolating this code, it might also be useful to build in some cool features that apply solely to games. The idea I'm suggesting is that of a game engine, which is a grouping of program code that performs tasks common to games. This chapter guides you through the design and development of a game engine that you'll build on throughout the remainder of the book.
In this chapter, you'll learn:
The importance of a game engine in game development
How to design and develop a basic game engine for Windows game programming
How to create an example that demonstrates the power of the game engine
This chapter is from Beginning Game Programming, by Michael Morrison (Sams, ISBN: 0672326590). Check it out at your favorite bookstore today.
Buy this book now. |
Next: What is a Game Engine? >>
More Code Examples Articles
More By Sams Publishing