Game Development Reference
In-Depth Information
Health Systems, Winning,
and Losing the Game
The game is playable. But the player is in that strange limbo of being unable
to win and unable to lose. In this chapter we will look at enabling the player to
do both.
Winning will actually be very simple—if the player gets to the end of the
level (at the bottom of the stairs) alive, he wins. This means that if we have
a trigger down there, when the player passes through it, we can launch the
“Congratulations! You Win!” level. We'll further flesh out that tutorial with
script to allow for the game to be quit or restarted.
Losing is actually a bit tougher, but allows us opportunities to explore new
ideas. To allow the player to lose we need to allow him to have a health system
that keeps track of what sort of damage he has taken. We'll throw some
escaping steam into the level that hurts the player if he isn't careful about
where he walks, and make sure that the frigid water we warn him about does
indeed do him in.
First, let's set up the winning mechanism.
Search WWH ::




Custom Search