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
| Category | Use Case |
|---|---|
enemy | FlowerTrap snaps, PathMonster charges |
ambient | Forest wind, crickets, leaves |
player | Footsteps, breathing, interaction sounds |
ui | Menu clicks, notifications |
music | Background 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
| Entity | Sounds |
|---|---|
| FlowerTrap | emerge, chase, snap, idle |
| PathMonster | warning, charge, roar, grab |
| RootSnare | emerge, snap |
| TreeBranchSnatcher | creak, drop |
| GigglingBush | giggle, attack |
| Watcher | ambient, pursuit, screech |
Volume Presets
| Preset | Volume | Use Case |
|---|---|---|
subtle | Low | Ambient rustling, distant sounds |
normal | Medium | Standard gameplay sounds |
loud | High | Attacks, death screams, alerts |
Sound Asset Registry
src/shared/utils/sounds.ts — Central manifest of Roblox audio asset IDs:
InsanityBuzz— Plays during high insanityGongVibration— Safe zone arrivalForestAmbience— Baseline ambient layerRootSnareImpact— 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