About the game
Run! is a very simple game. In fact, it is the fewest number of game entities I could think of that could be considered a playable game. I designed the game around demonstrating a reusable system for game development rather than compelling gameplay. This makes the project ideal for you to add new behavior, rules, and gameplay to your own design. Or, even better, once you have learned how it works, design a completely new game of your own using the system as well as improve and add features to the system.
The system we will build is a version of the entity component programming pattern. A pattern is a way to do things. We will discuss the entity component pattern some more once we have discussed inheritance and polymorphism. For now, let’s see the game. The following screenshots show most of the entities that make up our game:
Figure 15.1: The game menu
In the preceding image, you can see a simple game menu. The player can press the Esc key to...