Slashdot Mirror


Simulating Emotions Within Games

Gamasutra is running an opinion piece about the way video games handle simulated emotions. Most often, an non-player character's emotional state is used to either tell a story or to drive gameplay. The author suggests that as both concepts become more complex in modern games, the simulation of emotions must also become more dynamic to remain interesting. Quoting: "Most of our emotional simulations use a simple sensation/calculation/behavior loop. Someone says or does something to a character; this influences his emotional state; he acts upon his feelings. His emotional state then reverts to a more neutral state over time (I was angry half an hour ago, but I've calmed down now), or changes again in response to another sensation. If these systems are really simple they produce absurd results: a character is furious one moment and cheerful a second later, like a Warner Brothers cartoon character. This is the kind of thing you get with finite state machines. This approach doesn't take into account the fact that behavior itself changes emotions. Behavior is not merely an output to be exhibited; it also affects how we feel. It feeds back into our emotional state."

10 of 47 comments (clear)

  1. First Post! by Anonymous Coward · · Score: 3, Funny

    Emotional state - pleased and surprised.

  2. Don't hurt the feelings of FSMs by Schiphol · · Score: 4, Insightful

    The summary (and TFA as well) seem to be committed to the following two points:

    1. Finite state machines will be unrealistically simple when simulating emotional responses.
    2. Behavioural-feedback is a necessary condition for realistic emotional displays.

    Point number 1 is unwarranted. Finite state machines may elaborate their input at an arbitrarily high level of complexity -finite may still be very large. Part of such an elaboration, of course, may be inner transitions between states that effectively amount to behavioural-feedback. There is nothing intrinsically un-dynamic to FSM.

    1. Re:Don't hurt the feelings of FSMs by Yvanhoe · · Score: 3, Interesting

      Dwarf Fortress uses ASCII characters to display the actors and their various states. It is incredible how effective it is. IT is not about the graphical feedback, it is about the behavior : once you see someone moving erratically and throwing everything around, you know that something is wrong with him. When you see two ASCII character sleeping side by side in the same room, you suspect that something is going on. It is not about attitudes, but behaviors.

      --
      The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
    2. Re:Don't hurt the feelings of FSMs by Creepy · · Score: 3, Interesting

      Dialog changes are fairly rare, and usually only in RPGs and Adventure Games for the exact reason you mention - they are a pain in the rear to program. One upcoming game that is supposed to have an "emotion engine" is Heavy Rain.

          I personally don't think an emotion engine is as important as emotionally attachable characters with appropriate dialog. For instance, the ancient game Below the Root is probably the earliest and best example of a game with characters that had emotional states, and in fact, some characters you could play could detect the state and know if that person meant good or ill and whether that person trusted you or not (or was afraid, etc). I was absolutely fascinated by that game in the mid 1980s - despite being aimed at children, it was entirely different than any game I'd played up until that time - largely non-violent, side scrolling, based on character interaction and puzzle solving, and had three very different protagonists (two were female, one male, which was unheard of). I think it's target market of children was wrong - I was a teen and spent more hours playing it than many other games I had.

      I think it's more important how you feel about the characters in the game than how the characters feel about each other. Dogmeat is an endearing character from Fallout, despite often being reduced to a bloody pool more often than not (and forcing a reload! --- NOOOO - you stupid mutt). Other times, characters are added and designed specifically to elicit an emotional reaction, like (Pre-searing) Gwen in Guild Wars or the Little Sisters in Bioshock.

  3. "Hm, haven't seen him for 30 seconds..." by M1rth · · Score: 3, Interesting

    What I find stupid is the fact that emotional states in games with any sneaking component revert way too quickly.

    "Hey, I saw an intruder! Hey, he ran away and hid!"... 30 seconds later... "*whistling merrily on patrol back in 'no intruder' state*".

    In many games, the enemy will walk right past a dead body, which is now an "object", over and over again.

    Much more realistic would be, once you've been spotted once, for the "alert flag" in some radius (shout range, alarm range if they hit one, etc) to go to a default "middle alert" and simply stay there. It's your punishment for being seen, AND it'd be much more realistic. And it wouldn't, if implemented properly, require any more processing power either.

    --
    If you can read this sig, congratulations, you have your glasses on!
    1. Re:"Hm, haven't seen him for 30 seconds..." by Vario · · Score: 2, Interesting

      This would be easy to implement and some games show a similar behavior. Still this is not widespread because it just does not add to the gameplay.
      A longer timeout for alertness would just mean, that you need to wait in a dark corner for a long time until the enemy finally goes back to "no alert". I certainly don't want to be punished for a tiny mistake by having to wait forever.
      In a simulation rather than a game the enemy should not only react by increasing the alertness but calling for additional patrols, etc. which would reduce your chance of success significantly.

      It is a fine balance between "not noticing a dead body" and "call for everybody to eliminate you".

    2. Re:"Hm, haven't seen him for 30 seconds..." by Creepy · · Score: 2, Interesting

      Thief? Heck, the sequel to the original stealth game, Beyond Castle Wolfenstein had this - part of the gameplay was dragging bodies out of sight so the guards wouldn't see them (the first game I believe had body spotting, but not dragging). If a guard spotted a corpse they'd immediately run for the level alarm and if that happened, you'd have SS all over.

      The real issue is, for sake of gameplay, the finite state machine is usually reset or else you'd be hiding for hours or days of gametime, which isn't much fun, so games often reset the "normal" state much sooner than it would be in real life. Obviously in a stealth game there are serious issues if the AI never reverts to a "normal" state, as those games aren't designed for you to take on multiple attackers head on (Thief is a wonderful example of that), and constant reloads every time you're spotted isn't much fun either.

  4. Re:Don't hurt the feelings of FSMs... by ciderVisor · · Score: 2, Funny

    ...praise their divine noodliness instead !

    --
    Squirrel!
  5. You think that's bad? :P by Moraelin · · Score: 3, Interesting

    If you think that's bad, I humbly submit the following personal anecdotes:

    1. Oblivion. So there's this mess of cultists and the high priest is right in front of them preparing to sacrifice someone. Being the sneaky barsteward I am, I plug him right in the head with an enchanted bow. So not only he does a spectacular back-flip in front of everyone, but he bursts into a very bright and spectacular flame too.

    So the cultists freak out and start running around, don't find me. One minute later, they calm down and one of them goes, "It must have been the wind."

    I don't know what kind of weather they have down there.

    2. NOLF 2. So they had actually gone through the trouble of scripting reactions when an NPC finds a body. They'd shake it, ask stuff like "are you alive, comrade??", flip out and search for the killer, etc. Must have been fun in the original version.

    Except some retard decided to replace all corpses with backpacks in the German version. You can probably see where this is going.

    Yep. Some soldier would find a backpack on a bed in the barracks, freak out, and go "are you alive, comrade??" and the whole circus. To a backpack. WTF.

    --
    A polar bear is a cartesian bear after a coordinate transform.
  6. I don't see the problem by Punto · · Score: 5, Funny

    a character is furious one moment and cheerful a second later

    So it's a woman? what's the big deal? actually, they seem to have the hardest part figured out already!

    --

    --
    Stay tuned for some shock and awe coming right up after this messages!