Skip to main content

Audio System

Woodlands uses 3D spatial audio for enemy sounds and ambient atmosphere.

Spatial Audio Controller

SpatialAudioController manages positional audio playback with per-category volume control.

Categories

CategoryUse Case
enemyFlowerTrap snaps, PathMonster charges
ambientForest wind, crickets, leaves
playerFootsteps, breathing, interaction sounds
uiMenu clicks, notifications
musicBackground score (3 intensity tiers)

Methods

// Play a sound at a world position
playAtPosition(soundId: string, position: Vector3, category: string)

// Attach sound to a moving part (follows it)
attachToPart(soundId: string, part: BasePart, category: string)

// Stop a playing sound
stopSound(soundInstance: Sound)

Sounds auto-cleanup when playback ends. Rolloff modes are configurable per sound.

Enemy Sound Registry

enemy-sounds.ts defines audio asset IDs and volume presets per enemy type:

Sound Events by Entity

EntitySounds
FlowerTrapemerge, chase, snap, idle
PathMonsterwarning, charge, roar, grab
RootSnareemerge, snap
TreeBranchSnatchercreak, drop
GigglingBushgiggle, attack
Watcherambient, pursuit, screech

Volume Presets

PresetVolumeUse Case
subtleLowAmbient rustling, distant sounds
normalMediumStandard gameplay sounds
loudHighAttacks, death screams, alerts

Sound Asset Registry

src/shared/utils/sounds.ts — Central manifest of Roblox audio asset IDs:

  • InsanityBuzz — Plays during high insanity
  • GongVibration — Safe zone arrival
  • ForestAmbience — Baseline ambient layer
  • RootSnareImpact — Snare trigger feedback

MVP Audio Targets (from GDD)

  • 3D spatial audio with stereo panning, distance falloff, threat prioritization
  • Surface-dependent footsteps (dirt vs grass)
  • Sprint breathing (calm → heavy)
  • Quirkymal vocalizations (fear squeaks, relief sigh)
  • 3 music intensity tiers (markers 1-10, 11-20, 21-30) + safe zone calm