
4
The Game Engine
4.1 The Game Engine, Part 1
Now would be a good time to begin incorporating the code we have introduced into a
game engine. Our game engine will be an object-oriented design with a class for each major
component. For part 1 of our game engine, we will include Game, Graphics, and Input
classes. To create a game with our new game engine, we will create a class that inherits from
the Game class. For example, if we wanted to create a Spacewar game we would create a new
Spacewar class that inherits from the Game class, as shown in Figure 4.1.
e class diagram in Figure 4.1 was created in Visual Studio 2010 by right clicking on the ...