Guide

Game footstep and noise detection systems explained

Harbor Ruins' patrol corridor was a straight metal catwalk with two guards on a fixed loop. Playtesters sprinted through on the first attempt and triggered both patrols at once. The second build made all footsteps silent unless the player crouched — which turned the level into a slow crawl with no tension. The shipped version uses a noise detection system where surface material, locomotion speed, and stance multiply into a loudness value that AI hears with distance falloff and wall occlusion. Metal grating at a walk is audible at 9 meters; rubber mats at a crouch-walk are barely 3. Players learn to route along carpet runners, time sprints across exposed plates, and throw bottles to bait patrols — the same warehouse that pairs with the stance refactor but adds spatial audio literacy as a skill.

Footstep systems sit between locomotion, audio design, and AI perception. They are not just WAV files on a timer: each step emits a noise event (or contributes to a continuous loudness field) that guards evaluate against hearing thresholds, alert states, and last-known-position memory. Gunshots, glass breaks, and ability activations share the same pipeline. This guide covers surface tagging, loudness bands, hearing radius math, occlusion and propagation, continuous vs discrete noise, alert escalation, multiplayer authority, the Harbor Ruins patrol corridor refactor, a technique decision table, pitfalls, and a production checklist.

What footstep and noise systems are

A footstep/noise system translates player and world actions into audible events that AI (and sometimes other players) can detect. Core responsibilities:

  • Surface classification — tag floors with material types (metal, wood, carpet, water, snow) that modify base loudness and pick footstep SFX variants.
  • Locomotion loudness — map walk, jog, sprint, crouch-walk, slide, and landing impulses to decibel-like scalar values the AI reads.
  • Event emission — broadcast noise at a world position with radius, optional duration, and category tags (footstep, gunshot, impact, voice).
  • Perceiver evaluation — each NPC with hearing checks distance, line-of-sight/occlusion, current alert state, and hearing acuity modifiers.
  • Alert integration — sub-threshold noise may raise suspicion; above-threshold triggers investigation or combat escalation per the stealth state machine.

Footsteps are usually rhythmic discrete events tied to animation notifies or stride distance. Other noises — explosions, doors, thrown objects — are one-shot events with larger radii. Both feed the same detection layer so designers tune one mental model.

Surface materials and footstep audio

Every walkable surface needs a physical material or gameplay tag that drives two outputs: the sound the player hears and the loudness the AI reads. Keep the schema small enough that level artists can paint consistently:

  • Hard resonant (metal, tile, marble) — high player volume, large AI radius multiplier (~1.2–1.5×).
  • Soft absorbent (carpet, moss, sand) — muted SFX, small radius (~0.5–0.7×).
  • Organic (wood, gravel, grass) — mid values; gravel crunches loudly but with shorter carry.
  • Liquid (shallow water, deep water) — splash layers; deep water may slow movement and add continuous slosh noise.
  • Broken glass / debris — one-shot loud events on first contact, then quieter crunches.

Use physics material callbacks or volume triggers under the nav mesh. Blend at edges (carpet meeting metal) by lerping loudness or picking dominant tag by contact area. Mismatched audio and detection — loud metal SFX on a silent carpet tag — destroys player trust instantly.

Stride-based footfall timing should respect animation: a sprint anim with fewer notifies on carpet still emits events at the correct cadence so AI does not hear “superhuman quiet sprinting.”

Loudness bands and locomotion coupling

Define a base loudness table per locomotion mode, then multiply by surface and stance modifiers. Example baseline (unitless 0–100 scale before radius conversion):

  • Crouch-walk — 15–25 (pairs with crouch stance).
  • Walk — 35–45.
  • Jog / combat run — 55–65.
  • Sprint — 80–95.
  • Land from height — impulse scaled by drop meters; roll landing reduces by 40–60%.
  • Slide entry — brief spike then sustained scrape while sliding.

Convert loudness to hearing radius with a curve, not linear scaling: radius = k * sqrt(loudness) or a designer- authored lookup table. Quiet steps should fall below ambient floor noise in loud environments (rain, machinery) so outdoor storm levels forgive jogs on mud.

Equipment modifiers add texture: heavy armor clanks (+10–20%), suppressed weapons swap gunshot events for subsonic cracks, mud on boots dampens temporarily after leaving a puddle. Document every multiplier in a spreadsheet the whole team shares.

AI hearing: radius, falloff, and occlusion

When a noise event fires at position P with loudness L, each potential listener at Q computes an effective intensity:

  1. Distance falloff — inverse-square or piecewise linear attenuation; cap max hearing range per enemy archetype (guard 12 m, elite soldier 18 m, blind creature 25 m).
  2. Occlusion — raycast or portal-graph attenuation through walls; a metal footstep behind two concrete walls might drop 50–70%.
  3. Height difference — optional vertical penalty for footsteps one floor above/below.
  4. Ambient mask — machinery zones raise the detection threshold so only loud events pierce.
  5. Alert state modifier — suspicious guards get +20–40% effective hearing; relaxed guards may ignore sub-threshold rustles.

Compare effective intensity to per-enemy hearing threshold. Below threshold: no reaction or slow suspicion creep on a meter. Above: turn toward noise origin, walk to last-known position, or escalate to search/combat per stealth mechanics design.

Performance: do not raycast every footstep for every NPC. Use spatial hashes, hearing grids, or aggregate footstep loudness per cell per tick for crowds; reserve full raycasts for suspicious events.

Discrete events vs continuous noise

Discrete events (footsteps, gunshots, door slams) carry position, loudness, category, and instigator ID. AI responds once per event with optional cooldown so sprint footsteps do not stack twenty alerts per second — instead, emit every Nth stride or use the loudest stride in a 200 ms window.

Continuous noise (running generators, fire, player humming a distraction tool) maintains a sphere or cone while active. Stealth games rarely use continuous player noise except for sustained actions like drilling a lock or carrying a beeping object.

Propagated alerts let one guard radio others: hearing a gunshot does not require every guard in the level to raycast the player — the witness broadcasts a shared alert level and approximate sector. Cap propagation so a pistol in the basement does not wake the entire open-world map unless that is intentional design.

Harbor Ruins patrol corridor refactor

The warehouse catwalk loop connected three problem spaces: resonant metal, a quiet office carpet spur, and an open loading dock with no cover. The refactor:

  1. Material paint pass — artists tagged grating, rubber mat runners, and concrete with distinct multipliers; mats placed along the intended stealth route.
  2. Loudness HUD debug — designers enabled a dev overlay showing emitted radius rings so sprint-on-metal was visibly suicidal.
  3. Patrol hearing tiers — front guard: threshold 40, rear guard: 55 (hard of hearing flavor + shorter cone overlap).
  4. Distraction props — throwable bottles emit noise 70 at impact, pulling both guards if thrown behind the rear post.
  5. Fail-forward — detection triggers lockdown lights but leaves a side vent open instead of instant fail state.

Completion time spread tightened: skilled players sprint the mat path in 22 seconds; cautious crouch-walkers take 48 seconds but never alert. “I outsmarted the patrol” survey scores rose 27 points versus the silent-foot binary build.

Technique decision table

Approach Best for Tradeoff
Footstep loudness + hearing radius Tactical stealth, immersive sims, extraction shooters Requires material tagging discipline and AI tuning per level
Binary detected / not (vision only) Arcade stealth, mobile games, tight budgets Less player expression; corridors feel arbitrary
Visibility meter only (light/shadow) Social stealth, horror hiding Ignores sound fantasy; pair with noise for realism
Noise as UI ping (sonar widget) Accessibility, hard-of-hearing players Can feel gamey; offer as optional assist
Full physics audio (Steam Audio, etc.) AAA fidelity, VR Expensive; still need gameplay loudness for AI

Common pitfalls

  • Silent sprint — animation plays run cycle but no events emit; AI looks blind.
  • Every step alerts — no stride throttling; walking on carpet still triggers search state.
  • Audio/detection mismatch — loud SFX on quiet tags teaches wrong lessons.
  • Uniform materials — entire level one tag; noise system adds complexity with no payoff.
  • Occlusion ignored — guards hear through five walls; players feel cheated.
  • Global alert broadcast — one bottle alerts fifty NPCs across the map.
  • No feedback loop — players cannot tell why they were heard; add subtle UI rim light or guard ear icons in debug.
  • Network desync — client-only footfall alerts in PvP; server must validate noise events.

Production checklist

  • Publish loudness table for all locomotion modes and stance modifiers.
  • Define surface material tag schema with radius multipliers and SFX sets.
  • Hook animation notifies or stride distance to footstep emission.
  • Implement distance falloff curve and per-archetype hearing thresholds.
  • Add wall occlusion attenuation with performance budget per frame.
  • Throttle sprint footstep events; aggregate or sample every N strides.
  • Wire noise events into alert state machine and last-known-position memory.
  • Place material variety on stealth routes so routing choices matter.
  • Author distraction props that emit categorically loud one-shot events.
  • Build designer debug overlay for noise radius visualization.
  • Test with subtitles-only and audio-only playstyles for parity.
  • Server-authoritative noise in multiplayer; replicate alert level not every step.
  • Playtest: can a new player cross the tutorial corridor without alert on second try?

Key takeaways

  • Footsteps are gameplay events — surface, speed, and stance set how far sound travels.
  • AI hearing needs falloff, occlusion, and alert-state modifiers to feel fair.
  • Material variety on the floor is level design for stealth, not just art.
  • Harbor Ruins fixed the patrol corridor with tagged mats, tiered guards, and throwable distractions.
  • Throttle discrete events and cap alert propagation so systems stay readable at scale.

Related reading