Files
Papay-Shooter/docs/SOUND_DESIGN.md
T
Nicholas ButzkeandClaude Fable 5 d05477c135 feat: Sketchfab-to-game character pipeline, FP/TP animated views, client-auth netcode, audio system
Character pipeline (tools/):
- sketchfab_import.py: search/download via Sketchfab Download API with
  license/attribution tracking (SKETCHFAB_API_TOKEN)
- autorig.py: headless Blender auto-rig — fits a Mixamo-named skeleton
  to unrigged humanoids, binds automatic weights
- merge_animations.py: merges the shared Mixamo-skeleton animation
  library onto any rigged character, strips root motion, canonical names
- pipeline.py: one command chains download -> rig -> animate -> register

In-game skin system:
- SkinManager autoload reads skins.json (auto-written by the pipeline)
- SkinnedPlayerModel rewritten: canonical clips with fallback chains,
  blend times, speed-scaled locomotion, weapon bone attachment
- First-person: full animated body for the owner, head hidden via
  SkeletonModifier3D; third-person: full model for other players
- Skin selector in main menu; skin id synced in multiplayer
- Fixed GLBLoader crash (GLTFDocument.get_animation_count doesn't exist)

Multiplayer sync overhaul:
- Movement is now client-authoritative: the owning peer simulates
  locally (no input round-trip), server keeps health/kills/death
- Remote players interpolate synced_position/velocity with
  extrapolation and snap-on-teleport
- Knockback/impulses routed to the simulating peer

Audio:
- AudioManager autoload: SFX/Weapons/Footsteps/UI/Music buses, pooled
  3D players, variation + pitch randomization, auto-registration from
  assets/sounds

Docs: 3D_ASSET_PIPELINE.md rewritten end-to-end, new ASSET_SOURCES.md
(non-procedural animation/map/sound sources) and SOUND_DESIGN.md.
Verified with debug/spawn_smoke_test.gd (headless: 24/24 checks pass).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-06 02:28:58 -04:00

68 lines
2.9 KiB
Markdown

# Sound Design Plan
The current sounds are procedurally generated sine/noise blends
(`generate_sounds.py`) — functional, but robotic. This doc is the path to
real sound design with zero budget.
## What's in place now
`AudioManager` (autoload, `globals/audio_manager.gd`) provides the plumbing
good sound design needs:
- **Bus layout**: `Master ← SFX ← {Weapons, Footsteps, UI}`, `Master ← Music`
— created automatically at boot, so volume sliders and effects (EQ,
compression, reverb zones) can target categories.
- **Variation playback**: drop `footstep_01.wav`, `footstep_02.wav`,
`footstep_03.wav` into `assets/sounds/` and `AudioManager.play_3d("footstep", pos)`
picks one at random.
- **Pitch randomization**: every playback is pitched ±6% by default — the
single cheapest trick to stop repeated sounds sounding fake.
- **Pooled 3D players**: `play_3d()` is safe to call every frame; no node
churn, no cut-off management.
```gdscript
# anywhere in gameplay code:
AudioManager.play_3d("ak47_fire", muzzle.global_position)
AudioManager.play_ui("hit_confirm")
```
## Replacing the procedural sounds (priority order)
Sound is ~50% of "game feel" in an FPS. Replace in this order:
1. **Weapon fire** (heard constantly): layered = body (low thump) + crack
(mid transient) + tail (room reflection). Sonniss GDC packs have complete
layered gunshots. One file per weapon is fine to start; add `_01.._03`
variations later.
2. **Hit confirm + kill confirm**: short, bright, satisfying (this is the
"touchdown" pillar in the design doc).
3. **Footsteps**: 4+ variations minimum, quieter than you think, on the
`Footsteps` bus so they can be ducked while firing.
4. **Movement verbs**: slide (cloth+concrete scrape), dash (air whoosh),
wall-run loop, jump/land (land intensity scaled by fall speed).
5. **Ambience**: a quiet room tone per map kills the "dead air" feeling.
6. **UI**: menu hover/click/equip from a Kenney UI pack.
Where to get files: see [ASSET_SOURCES.md](ASSET_SOURCES.md#sounds) —
Sonniss GDC bundles first, Kenney CC0 packs second, Freesound (CC0 filter)
for gaps.
## Conventions
- Files: `assets/sounds/<event>[_NN].wav` — 44.1 kHz, 16-bit, mono for 3D
positional sounds, stereo only for UI/music.
- Ids are auto-registered from filenames at boot (`ak47_fire.wav`
`"ak47_fire"`). Names containing `fire`/`reload` route to the Weapons bus,
`footstep` to Footsteps, everything else to SFX
(see `BUS_HINTS` in audio_manager.gd).
- Keep source loudness consistent: normalize weapon shots to about -6 dBFS
peak, footsteps/foley around -18 dBFS.
## Later polish (cheap wins, in order)
1. Distance low-pass on the Weapons bus (far gunfire sounds muffled).
2. A short duck (sidechain) on Footsteps/ambience when local weapon fires.
3. Reverb `AudioEffectReverb` per-map on SFX for indoor spaces.
4. Surface-dependent footsteps: raycast down, map material → sound id
(`footstep_metal`, `footstep_concrete`).