Log inGet started
World

SURF VOID

Branchmain
Branchesmain
Commit7dcdd2cd6c

README.md

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 while phase == "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 with Rules.state.speedU (full at windFullSpeed).
  • hiss (surf_hiss.soundClip) — surf-slide loop, plays while Rules.state.surfing, stops when it clears.
  • One-shots: jump, land (volume/pitch scaled by land(impactU)), checkpoint (pitch steps up per CP), respawn (also on restart), finish, click (on begin = Enter on the title, softer on start).

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).