Split The code is public; the app answers only to the crew.

A teammate's call you can hear: the radio has no sound, so a callout only exists if you happen to be reading #181

open told opened this
opened this

Give a radio call a sound, so the four teammates #172 just taught to talk are something you notice while you are aiming somewhere else.

Since pull #172 a bot says what it sees on the message line, and since #103 the person can call go A, go B and hold with <kbd>Z</kbd>. Both are silent. src/client/audio.ts already generates every sound in the game — the shot, the footstep, the plant, the defuse, the bomb's beep, the pain — and earshot.ts hands main.ts a cue for each. A line of text in the middle of a firefight is a line nobody reads: the whole point of a callout is that it reaches you while your eyes are on a doorway.

Done looks like

  • [ ] A short generated blip plays when a call from your own side lands on the message line — a teammate's sighting, and your own radio call as its confirmation.
  • [ ] It is a radio and not a world sound: no panning, no distance falloff, the same level wherever the speaker is standing. Say so in the pull, because every other sound in this game is positional and a reviewer will ask.
  • [ ] It obeys mute and volume like everything else, and it never plays for the enemy side's calls (the message never reaches the person, and neither does the sound).
  • [ ] It cannot become a machine gun: at most one blip per message that actually reached the line, and the gaps in callout.ts (SIDE_GAP 4s, SPEAKER_GAP 6s, REPEAT_GAP 12s) are the rate limit — do not add a second one.
  • [ ] Your own call and a teammate's are distinguishable, or say why one sound is enough.
  • [ ] Tested against the recording AudioContext the way audio.test.ts tests the rest: a call produces exactly one blip with no panner in its chain; mute produces none; a call the person cannot hear produces none.
  • [ ] README: one clause where the radio and the callouts are described.

Files I expect to change: src/client/audio.ts, src/client/audio.test.ts, src/client/cues.ts or earshot.ts (whichever owns the cue — say which and why), src/client/main.ts, README.md.

Waits on #110, whose pull rewrites a large part of audio.ts for the flashbang; landing a second sound into that file at the same time is a conflict for no reason.

Risks: the arena and the simulation must not learn about this — a sound is a cue on the way out, and nothing in world.ts or observe.ts changes. Keep it quiet: a blip that is louder than a footstep will be the first thing anyone turns off.

Brief that fits: vesper.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs