Game Development Reference
In-Depth Information
transition to states B, C, and D. Even given that expansion of potential “next
moves� gives a small increase in the depth of the behavior.
For example, let's say state A is still the idle state of our FPS enemy. However,
states B, C, and D are three different methods of attack. Perhaps B is still approach
with the hopes of engaging in melee once the enemy arrives within range. State C,
on the other hand, could be a ranged attack of some sort, and state D could repre-
sent casting a powerful spell. Now, as the enemy changes from idle, we may not
necessarily know what is going to happen next.
FIGURE 3.2 State (A) in this FSM could transition to any of three other states
(B, C, or D) giving more than one possibility of what could happen next.
The reasons those transitions occur are not defined but could simply
be concrete rules or random chance.
However, if the transitions themselves were rigidly defined, there would still be
predictability that would not take long to discern. For example, in the diagram,
condition X leads to state B, condition Y leads to state C, and condition Z leads to
state D. If the player can determine what conditions X, Y, and Z are, then the pre-
dictability of the agent has returned. Maybe conditions X and Y are triggered based
on whether the player has a melee or ranged weapon out at the time—with the
enemy responding in kind. If the enemy selects “approach� (state B) every time the
player has a melee weapon out (condition X) and “ranged attack� (state C) every
time the player brandishes his own ranged weapon (condition Y), then things are
going to get mundane quickly. In this case, the transitions are reminiscent of the
earlier explanation of the rules the dealer has to follow in Blackjack: If my cards are
less than 17, hit; if they are 17 or greater, stand.
There is one more addition that would add some depth of character to this state
machine. This addition would provide for the unpredictability that is reminiscent of
the Poker player. One way of creating this sort of variety is to make the conditions
Search WWH ::




Custom Search