game.laser.sfx
The pointer's own noises, synthesised on the CPU.
Five clips, every one computed here from an envelope over a waveform, so the pointer is never silent for a credit balance or a network answer.
| Clip | What it is | Codec |
|---|---|---|
rdr_click | the trigger closing and opening | opus |
rdr_hum | the diode's carrier, held while the beam is on | pcm |
rdr_cut | the sag and relay clack when the pointer overheats | opus |
rdr_ping | the chime a mirror answers the beam with | opus |
rdr_whistle | the keeper's two-tone call | opus |
local Sfx = require("game.laser.sfx")
local clips = Sfx.ensure() -- resolve what exists, bake what does not
Sfx.rebuild() -- re-bake every clip and report its header
ensure resolves the .soundClip assets under game/laser/sounds and bakes
only what is missing, so an engine that has them pays nothing.
The hum is a whole number of hertz across exactly one second and is stored as
pcm: it loops end to end through the Audio component's own looping, which
is the only loop this engine honours, and an opus clip would lose its head at
the seam. The one-shots do not care and travel smaller under the default codec.
The noise source is a fixed-seed LCG, so two bakes of the same clip produce the
same bytes.
Scoped to this part · feeds back into the world's score.