Log inGet started
World

First Light: Lavic Odyssey

Branchmain
Branchesmain
Commit1698ee71e5

README.md

game.sound.Sound — the ear of the game

Mounted by the scene entrypoint on mount_sound, in edit and in play alike. It owns three jobs and nothing else.

It keeps game.sound.sfx alive and ticking. The bank, the emitters, the duck envelope, the bed and music crossfades — all of that advances from this component's update, so any slice can call sfx.duck or sfx.play from anywhere and have it reach the mix.

It turns the events on L.bus into sound.

eventwhat is heard
helmhelm_off / helm_on
emberHitember_hit, pitched slightly differently each time
plateCrumbleplate_collapse, from where the plate was
freeProgressthe free_hold loop, rising in pitch with the hold
knightFreedknight_free at the knight, and a duck under it
won / lostthe sting, and a duck under it
phasethe score crossfades to the track that phase wants
cutscenethe mix ducks while the camera is away

It reads the round and moves the mix under it. The tide below rises with the lava's proximity and falls as the dawn comes on; the air at the rim rises with L.dawn(); the score runs music_title at the title, music_climb up the spire, music_dawn over the last of the climb and the win, and the synthesised drone if a generated track is missing. And it watches the pilgrim themself: footsteps accumulate over distance walked, a jump and a landing come out of the vertical speed, and the tide bubbles at the surface whenever the lava is close enough to hear.

Everything it spawns belongs to the sfx library and is temporary, so a scene reload takes it. It never touches another slice's entities.