Game Development Reference
In-Depth Information
themselves somewhat fuzzy. Using Figure 3.3 as an example, if there were percent-
age chances of transitioning to each of states B, C, and D, then a specific “next
move� could be nailed down.
Using our FPS enemy example, perhaps the only trigger for a transition is still
a radius, but the next state (i.e., approach, ranged attack, or spell) is based on the
percentages established by X, Y, and Z. That way, while the player would know that
the enemy will no longer be idle, there is no way to predict what is going to happen
next. The player has to be prepared to react to each eventuality.
FIGURE 3.3 The transitions from state A to states B, C, and D are
controlled by the percentages expressed by X, Y, and Z, respectively.
What's more, those percentages' chances can be dynamic as well. Rather than
the X% chance of transition to state B always being the same value, we could allow
it to change based on other factors. The result is that we may have a vague idea of
tendencies , but there is always the potential for surprise. It is that unknown that
lends character to our characters. Without that, our characters are automatons with
the predictability of mechanical clocks.
The challenge—or to continue my metaphor, the artistry —comes through the
process of building those fuzzy conditions. Just as the mixes of colors on an artist's
palette are infinite, there are truly infinite possibilities on how to construct mathe-
matical models. The models can be realistic, caricatures, or completely abstract. (My
pig was an attempt at realism but ended up more as a caricature.) Even in the realm
of realism, there are plenty of possibilities of how such realism can be represented.
In this case, the brush is an FSM, and, just like a paint brush, left to itself, it is
largely incapable of providing the expression that we desire. By adding the mathe-
matical models to the relatively expressionless FSM, we can paint a picture for our
player—one that has the nuance that presents our vision in a robust, detailed, im-
mersive way.
Search WWH ::




Custom Search