<commit_before>---
layout: post
title:  "Safety and threat in games"
date: 2017-01-02
categories: games
---

{% marginfigure "one" "assets/img/carveraffect.png" "The different emotions produced from successful approach or avoidance, from <a href=\"http://www.psy.miami.edu/faculty/ccarver/pPleasure.pdf\">Carver (2003)</a>" %}
{% newthought "Safety and threat" %} are interesting things in video games. In horror games this is something the designer explicitly plays with, trying to [spook you with their spooky spooks](https://youtu.be/vQN4UHM_PoU?t=4m40s). But the feeling of fear and calm occurs in most games. This seems to occur in any game where there are threats that have to be avoided or dealt with, producing relief when successful. What's interesting is how these feelings adapt based on your [expectations of survival and threat](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4364301/) in these games.

In the *Dark Souls* series the bonfire acts as a "save state" for your character, filling up your health and resources and providing a respawn point for the next time you will die{% sidenote "one" "[and you will die](https://www.youtube.com/watch?v=wYbOVTQnbAA)" %}. They often are placed just after dense areas populated by monsters, and once you get there you have an instant feeling of relief.

{% fullwidth "assets/img/darksoulsbonfire1.gif" "After the hardest point in the game, this feels so warm and cozy.  (<a href=\"http://zedotagger.deviantart.com/art/Dark-Souls-Solaire-537366036\">source</a>)" %}

Most games generally have the difficulty of a game fluctuate up and down, sustaining periods of high intensity followed by periods of soothing calm. Usually these periods of safety are strongly signaled by some *cue* in the environment. These cues have to be consistent, so that when you are in the safe zone you know you won't be attacked or threatened in any way. If the cues are inconsistent then they can't be trusted, and then no consistent feeling of safety occurs since you can't track how well you're avoiding threats.

{% marginfigure "two" "assets/img/l4dflow.png" "Flow diagram used by the *Left 4 Dead* AI director to control the zombie intensity. (<a href=\"http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf\">source</a>)" %}
In *Left 4 Dead* these spots are literally termed "safe houses", and provides complete safety from zombies. These spots are locked rooms enclosed and encased in concrete, providing clear prior cues to safety. These safe rooms are the safest parts of the game (besides the ending where you're rescued), but the threat fluctuates outside of the safe room. This graph shows the measured game intensity based on zombie population. The threat of zombies here is explicitly controlled based on the AI director, which tracks the intensity of the game and adaptively fluctuates it. Most games do the same thing, but usually just based on enemy placement in a level.

{% maincolumn "assets/img/l4dintensity.png" "Note that during the Relax period the intensity takes a while to drop down."%}

Games can play with these feelings of safety, playing with your expectations one way or the other. In the game [*Amnesia: The Dark Descent*](https://www.youtube.com/watch?v=9jWsiyXoTz0), you are tracked by a few unknown monsters throughout most of the game, and can hide in the dark at the risk of insanity. Most of the game present a fairly constant (though still fluctuating) state of fear. However a few moments of relative safety do occur, one being <NAME>.

{% maincolumn "assets/img/amnesia-the-dark-descent-agrippa.jpg" "<a href=\"https://youtu.be/syBkLLe-_nk?t=4m33s\">H<NAME></a>" %}

Despite the way he looks, Agrippa becomes your best friend by the time you get to him. Later you have to saw off his head and shove it into your knapsack, which he very appreciates. At this point in the game you're on constant alert; scared of your own shadow. So having the first person you meet in the game so calmly talk to you, without any fear in a fairly brightly lit room, gives you a wonderful sense of relief. If Agrippa were the first thing you saw in the game I'm sure your feelings towards him would be widely different.

I think these feelings of threat and safety are really important to most games. It's interesting to think about what cues people learn or assume signal safety. It's also interesting to think about the rhythms that people enjoy the most. If the game is too high intensity it can quickly be overwhelming, but in some games the intensity is really desired. Movies and books seem also have [emotional rhythms](http://hedonometer.org/books/v3/1777/) that are important to the story and engagement in the media.

The best writers, directors, and designers have an intuitive knack for when a story should be high or low, but I'm curious what deeper principles lie behind these rhythms. It's likely a whole mess of factors, including cognitive fatigue, other motivational rhythms, and perceptual expectations. These games certainly have shaped my expectations of calm.
<commit_msg>New blogpost - safety RIGHT DATE<commit_after>---
layout: post
title:  "Safety and threat in games"
date: 2017-01-03
categories: games
---

{% marginfigure "one" "assets/img/carveraffect.png" "The different emotions produced from successful approach or avoidance, from <a href=\"http://www.psy.miami.edu/faculty/ccarver/pPleasure.pdf\">Carver (2003)</a>" %}
{% newthought "Safety and threat" %} are interesting things in video games. In horror games this is something the designer explicitly plays with, trying to [spook you with their spooky spooks](https://youtu.be/vQN4UHM_PoU?t=4m40s). But the feeling of fear and calm occurs in most games. This seems to occur in any game where there are threats that have to be avoided or dealt with, producing relief when successful. What's interesting is how these feelings adapt based on your [expectations of survival and threat](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4364301/) in these games.

In the *Dark Souls* series the bonfire acts as a "save state" for your character, filling up your health and resources and providing a respawn point for the next time you will die{% sidenote "one" "[and you will die](https://www.youtube.com/watch?v=wYbOVTQnbAA)" %}. They often are placed just after dense areas populated by monsters, and once you get there you have an instant feeling of relief.

{% fullwidth "assets/img/darksoulsbonfire1.gif" "After the hardest point in the game, this feels so warm and cozy.  (<a href=\"http://zedotagger.deviantart.com/art/Dark-Souls-Solaire-537366036\">source</a>)" %}

Most games generally have the difficulty of a game fluctuate up and down, sustaining periods of high intensity followed by periods of soothing calm. Usually these periods of safety are strongly signaled by some *cue* in the environment. These cues have to be consistent, so that when you are in the safe zone you know you won't be attacked or threatened in any way. If the cues are inconsistent then they can't be trusted, and then no consistent feeling of safety occurs since you can't track how well you're avoiding threats.

{% marginfigure "two" "assets/img/l4dflow.png" "Flow diagram used by the *Left 4 Dead* AI director to control the zombie intensity. (<a href=\"http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf\">source</a>)" %}
In *Left 4 Dead* these spots are literally termed "safe houses", and provides complete safety from zombies. These spots are locked rooms enclosed and encased in concrete, providing clear prior cues to safety. These safe rooms are the safest parts of the game (besides the ending where you're rescued), but the threat fluctuates outside of the safe room. This graph shows the measured game intensity based on zombie population. The threat of zombies here is explicitly controlled based on the AI director, which tracks the intensity of the game and adaptively fluctuates it. Most games do the same thing, but usually just based on enemy placement in a level.

{% maincolumn "assets/img/l4dintensity.png" "Note that during the Relax period the intensity takes a while to drop down."%}

Games can play with these feelings of safety, playing with your expectations one way or the other. In the game [*Amnesia: The Dark Descent*](https://www.youtube.com/watch?v=9jWsiyXoTz0), you are tracked by a few unknown monsters throughout most of the game, and can hide in the dark at the risk of insanity. Most of the game present a fairly constant (though still fluctuating) state of fear. However a few moments of relative safety do occur, one being <NAME>.

{% maincolumn "assets/img/amnesia-the-dark-descent-agrippa.jpg" "<a href=\"https://youtu.be/syBkLLe-_nk?t=4m33s\">Hey buddy</a>" %}

Despite the way he looks, Agrippa becomes your best friend by the time you get to him. Later you have to saw off his head and shove it into your knapsack, which he very appreciates. At this point in the game you're on constant alert; scared of your own shadow. So having the first person you meet in the game so calmly talk to you, without any fear in a fairly brightly lit room, gives you a wonderful sense of relief. If Agrippa were the first thing you saw in the game I'm sure your feelings towards him would be widely different.

I think these feelings of threat and safety are really important to most games. It's interesting to think about what cues people learn or assume signal safety. It's also interesting to think about the rhythms that people enjoy the most. If the game is too high intensity it can quickly be overwhelming, but in some games the intensity is really desired. Movies and books seem also have [emotional rhythms](http://hedonometer.org/books/v3/1777/) that are important to the story and engagement in the media.

The best writers, directors, and designers have an intuitive knack for when a story should be high or low, but I'm curious what deeper principles lie behind these rhythms. It's likely a whole mess of factors, including cognitive fatigue, other motivational rhythms, and perceptual expectations. These games certainly have shaped my expectations of calm.

{'fraction_non_alphanumeric': 0.06691559398644001, 'fraction_numerical': 0.010219121548589958, 'mean_word_length': 4.6108048511576625, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 10, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4917343', 'n_tokens_mistral': 2802, 'n_tokens_neox': 2579, 'n_words': 1483}