Log inGet started
World

First Light: Goura

Branchmain
Branchesmain
Commite917faa950

README.md

Soundscape

The sound of the forest floor. Mounted once, on mount_sound.

Runs the ambience bed, the music deck, the mix, the shared one-shot library and the narrator, and publishes the sound surface every other slice reaches sound through.

It only ever resolves clips. Every sound was baked at author time by game.sound.bake into clips/; this component synthesises nothing and calls no generation service, so a player's machine does no DSP and reaches no network.

What it runs

  • Two beds at once. fl_bed_night and fl_bed_dawn both play for the whole session; only their levels move, mixed against FL.light(), so the insects thin into the dawn chorus without either stream re-cueing.
  • One music deck. fl_title under the menus and the opening beat, fl_score from the moment the light passes scoreLight. The level goes to nothing before the clip is swapped and comes back up on the new one.
  • The one-shot library, wired to the FL event bus: boom, call, answered, failance, flurry, step, seen, caught, roost. A slice that emits one of those gets its sound without asking. Two hosts serve them — one flat, one spatial for a shot that carries a world position.
  • Four mixer channels — ambient, music, sfx, voice — held at deliberately unequal levels, with a duck under every spoken line.
  • The narrator, from game.sound.lines, with the spoken words drawn as a caption at the foot of the frame, laid out from the live ui.screenSize().

The surface it publishes — FL.get("sound")

play(name, opts?) · duck(seconds, depth?) · say(lineId) -> text · text(lineId) · speaking() · captions(on) · mix()

opts on play takes volume, pitch and position. It also emits narration on the FL bus as { id, text, seconds }, so a slice that would rather draw the spoken words itself calls captions(false) and listens.

Fields

ambientVolume, musicVolume, sfxVolume, voiceVolume set the four channel levels; scoreLight is the light reading at which the score enters; drawCaptions turns the built-in caption off for a slice taking it over.

Consumed by

Everything. screens for its interface answers, tawpy, dawn, hero and staging through the events they already emit.