Log inGet started
World

Red Dot Rising

Branchmain
Branchesmain
Commit3b5552605d

README.md

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.

ClipWhat it isCodec
rdr_clickthe trigger closing and openingopus
rdr_humthe diode's carrier, held while the beam is onpcm
rdr_cutthe sag and relay clack when the pointer overheatsopus
rdr_pingthe chime a mirror answers the beam withopus
rdr_whistlethe keeper's two-tone callopus
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.