Game Development Reference
In-Depth Information
n Power Pills. Every level starts with four power pills, which Pac-Man can eat to be
able to eat the ghosts. These power pills are a scarce but tangible resource the player
must use wisely. Like dots, they are only consumed, never produced during play.
n Fruits. Occasionally a fruit appears in the maze. Pac-Man can eat the fruit to
score extra points.
n Ghosts. There are four ghosts that chase Pac-Man around the maze. The ghosts
can be in one of two locations: Either they are in the “ghost house” (the area in the
middle of the screen) or they are in the maze giving chase. The ghosts are also a tan-
gible resource. (Notice that resources are not always positive things for the player!)
n Lives. Pac-Man starts the game with three lives. Lives are intangible resources in
Pac-Man . If Pac-Man loses all lives, the game ends.
n Threat. To simulate the effect of the ghosts giving chase, we will model an
abstract resource called threat . When the threat passes a certain threshold, Pac-Man
is caught, and he loses a life. Note that we are not modeling the shape of the maze
itself (which Machinations cannot do), only the flow of resources and states the
game can be in.
n Points. Every time Pac-Man eats a dot, a fruit, or a ghost, he will consume them
and score a number of points. The objective of the game is to score as many points
as possible. Points are intangible resources.
These are all the obvious resources in the Pac-Man economy, and we'll start our
model by constructing systems around them. Notice that threat is one we made up
for the purposes of the simulation, and our decisions about how to model threat are
subjective and not part of the original game.
Dots
We start with a simple mechanic: Pac-Man eats dots, converting them into points.
It can be represented with two pools and a converter ( Figure 5.24 ). One pool starts
with 50 resources in it representing the dots in the maze. The pool that collects
points starts empty. We also added an end condition that determines that you have
completed a level after eating all the dots. The converter representing the eating
action is an interactive node. You can click it to eat the dots. Notice, however, that
the input of the converter has a random flow rate. Every time you click, there is
only a partial chance that the action succeeds. The more dots there are, the easier
it is to eat them. Initially the chance to eat a dot starts at 100%, but every iteration,
for every dot that is eaten, the chance is lowered by 1%. This reflects the challenge
to the player in moving around the maze and eating every single dot.
NOTE The real game
has exactly 240 dots on
every level. We reduced
this to 50 to make the
game shorter.
 
Search WWH ::




Custom Search