Portraying Emotions in Games
Existing Senses and Actions
Taking a practical perspective, portraying emotions is about using whichever means can be perceived by the other players. In the case of first-person games, many existing actions can display emotions (for instance, movement, turning, or jumping). Senses also contribute indirectly to conveying emotional state.
Fundamental skills such as movement are ideal for conveying emotions because they are so obvious to external observers. For example, walking slowly may be a sign of depression; running especially fast can indicate fear. Turning toward an object reveals attraction, whereas turning away shows disgust. Jumps may also indicate happiness.
The other actions used in previous parts play a lesser role in portraying emotions. For example, weapon selection and firing and picking up and using objects leave little room for emotions in terms of animation. However, the higher-level principles involved in the decisions portray emotions (for instance, selecting a weak weapon to ridicule an enemy).
The lack of action can also be interpreted as a manifestation of emotion (for instance, melancholy). Higher-level decisions such as fleeing and fighting reveal emotions, too.
Although there needs to be a behavioral response for emotions to be perceptible, any part of the animat affecting the response plays a role in the production of emotions. Senses are surprisingly important for this reason, because they provide perceptions to the brain—affecting the flow of information from the source.
Emotions primarily affect vision, because the senses may be less alert in some situations (for instance, no anticipation). In these cases, creatures do not perceive nearby entities as well—if at all. Conversely, when creatures are surprised or afraid, their senses will be attentive to the smallest movement. Other senses such as touch are generally less susceptible to emotional status.
This part reuses existing technology—focusing on the emotional system from the AI point of view. However, two additional means are used by human players to convey emotions in games: gestures and chat messages. Both are supported by our first-person game engine (Quake 2), so it's just a matter of defining interfaces to them.
Each of the gestures supported (such as wave, salute, point, or taunt) are defined in an enumeration. Using these values as the parameter of a function causes the animat's body to perform that gesture:
void Gesture( const GestureType g );
Chat communication is supported by one function, taking the text string as a parameter. The second parameter is used to specify who to broadcast to (that is, the team or everybody):
void Say( const string& text, const GroupType g = Everybody );
Wrapper functions could make the interface simpler if necessary (for example, Wave() or SayTeam("text")).
Example Manifestations of Emotions
The following list of scenarios illustrates the kind of emotion-driven behaviors that our animats should be capable of portraying: