Game Development Reference
In-Depth Information
Chapter 11
Game Project: Space Hero
In this chapter, a high action, space shooter game will be built by using the same state machine built in Chapter 10. A
few new game development techniques will be introduced as well, including object pooling, time-based animation,
and pixel-perfect collision detection.
Space Hero
Space Hero is a space shooter game where the enemy ships fly down from the top of the screen and fires bullets at
you, the hero. The hero ship also fires bullets, and it can maneuver around the screen using all direction keys on the
keyboard. The features we want to accomplish in the development of Space Hero include the following:
Use the asset management approach learned in Chapter 9.
Use the same application class, and its corresponding state machine, that was built in Chapter 10.
Use sounds for ship explosions and background music.
Create three scenes: the main game menu, the game level, and a game over screen.
Use the UI components built in Chapter 8.
Create an object pool to store sprites for reuse in the game.
Use a third party library to handle pixel-perfect collision detection for the bullets and ships.
Use bitmap fonts for the scoreboard.
Use the keyboard for controlling the ship's movement and the firing of its bullets.
Figure 11-1 shows the game being played in its complete state.
 
Search WWH ::




Custom Search