Game Development Reference
In-Depth Information
The Skiing project
The changes to the Skiing project for this chapter really make it seem like much more
of a game. The following screenshot and the following sections highlight the new bits
and pieces that have been added:
New gameplay features
Previously, there was not a great deal of actual gameplay to be had in the game. We
could steer the little skier left and right, but aside from crashing into a tree there
wasn't actually an awful lot to do.
To combat this, gates consisting of a couple of flags have been added. The player
must steer the skier through these in order to increase their score, which is now
displayed at the bottom of the screen.
To implement the gates, a new class called Flag has been created. The ModeGame
class picks a random position across the course and spawns a flag a short distance
left and right of that position. The flags scroll up the screen, and when they scroll off
the top a new random position is chosen for them at the bottom of the game world.
 
Search WWH ::




Custom Search