< Return to Video

How Stealth Game Guards See and Hear | School of Stealth Part 1

  • 0:04 - 0:09
    There aren’t many genres with such a strong
    core fantasy, as the stealth game.
  • 0:09 - 0:15
    These are games about staying unseen, and
    then striking from the shadows.
  • 0:15 - 0:19
    About outsmarting an entire army of enemies,
    without them even knowing you exist.
  • 0:19 - 0:25
    These are games about spies, assassins,
    and, uh, Batmen.
  • 0:25 - 0:29
    But making this fantasy work means balancing
    a number of complicated game systems: from
  • 0:29 - 0:34
    enemy awareness, to information gathering,
    to robust detection systems.
  • 0:34 - 0:38
    Get any of them wrong, and the whole thing
    can crumple in on itself.
  • 0:38 - 0:41
    So, welcome to the School of Stealth.
  • 0:41 - 0:46
    This is a short, GMTK mini-series about how
    stealth games work.
  • 0:46 - 0:51
    In each episode, I’m going to take one system
    from the stealth game formula and break down how
  • 0:51 - 0:57
    it works - looking, where necessary, at the
    technical side of things, the design considerations,
  • 0:57 - 0:59
    and the end user experience.
  • 0:59 - 1:04
    For episode one, we need to start where most
    stealth games begin: with the player being
  • 1:04 - 1:05
    hidden.
  • 1:05 - 1:12
    And then ask ourselves: how do guards actually
    see and hear the player?
  • 1:12 - 1:17
    Ultimately, guards in games are given virtual
    eyes and ears that are designed to simulate
  • 1:17 - 1:22
    the two main human senses: sight and sound.
  • 1:22 - 1:28
    To simulate vision, video game guards typically
    have a viewcone - which is an invisible, cheese-like
  • 1:28 - 1:30
    entity that is stuck to the enemy’s face.
  • 1:30 - 1:34
    If the player character enters the cone, they
    get detected.
  • 1:34 - 1:37
    It’s a touch more complicated than that,
    of course.
  • 1:37 - 1:42
    A simple cone would allow characters to stay
    unseen even if they were right next to the
  • 1:42 - 1:45
    enemy - so more complex shapes are often used.
  • 1:45 - 1:50
    In Splinter Cell Blacklist, there’s a basic
    vision cone for the guard’s primary sightline,
  • 1:50 - 1:54
    but a second, much wider box to simulate peripheral
    vision.
  • 1:54 - 1:59
    And even a small area behind the guard to
    mimic that sixth sense of knowing when someone’s
  • 1:59 - 2:01
    just over your shoulder.
  • 2:01 - 2:05
    Developers will also need to consider the
    height of the cone, depending on whether the
  • 2:05 - 2:09
    character should be able to hide when they’re
    above enemies.
  • 2:09 - 2:14
    To know if the player is in cover, a game
    will typically use a raycast - which is basically
  • 2:14 - 2:20
    when an invisible line is drawn between two
    elements to see - in this case - if anything
  • 2:20 - 2:21
    is in the way.
  • 2:21 - 2:27
    You can make this more complex to catch moments
    of partial cover: so, in Splinter Cell, the
  • 2:27 - 2:32
    enemy raycasts to eight different bones in
    Sam Fisher’s player model - and will only
  • 2:32 - 2:35
    spot him if a certain number are visible.
  • 2:35 - 2:42
    Now, if the player enters the cone and isn’t
    in cover, they probably don’t get immediately spotted.
  • 2:42 - 2:46
    Instead, the guard’s awareness of the player
    starts to grow.
  • 2:46 - 2:51
    The speed at which this meter fills might
    be slower if the character is further away,
  • 2:51 - 2:56
    or only in the guard’s peripheral vision,
    or in low light, or crouching down, or
  • 2:56 - 2:58
    staying perfectly still.
  • 2:58 - 3:02
    When the meter tops out, though, the guard
    will know exactly where you are.
  • 3:02 - 3:06
    It’s also important to note that guards
    can be aware of more than just the player
  • 3:06 - 3:10
    character - such as open doors, interesting
    objects, or dead bodies.
  • 3:10 - 3:15
    This can be used to make interesting plans
    like traps and distractions - but it can also
  • 3:15 - 3:19
    help give the impression of intelligence and
    awareness.
  • 3:19 - 3:22
    Now, simulating hearing is a different problem.
  • 3:22 - 3:27
    When you make a sound, like firing a gun,
    walking on a loud floor board, or throwing
  • 3:27 - 3:33
    a stone - the sound will be given a distance
    - related to the volume of that noise.
  • 3:33 - 3:37
    Any guard who is within that distance can
    then be told to go check out the source of
  • 3:37 - 3:39
    the sound.
  • 3:39 - 3:44
    However, a straight line between the sound
    and the guard won’t work, because we expect
  • 3:44 - 3:46
    noises to be muffled by walls.
  • 3:46 - 3:52
    So the typical solution is to use the game’s
    pathfinding system - the same tech that allows
  • 3:52 - 3:56
    an enemy to find their way around a world
    without bumping into objects.
  • 3:56 - 4:01
    Make the sound travel across that, and you’ll
    more realistically capture the way sound propagates
  • 4:01 - 4:04
    through an environment in real life.
  • 4:04 - 4:09
    That’s the gist of things, then, but more
    complex stuff might be included in certain
  • 4:09 - 4:14
    games - for example, in Thief, guards can
    have second-hand information about the player
  • 4:14 - 4:17
    based on what other enemies are up to.
  • 4:17 - 4:22
    And in Hitman 2, enforcer characters are way
    less perceptive of Agent 47 if he’s facing
  • 4:22 - 4:26
    away from them, which gives disguises more
    power.
  • 4:26 - 4:32
    Links to more detailed technical information
    can be found in the description beneath this video.
  • 4:32 - 4:38
    When done well, this system should create
    a pretty realistic representation of a human’s
  • 4:38 - 4:41
    visual and auditory perception.
  • 4:41 - 4:45
    You can then make educated decisions about
    where you will be safe, using your real-world
  • 4:45 - 4:50
    knowledge of how sight works in different
    light conditions, or how sound might be muffled
  • 4:50 - 4:51
    by a wall.
  • 4:51 - 4:55
    But there’s always going to be a certain
    level of ambiguity for the player to deal
  • 4:55 - 4:58
    with - which can lead to friction and frustration.
  • 4:58 - 5:02
    I’m sure you’ve played a stealth game
    where you thought you were totally invisible,
  • 5:02 - 5:04
    but the guard saw you anyway.
  • 5:04 - 5:08
    So to help players make sense of this stuff,
    there’s a few smart ways that devs can make
  • 5:08 - 5:11
    these perception systems more obvious.
  • 5:11 - 5:14
    The first is helpful interface elements.
  • 5:14 - 5:19
    Even way back in Thief, the developers knew
    that it was tough for players to understand
  • 5:19 - 5:24
    how lit their character was from a first-person
    perspective, so there’s a light gem at the
  • 5:24 - 5:28
    bottom of the screen to show your current
    visibility.
  • 5:28 - 5:32
    And in Splinter Cell, the awkward challenge
    of knowing how much sound you’re making,
  • 5:32 - 5:36
    is helped by a visualiser on Sam’s head’s
    up display.
  • 5:36 - 5:41
    Also, most games have some kind of detection
    indicator on their interface, which mimics
  • 5:41 - 5:43
    the guard’s awareness meter from earlier.
  • 5:43 - 5:47
    This helps the player know that they’re
    about to be made - and sometimes even shows
  • 5:47 - 5:50
    you the location of the guard who’s seen
    you.
  • 5:50 - 5:55
    Next up is using animation and audio to help
    communicate a guard’s status to the player.
  • 5:55 - 6:01
    A guard who is idly lazing about might suggest
    that they have pretty weak perception, but
  • 6:01 - 6:07
    a suspicious enemy with their weapon raised
    will be way more alert to potential threats.
  • 6:07 - 6:11
    Audio barks also let you know that the guard
    is starting to become aware of you.
  • 6:11 - 6:14
    Then there are refuge spaces.
  • 6:14 - 6:17
    These are places in the game world where,
    in normal circumstances,
  • 6:17 - 6:19
    you are unambiguously hidden.
  • 6:19 - 6:25
    That might be the high-up gargoyles in Batman,
    or areas of long grass in Assassin’s Creed,
  • 6:25 - 6:28
    or crates and cupboards in Hitman.
  • 6:28 - 6:34
    These give you at least one place where you
    can scout and plan from a position of total safety.
  • 6:34 - 6:40
    Another big solution is player favouring - which
    is the art of handicapping systems to bias
  • 6:40 - 6:41
    the player.
  • 6:41 - 6:45
    As Splinter Cell Blacklist programmer Martin
    Walsh says, “it doesn’t matter what the
  • 6:45 - 6:49
    NPC can see or hear from a simulation perspective.
  • 6:49 - 6:55
    It’s what the player thinks the NPC should
    be able to see or hear”.
  • 6:55 - 7:00
    So in his game, a guard’s hearing is reduced
    by half when they’re offscreen, because
  • 7:00 - 7:04
    it feels unfair to be heard by someone you
    can’t even see.
  • 7:04 - 7:09
    And in The Last of Us, enemies typically raycast
    to Joel’s head to determine line of sight
  • 7:09 - 7:14
    - but that changes to his chest when he’s
    crouching, to let him peep over cover without
  • 7:14 - 7:16
    being spotted.
  • 7:16 - 7:21
    And then the biggest help of all, as discussed
    earlier, is a fuzzy detection system.
  • 7:21 - 7:26
    If you were immediately spotted when you touched
    the guard’s vision cone, that wouldn’t
  • 7:26 - 7:27
    feel very fair.
  • 7:27 - 7:32
    So it makes sense that guards take a few moments
    to become aware of your presence before being
  • 7:32 - 7:34
    totally alerted.
  • 7:34 - 7:40
    Now there’s one final, and rather bold solution
    to this problem: and that’s to simply reveal
  • 7:40 - 7:42
    these systems to the player.
  • 7:42 - 7:47
    In the excellent side-scrolling sneak ‘em
    up Mark of the Ninja, the guard’s perception
  • 7:47 - 7:50
    is about as unambiguous as you can get:
  • 7:50 - 7:53
    Their vision cones are displayed on screen.
  • 7:53 - 7:58
    The ninja is either in shadow or in light
    - and that’s shown on the character’s sprite.
  • 7:58 - 8:04
    And when you make noises, you can see them
    emanating from the source as big round pulses.
  • 8:04 - 8:09
    This is also shown to you before you even
    make the noise, which is helpful for knowing
  • 8:09 - 8:14
    whether your noisy distraction or sneaky getaway
    will be successful.
  • 8:14 - 8:19
    With the info on screen, there’s no arguing
    about what’s happening in the system.
  • 8:19 - 8:22
    You’re either in the cone, or you’re not.
  • 8:22 - 8:26
    And that sound either reached the guard’s
    ears, or it didn’t.
  • 8:26 - 8:31
    And so Ninja’s binary perception system
    can be paired up with a totally binary detection
  • 8:31 - 8:38
    system of instant awareness - though, there
    is a slight analogue fuzziness on the very
  • 8:38 - 8:39
    edges of the enemy’s view cones.
  • 8:39 - 8:41
    GUARD: "Is someone up there?"
  • 8:41 - 8:46
    For a slightly more nuanced take on this,
    check out Shadow Tactics: Blades of the Shogun.
  • 8:46 - 8:52
    Here, the vision cone is split into three
    zones: the bright green part near the enemy’s
  • 8:52 - 8:57
    face is the danger zone and leads to a pretty
    instantaneous detection.
  • 8:57 - 9:02
    In the dark green part, you can stay hidden
    if you’re crouched down, but will be spotted
  • 9:02 - 9:03
    if you stand up.
  • 9:03 - 9:08
    And the dotted part is for refuge zones like
    bushes and high grass, where you will always
  • 9:08 - 9:10
    be invisible.
  • 9:10 - 9:15
    If you do trip the viewcone, the whole cone
    will fill up with yellow - and if the yellow
  • 9:15 - 9:18
    part touches your character, you’re spotted.
  • 9:18 - 9:24
    It’s a very elegant way of displaying all
    the necessary information, right there on screen.
  • 9:24 - 9:29
    Of course, it’s a lot harder to show this
    sort of stuff in a fully 3D game.
  • 9:29 - 9:33
    The original Metal Gear Solid’s solution
    was to simply photocopy the game world into
  • 9:33 - 9:39
    a top-down, 2D representation on your radar,
    and then draw the vision cones on that.
  • 9:39 - 9:46
    It’s a sorta hand-wavey solution that’s
    still being used in games like Deus Ex: Mankind Divided.
  • 9:46 - 9:47
    But it’s not impossible.
  • 9:47 - 9:53
    The Sly Cooper series has guards with torches
    that cast obvious pools of yellow light.
  • 9:53 - 9:59
    If you find yourself inside the light, you
    get spotted - but otherwise you’re safe.
  • 9:59 - 10:00
    Cartoony, yes.
  • 10:00 - 10:04
    But also, immediately readable.
  • 10:04 - 10:10
    The most important thing, though, is the experience
    that these different perception systems lead to.
  • 10:10 - 10:15
    When the system is made analogue and ambiguous,
    the player must evaluate the environment with
  • 10:15 - 10:20
    an immersive and realistic understanding of
    light, shadow, distance, and sound.
  • 10:20 - 10:26
    And it also gives the game a certain level
    of tension - where you can never been 100%
  • 10:26 - 10:27
    sure that you’re safe.
  • 10:27 - 10:32
    And I think this fits quite nicely with the
    core stealth fantasy: these are games where
  • 10:32 - 10:37
    your power doesn’t come through sheer brute
    force, but only through your ability to hide
  • 10:37 - 10:39
    from the enemy.
  • 10:39 - 10:43
    So having your sneaky status be fragile and
    fuzzy reminds you that you’re always at
  • 10:43 - 10:47
    risk of losing your tenuous advantage over
    the enemy.
  • 10:47 - 10:51
    As Thief programmer Tom Leonard says, “it's
    about getting the player's heart pounding
  • 10:51 - 10:54
    by holding them on the cusp” of being found.
  • 10:54 - 10:59
    And it’s especially important to hide this
    stuff in survival horror games that borrow
  • 10:59 - 11:00
    stealth elements.
  • 11:00 - 11:05
    In a game like Alien Isolation, it would be
    rubbish if you could see exactly where the
  • 11:05 - 11:06
    Xenomorph was looking.
  • 11:06 - 11:13
    A huge amount of fear and anxiety is derived
    from your shaky knowledge of the alien’s senses.
  • 11:13 - 11:16
    But making the system completely obvious has
    its own advantages.
  • 11:16 - 11:21
    It puts way more power in your hands, and
    allows you to play with a huge amount of confidence.
  • 11:21 - 11:27
    You can feel more like an apex predator, luring
    enemies into traps or sneaking in for a silent kill.
  • 11:27 - 11:32
    As Ninja producer Jamie Cheng put it, “as
    we were iterating, I found that I wasn't nearly
  • 11:32 - 11:37
    as interested in guessing whether a guard
    would hear me or not, and way more interested
  • 11:37 - 11:39
    in creating an elaborate death trap”.
  • 11:39 - 11:45
    Of course, the predator feel can be achieved
    through other methods, like those aforementioned
  • 11:45 - 11:50
    refuge zones and by giving the player a bucketload
    of gadgets and super powers - but the more
  • 11:50 - 11:54
    accurately they can predict the enemy’s
    perception, the quicker the player will get
  • 11:54 - 11:56
    to that experience.
  • 11:57 - 11:59
    So, that’s it for lesson one.
  • 11:59 - 12:04
    Stealth game guards see and hear through a
    system of simulated eyes and ears - and developers
  • 12:04 - 12:09
    can create very different experiences, depending
    on how much of that system they surface to
  • 12:09 - 12:11
    the player.
  • 12:11 - 12:15
    Come back next time for more deep dives into
    sneak ‘em up design.
  • 12:15 - 12:19
    And if you subscribe to my channel, you’ll
    get access to the new episode as soon as it
  • 12:19 - 12:20
    goes live.
  • 12:23 - 12:24
    Hey. Thanks for watching.
  • 12:24 - 12:29
    I hope you’re all doing okay in the midst
    of this awful coronavirus pandemic.
  • 12:29 - 12:33
    It’s such a scary situation, so please stay
    safe, wash your hands,
  • 12:33 - 12:36
    and follow the necessary guidelines.
  • 12:36 - 12:40
    I’ll do my best to keep making interesting
    stuff to keep you busy and entertained.
Title:
How Stealth Game Guards See and Hear | School of Stealth Part 1
Description:

more » « less
Video Language:
English
Duration:
12:43

English subtitles

Revisions