Split The code is public; the app answers only to the crew.
A bomb you can hear: a beep that quickens, a plant, a defuse, an explosion and the click of an empty gun #44
Sign in to join this conversation.
Split The code is public; the app answers only to the crew.
The planted bomb is silent. In a defusal game the beep is the information — it says which site, how far away and how little time is left — and here a CT can stand ten feet from a live bomb and hear nothing. The same silence covers the plant, the defuse, the detonation, the start of the round and a trigger pulled on an empty magazine.
Where it stands.
Audioinsrc/client/audio.tsisshot,step,hit,painandbeep;beepis used in exactly one place, the buy click atmain.ts:168. The{ kind: "sound", name }effect declared atworld.ts:70is pushed by one caller,footsteps, withname: "step", andfeelEffectsinmain.tsroutes exactly that one name. Panning and distance are already solved byears.ts.Done looks like:
src/client/cues.tsowning one concept — when a bomb beeps: given the seconds left on the bomb and when it last beeped, whether it beeps now and at what pitch. The interval quickens as the fuse runs down (roughly a second apart at 40 s, a few a second at the end) and the pitch rises with it. Pure arithmetic: no audio, no world, no DOM.world.tspushes{ kind: "sound", name: "beep", pos: bomb.pos }on that cadence while the phase isplanted, at the bomb's position, soearspans it and a CT can walk to the site by sound alone.plantwhen the plant completes,defusewhen it completes,explodeonbomb_timeout, andemptywhenshootrefuses for an empty magazine — once per press, not once per tick.audio.tsgrows one way to play a named world sound, panned and attenuated throughearslikeshotandstepalready are, with a tone per name.beep(pitch)stays what it is: the UI click. Mute and volume keep working through the one master gain.feelEffectsroutes sounds by name instead of matching"step", and the earshot rule is per name: a footstep stays short-range (FOOTSTEP_EARSHOT), a bomb beep and an explosion carry across the map.cues.test.ts— the first beep lands right after the plant, intervals are monotonically shorter as the fuse shortens, no beep when nothing is planted, and the rate is bounded however smalldtis.world.test.ts— a planted bomb pushes beeps on that cadence and stops on a defuse; the detonation pushes exactly oneexplode; a dry trigger pushes oneemptyper press.bun testgreen, README's What is real says the bomb beeps and what the other cues are.Not in this issue: music, voices or radio calls, a beep the HUD draws, and the bomb's damage model —
BOMB_RADIUSkilling everything within 1000 units with no falloff is a separate argument.Files I expect to change:
src/client/cues.ts+cues.test.ts(new),src/client/audio.ts,world.ts,main.ts,world.test.ts,README.md.Risks:
src/rl/arena.tssteps this same world thousands of times a second per core, so the cadence must be a couple of pushes a second at worst and must cost nothing when no bomb is down — say whatbun run scripts/train.ts --benchreports before and after. Do not touchobserve.ts: the shipped weights were trained on those 32 inputs and the card on the page quotes their numbers.world.tsis also being edited by #36 and #39; this change lives inupdateBomb,shoot's empty branch and thebomb_timeoutevent, so keep out of the middle ofshoot.Who: vesper — this is the simulation's effect stream and the synthesiser behind it.