Game Development Reference
In-Depth Information
loaves of bread from one sack of flour and four buckets of water” specifies a
numeric relationship between water, flour, and bread. Here is another example:
“The probability of an injury occurring to an athlete in a collision with another
athlete is proportional to the weight difference between the two athletes and their
relative speeds at the time of the collision.” Although this second example leaves
the precise details up to the programmer to decide, it does specify a numeric rela-
tionship: Weights and speeds , both numeric attributes of the athletes, go into
computing the probability of an injury , a numeric entity. (Remember that an attri-
bute is just an entity that belongs to another entity.)
Defining numeric relationships precisely requires some familiarity with algebra and
arithmetic. First, you must ensure that you use meaningful equations; if you write
that the speed the convoy will travel is in part a function of the quantity defined by
(the weight of supplies) ÷ (number of pack horses - number of camp followers) ,
you may very well end up with a divide-by-zero error. Because the resulting value
interacts with other parts of the mechanics, changes in the way you calculate that
value will have a domino effect, ultimately influencing the gameplay itself, and
you must be able to understand and predict these effects. Chris Crawford's Balance
of Power: International Politics as the Ultimate Global Game (Crawford, 1986) remains
one of the best topics ever written on numeric relationships in the core mechanics.
Although it is out of print, used copies are still available from online bookstores.
The text is also available in ASCII form at www.erasmatazz.com/library/
Balance%20of%20Power.txt.
Numeric relationships lie at the heart of internal economies, and the later section
“The Internal Economy” discusses them further.
SYMBOLIC RELATIONSHIPS
The values of symbolic entities— red , on , empty , found, and the like—cannot be
added together or otherwise manipulated mathematically. You must specify all the
states that a symbolic entity may represent, and the relationships among them,
without equations. For instance, the red , yellow , and green states of a traffic light
are not related to each other numerically; they're simply different. To use a traffic
light, you must document how it gets into each of its possible states and how the
light in each of those states affects the behavior of other entities. To define the
behavior of an NPC driver who sees a traffic light, you would write three separate
mechanics into his AI, one for each state of the light, to say how the driver reacts to
seeing a red light, a yellow light, or a green light. When any entity in the game
(such as a driver) interacts with a symbolic entity (such as a traffic light), you must
state exactly what happens for each possible symbolic state of the entity. If you
leave one state out, no interaction will occur with that state.
TIP The values of
numeric entities may
change according to
arithmetic processes,
but you must create
mechanics that explic-
itly change symbolic
entities from state
to state.
A binary (two-state) entity is sometimes called a flag. You will often create flags in
your game to document whether the avatar has entered locations, overcome spe-
cific obstacles, and so on.
 
Search WWH ::




Custom Search