Game Development Reference
In-Depth Information
emotional states. The Sims does not directly model emotions, but it does model
relationships. More complex systems store emotional state as a small collection
of numeric values, each indicating the strength of the feeling. A single emotion
might range from 0 to þ 100. Opposing emotions such as fear and confidence can
be interpreted from a single stored value. This might call for a range of 100 to
þ 100. The different emotions that can coexist are each stored as a separate value.
Numerical methods can then be applied to the collection to determine how the
emotional state should affect actions. We will examine a range of emotional
models, starting with a simple addition to an FSM.
An FSM works for emotions as long as we only need a single emotion at a time.
Recall from Chapter 3, ''Finite State Machines (FSMs),'' that FSMs work best
when we have short answers to ''I am....'' Our simple-minded monster was
attacking, fleeing, or hiding. The simplest possible way to make our monster feel
would be to map a single emotion to each of the existing action states. It could be
angry when attacking, afraid when fleeing, and happy when hiding. These are all
believable for the conditions, and the amount of effort to implement them is
extremely low. We get into trouble when we lack a clear mapping between what
our AI is doing and what it is feeling, or when we are not already using an FSM.
The next level of sophistication would be to use a separate FSM for the emotional
state of the AI. This allows a more sophisticated AI for actions than an FSM. A
sports-coach AI might use a book of moves for action selection but could be
augmented with an FSM for feelings. One coach AI may exhibit questionable
judgment when it is upset or angry. A different coach AI might be programmed
to show brilliance only when under pressure. In both cases, the emotional state of
the AI is influencing its actions. If the game foreshadows these traits before using
them and telegraphs the AI's feelings when they are active, the player enjoys a
richer experience.
The killer weaknesses of an FSM are that it can only be in one state at a time and
that there are no nuances for a given state. For this reason, an FSM should be
used only for the very simplest of emotional models. An FSM used this way does
not allow the time-honored device of emotions in conflict. When we need to
model more than one emotion at a time, and those emotions need a range of
intensity, we are forced to use other techniques. Thankfully, those techniques
present a range of complexity.
The game The Sims does not directly model emotions at all [Doornbos01]. But
the Sims make friends, fall in love, and acquire enemies. How can they do that
Search Nedrilad ::

Custom Search