◇
component · drop-in viewer
SurfAudio
SURF VOID's sound, driven entirely by `game.rules` events and `Rules.state`. Lives on the scene's `game` entity; the AudioListener is on the player camera. In play it spawns one temporary child root `SurfAudio_root` with a non-spatial `Audio` source per voice (despawned on destro…
by·posted 6d ago
What it does
SurfAudio
SURF VOID's sound, driven entirely by game.rules events and Rules.state. Lives on the scene's game entity; the AudioListener is on the player camera. In play it spawns one temporary child root SurfAudio_root with a non-spatial Audio source per voice (despawned on destroy, never saved).
Voices (clips under /zero/source/game/audio/)
music_title(music_title.soundClip, 45 s calm synthwave) — audible whilephase == "title".music_run(music_run.soundClip, 60 s driving synthwave) — audible in ready/running/finished; ducked under the finish fanfare.wind(wind_loop.soundClip) — air-rush loop; volume and pitch rise withRules.state.speedU(full atwindFullSpeed).hiss(surf_hiss.soundClip) — surf-slide loop, plays whileRules.state.surfing, stops when it clears.- One-shots:
jump,land(volume/pitch scaled byland(impactU)),checkpoint(pitch steps up per CP),respawn(also onrestart),finish,click(onbegin= Enter on the title, softer onstart).
Public fields
masterMusic,titleMusic— music deck levels (0..1).windMax,windFullSpeed— wind level at full speed and the u/s that reaches it.hissLevel,sfxLevel— surf hiss and one-shot levels.- Readouts:
windVolume,windPitch,hissVolume,lastEvent.
Methods
:voice(name)— the Audio component behind a voice.:report()—{ [voice] = { playing, mixer, volume, pitch, why } }.
Mixer channels: music, ambient, sfx (turn groups down with audio.setChannelVolume).
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.