Emotional states in games

Questions on NPC emotion state design in games.

In terms of coding emotional states into your NPCs, such that events and conversation (at least in as much as SPEAK, TELL and ASK are conversation in-game) change their emotional state and in turn affect their following actions and responses to conversation, would you say it generally makes sense to generalise emotions into ‘Happy’, ‘Sad’, ‘Angry’ or adopt a more binary ‘Positive’ and ‘Negative’ mood?

Would you have the emotional states operating concurrently with an associated value such as 6/10 Angry, 4/10 Sad etc or simply have them in one of the state’s at any one time?


1 Like

Have you looked at NeoCab’s emotional grid idea? This interview discusses what they arrived at as a way of handling and representing emotion in the game.

How are the emotions of Lina and her passengers communicated to the player? Dialogue? Interface?

Vincent Perea: The thing we didn’t want to do is make a game where you have a health meter or “sad meter”. With emotional well-being it’s a bit more complicated than that and we didn’t want to do it the disservice of having it be a meter.

PE: So, the core sci-fi conceit (and also a primary UI element) in our game is the Feelgrid—a consumer biometric device people wear in one form or another as jewelry (bracelets, necklaces, earrings, skin patches etc.) which reads your up-to-the-nanosecond emotional response and, in most cases, mirrors it back out as a color gradient… like a FitBit for feelings. In the world of Neo Cab, Lina relies on her Feelgrid and many of her [passengers] wear them, too.

Every time Lina’s “affect” (the physiological base that all emotions are built on— essentially, the way you feel inside your body when you’re anxious, chill, depressed, aroused, overjoyed, etc) changes, players see her Feelgrid buzz, flare up and change color. This color is something we invented on top of the “circumplex model of emotions” which scientists use to measure these things. We just map every part of the emotional space to a color, to make it easy to read: It helps that human language already maps emotions to colors! Feeling blue, seeing red, a sunny personality, etc. We’ve playtested this a lot and are stoked that people immediately get this system— and then our character’s facial expressions are driven by the same underlying variables, so that reinforces the vibe further.

We invented all this because we found two main problems with previous attempts to make emotions truly matter to gameplay: either the systems were too simple to feel true to the nuances of human emotion, or they were too complex be legible in the game’s interface. In the first case, you risk having one-dimensional characters who shift mechanistically from trigger to trigger. On the other, you have an inscrutable, almost manic-depressive character whose emotions shift in ways you can’t understand or predict. We feel like the Feelgrid is a sweet spot—it’s complex enough to map to a broad range of human emotion, with all of the subtle gray areas between, eg, “tired” and “depressed” or “anxious” and “angry”—but it’s simple enough that players can see the whole system at a glance—no hidden variables or compound stats.

PR: We also branched the dialogue choices based on what color she is in the Feelgrid. So you’ll learn too that if you are in this red angry state and someone says something obnoxious to you, you’ll see a choice to just shrug it off but if you’re too far in the red or too agitated that choice will be disabled. When you click it, you’ll see that it’s because you’re too far in the red.


I imagine in an IF game, you could borrow the idea of representing emotion as color through coming up with calculation that generates the color hex or RGB value and using that for text coloring.

1 Like

Thank you, this is exactly the kind of response I was hoping for!

The Feelgrid is a great concept, I’ll be looking more into this. :slightly_smiling_face:


Hey Adam,

I’ve been focussing on this very topic for the past few days.

In my IFComp game, Happyland, I modelled NPC emotions on two scales: pleasure and intensity.

             less pleasure <---------------+--------------> more pleasure

Each character had a “personality” that would set initial values for happiness and intensity.
Various events or conversations would increase/decrease one or both of these values. Over time, these values would slowly gravitate back to their defaults.

To keep things manageable, my code would simply check which quadrant the NPC’s mood was in:

  • happy (high intensity, high pleasure)
  • calm (low intensity, high pleasure)
  • gloomy (low intensity, low pleasure)
  • anxious (high intensity, low pleasure)





That’s a great system Rob, thanks for the reply. It’s again employing the grid system as opposed to a simple binary Good & Bad mood or even a meter.

What made you pick this system of tracking? Also, what made you pick Intensity and Pleasure?

Last question :slightly_smiling_face: Which technology did you use to create your game? (Inform, TADS, Adrift etc)


I did a google image search for “emotional model” and this model came up a number of times. :slight_smile:

I’m currently prototyping Plutchik’s model: https://en.wikipedia.org/wiki/Emotion_classification#/media/File:Plutchik-wheel.svg
…but the number of states is starting to get overwhelming (currently 23!)

There is some great research:

My game is in Javascript with a homemade parser.

Bottom line: Modelling emotions is hard. Modelling realistic emotions is very hard.

1 Like

That two-axis model is basically the same as what Neocab did.

I thought Neocab’s system was easy to grasp, but not all that interesting as a gameplay element. It wasn’t irrelevant, but I didn’t really spend my game time trying to push the protagonist into one state or another. It was just a background condition that meant that certain dialogue options were disabled at any given time.

On the other hand, the Feelgrid was a central element of the plot. So it was good that the story was about something that was actively part of your game experience. That was well done.

The underlying problem is, what role does emotional state serve in the game? Setting up puzzles based on that state is a terrible idea – it always feels silly and reduces the protagonist to a puzzle-piece. The idea in Neocab was to reflect the state in the kinds of dialogue that came out of the game, and therefore how storylines evolved. As I said, this sort of worked, but didn’t feel very strong.