Game Development Reference
In-Depth Information
killed. We'll show how to model this structure in a Machinations diagram in two
steps ( Figure 6.43 and Figure 6.44 ).
In the first step, ammunition is represented by a pool of resources. When the player
chooses to engage an enemy, he wastes between two and four ammunition units
and has a chance to kill an enemy. This is modeled by the skill gate between the
Engage and Kill drains. In this case, the skill gate is set to generate a random num-
ber between 1 and 100 every time it fires. If the generated value is larger than 50,
the Kill drain is activated, and one enemy is removed. The register labeled Skill can
be used to increase or decrease this chance; it can be used to reflect more or less
skilled players. Once an enemy is killed, a similar construction is used to create a
50% chance that five more ammunition resources are generated by the Drop Ammo
source, which go into the Ammo pool. To keep things interesting, new enemies are
spawned occasionally.
FIGURe 6.43
ammunition and ene-
mies in an FPs game
Figure 6.44 adds player health to the diagram. In this case, poor performance by
the player when engaging an enemy (such as when a number below 75 is generated
by the skill gate) activates a drain on the player's health. In addition to dropping
ammunition, there now is also a 20% chance a killed enemy drops a medical kit
( medkit ) that the player can use to restore health.
FIGURe 6.44
health added to the
FPs game economy.
skill gates and ran-
dom gates generate
numbers between 1
and 100.
 
 
Search WWH ::




Custom Search