Files
skate-3-rust-engine/mods/world-audio-test/mod.json
T
Hails a4ec831a02 Audio: host clock on physics steps, review fixes, world / NPC audio hook-in
Review fixes:
- The audio host takes each physics step exactly once (one-step pulses latched, nothing while paused or silenced,
  at most 4 steps per frame), so pushes and other one-frame events are never dropped or doubled. e2e at 60 fps and
  above is byte-identical; 30 / 45 fps change only by the latch and the step pair.
- Removed the emitter PROFILES fallback, the stray trace dump and the audition script; data-gated tests are
  #[ignore = "needs the private install data"] and fail loudly when run without it; per-post log lines behind
  SKATE_AUDIO_TRACE; checked bank parsing, finite output, camera-cut Doppler reset, fewer render allocations.
- The 15 verdict-settled A/B switches are removed; their "on" behaviour is the only one (byte-identical).

World / NPC audio, hookable by engine systems and mods:
- Map-change fix: world and NPC hosts reset when the map's banks are unloaded, so surviving objects sound again.
- Engine surface (skate-game::world_audio): TrafficAudio / PedAudio / NpcSkaterAudio components, horn / alarm /
  speech messages, read-back of who is audible; retail limits (4 cars within 40 m, 15 peds within 50 m with
  footsteps for the nearest 3, one NPC skater within 30 m), measured in the recompilation.
- Mod surface (Lua API 2, `sdk.world_audio.*`); test mod `mods/world-audio-test/` (cars, peds, a ghost skater).
- Per-skater audio state builder (local player output identical); remote players take the NPC skater slot; an
  opt-in non-retail "more audible" setting.
- Docs: doc 15 "Hooking up world audio", doc 11 sections, PR plan.
2026-10-03 16:21:12 -06:00

60 lines
2.1 KiB
JSON

{
"id": "dev-world-audio-test",
"api": 2,
"name": "World Audio Test (dev)",
"version": "0.1.0",
"author": "Hails",
"description": "Dev only (PR #32): publishes traffic, pedestrians and a ghost NPC skater around the spot where it is enabled, through sdk.world_audio, so the retail world audio can be heard before the engine has a living world. Cars loop on four lanes (C00-C08 engine records) with honks and skids; F8 fires the parked car's alarm. Peds walk, jog and run, and react to you (warn, cheer, slam). The ghost replays one of your recorded audio state logs (logs/<name>.tsv in this folder, or SKATE_AUDIO_STATE_LOGS). F9 re-centres everything on you. Boxes show who is audible (green) or not (grey).",
"entry": "main.lua",
"settings": {
"cars": {
"type": "boolean",
"label": "Cars",
"description": "Sixteen cars on four lanes (one parked, for the alarm).",
"default": true
},
"peds": {
"type": "boolean",
"label": "Pedestrians",
"description": "Twenty pedestrians walking, jogging and running on lines.",
"default": true
},
"ghost": {
"type": "boolean",
"label": "Ghost skater",
"description": "A ghost NPC skater replaying a recorded audio state log.",
"default": true
},
"ghost_log": {
"type": "string",
"label": "Ghost log",
"description": "The state log's name without .tsv (logs/<name>.tsv here, or in SKATE_AUDIO_STATE_LOGS).",
"default": "state_20261003_143434"
},
"ghost_from": {
"type": "number",
"label": "Ghost window start (s)",
"description": "Where in the log the ghost's 20 s loop starts.",
"default": 30,
"min": 0,
"max": 3600,
"step": 5
},
"boxes": {
"type": "boolean",
"label": "Boxes",
"description": "Debug boxes: green = holds an audio instance (audible), grey = not.",
"default": true
},
"speed_scale": {
"type": "number",
"label": "Traffic speed",
"description": "Scales the cars' 8-15 m/s cruising speeds.",
"default": 1,
"min": 0.25,
"max": 2,
"step": 0.25
}
}
}