Sample Design Doc :
An excerpt from the Design Document. This section
dealt with our core gameplay – sneaking I made the following to illustrate what
I pictured our stealth system should be, before discussing it with our AI
programmer.
Stealth
Did you know 4 elements make up how the environment affects
the player?
In turn, based on the player character’s interaction with
the game environment, he becomes less, or more, noticeable to other NPCs,
whether they are friendly, neutral or hostile. In the case of Hostile NPCs, the
player will want to avoid them whenever possible, and so stealth becomes a
major focus of gameplay, as we strive to create a system both realistic and
versatile, yet remaining fun and intuitive.
Briefly, in order of importance:
Light: Light will make the player
more apparent, and thus, give him away to guards that are within visible range.
Likewise, areas of shadow make the player less visible, and areas of intense
darkness allow the player to become almost invisible
Movement: the faster the player moves,
the more likely he is to be spotted. This is combined with lights, so that
moving fast or for a long period of time will you more visible, even when
hiding in shadow.
Disguise: disguise plays a part in
stealth, as it decreases the power and range of a Guard’s ability to recognise
you and attack you. When a disguise is working it is a benefit to the main
character, increasing his ‘stealthiness’. When the player is recognised, the
disguise has a negative affect and making him more detectable to enemies.
Sound: the amount of noise the player
makes by moving over surfaces and interacting with the environment. Sound does
not directly affect the visibility of the player to guards, but it does leave
clues to where the player has been, and if loud enough, can quickly draw a lot
of unwanted attention.
So, the following is a basic outline for setting up a
stealth system that will work to make sure each action of the player is
represented by a change in his stealth
profile [I’m going to use this term to reflect all the aspects of the
environment’s effect on the player’s ability to remain unnoticed].
All
things factored the player is:
![]()
1 2 3 4 5 6
Invisible Lit
up like Xmas
The two main factors in stealth are Light and Movement, as
these, continually changing as the player progresses through a level, will be
the primary reasons why, and how, enemy NPCs will detect the player.
The lighting system will use the in-built character lighting
model of the engine, which lightens and darkens the character model according
to the level’s lighting. Several areas on the model will measure the amount of
light falling on the character, and the sum of the light will be taken for the
overall light value. This will measure areas of shadow (0 percent light) as
well as the intensity of the light the character is exposed to. For example, a
player may be semi-concealed from a powerful searchlight, but the areas exposed
are very brightly lit and thus have a high stealth profile. In contrast the
player may be standing fully exposed under a 20watt lightbulb, but the actual
light is so dim, the stealth profile is quite low.
The system outlined above means that the player will not
only need to register how much he is concealed, but also how bright the light
he is concealed from is. In the example given it may be a better choice for
him, to walk slowly under the lightbulb than to move quickly past the
searchlight, shadows aside, as the AMOUNT of light determines his stealthiness.
Example of Location Based Light
Detection
![]()
![]()
Head: 30/33%
Total Light Reading: 35%
![]()
Torso: 5/33%
![]()
Legs:
0/33%
![]()
In the example above, only the player’s head is exposed to
light, however, the light that he is exposed to is very bright, and so his
visibility is not that low (a little over a 1/3). If he were completely exposed
to alight that merely registered as 2% on all the sensor zones, he would still
be considered quite well hidden.
The light reading works closely with the movement rating…
<Queue movement>
Movement
Is simply calculated based on the input of the player. Each
speed of movement available to the player is rated, so for example:
Action Movement Rating
|
Standing still: |
0% |
|
Walking while crouched: |
15% |
|
Walking |
30% |
|
Jogging while crouched |
50% |
|
Jogging |
75% |
|
Running |
100% |
Therefore, it is always better to walk then run or jog, and
always better to move crouched rather than standing. However, when combined
with the issue of light, the decisions the player has to make become more
complicated; it may very well be better to run through a dimly-lit area and
take your chances, than try to creep under a 10,000watt floodlight.
The above example is just a selection of the player’s basic
moves. Naturally, all animations will have related movement values, so that
anything the player does, from quickly climbing up some vines, to creeping with
his back to a wall, to sliding down a cable, will affect his Stealth Profile
dynamically.
Movement also affects the amount of sound the player makes
on the type of surface he is moving over. This is discussed in more detail
below in the sound section. While sound will certainly attract the unwanted
attention of NPCs, like Disguise, it does not directly affect the Stealth
Profile.
Together, the player’s Light
rating and Movement Rating
provide a dynamic basis for how well avoiding being noticed, his Stealth
Profile. This is the major part of the system covered.
Disguise is a gameplay system that affects the player’s
stealth, as well as letting him access certain areas and talk to certain NPCs.
The player will be able to obtain disguises from various NPC
types (Scientist, Engineer, and Executive) and the impact on stealth will work
by changing the reaction distance and speed for NPCs that encounter the player
when wearing a disguise.
For example, an NPC who would become hostile to the player
at 30 meters and curious at 70, might now become hostile at 5, curious at 30,
and ignore the player beyond 70 meters. Here’s an example:
Player undisguised:
Range: 5m 15m 25m 35m 45m 55m 65m
75m
![]()
| | | | | | | |
![]()
Enemy Alerted (becomes
hostile) Curious (investigates player) Player
Player disguised:
Range: 5m 15m 25m 35m 45m 55m 65m
75m
![]()
| | | | | | | |
![]()
Enemy Alerted Curious ignored Player
So, in terms of stealth, disguise waylays the range, and
desire, of NPC’s to investigate or attack him on sight.
When the player is wearing a disguise, and his real identity is discovered, whether by getting too close to an NPC guard, drawing a weapon, attacking someone, or having the disguise’ previous owner discovered, the disguise will no longer be considered effective. The player will need to find another suitable ‘donor’ if he wishes to continue without being attacked automatically. Thus, the effect of the disguise is reversed when the player is found out. Instead of affording him a longer reaction time and wider berth around hostile NPCs he will now discover that NPs will attack him as soon as he comes within their visual range, regardless. The effectiveness of his disguise will need to be shown on-screen as a bar or icon, or on the player model himself (perhaps turning transparent as the effectiveness gets reduced.)
Sound will work on a global system, where every material,
and certain character actions, will have a sound rating assigned by the
designers. These sounds will be picked up by NPCs and some interactive objects,
when they fall within their detection radii. This ‘Sound Scale’ works in the
background, and does not actually represent the sound the player will hear.
Rather, the Sound Rating is a value given to a material that will be sent out
to any NPC’s within hearing distance, when something comes in contact with it,
that tells that NPC how load a sound he heard. This allows us to configure NPCs
to react differently to different sound events.
The Global Sound Scale
|
0 |
1 |
2 |
3 |
4 |
5 |
|
Inaudible |
Barely audible |
Soft |
Noticeable |
Loud |
Very loud |
The system I propose is this: Each surface material, be it
horizontal, vertical or sloped, will have a sound rating assigned. This rating
reflects the sound made when the character moves over it at a crawl. This means that for each speed of
movement, the noise generated will go up one point. For example:
Material Type: WoodSound Rating: 1 Sound Rating Results: Walking: 1 Jogging: 2 Running/jumping: 3 |
Or
Material Type: MetalSound Rating: 3 Sound Rating Results: Walking: 3 Jogging: 4 Running/jumping: 5 |
Walking on a surface with a sound rating of 0, the player
could be mere inches from an enemy without them noticing anything. On the other
end of the scale, if the player were running on metal then all NPC’s that were
within range of the sound would be on him like a tonne of bricks
The sound rating also provides the level of noise a surface
will make when something is thrown at, or on it. So when the player picks up a
jar of syrup, and throws it onto a carpeted floor, the sound that it makes will
be of the rating specified by the designer. This means that, for simplicity’s
sake, the sound rating a coin makes when thrown onto a wooden floor would be
the same as that of a plaster garden gnome. This is not highly realistic, but
it makes things a great deal easier when calculating a global sound scale.
The Sound Scale doesn’t just apply to materials though.
Certain events and animations will have Sound Ratings applied. For instance,
each weapon will have a volume attributed to it so that NPCs can be made aware
of when a gun is fired or a grenade detonated, even if they are not within
visible range. Also, certain designer-placed triggers may cause sound events,
like when the player opens a squeaky door, uses a certain item, or struggles
with an NPC.
The Sound Rating is merely a way to make sure the player is
punished or rewarded based on his interactions with noisy elements of the game.