World sounds are local: fade with distance and pan (distant sizzles snapped constantly)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 23:08:10 -04:00
co-authored by Claude Opus 5.5
parent 10911d4c86
commit 2b68b5d583
6 changed files with 60 additions and 7 deletions
+17
View File
@@ -4,6 +4,23 @@ What agents have done, newest first. Add an entry for every piece of work: the d
note or request it was for, what changed, the files touched, the tests run, and anything left
open or not verified. Keep each entry short; the git history has the details.
## 2026-10-23: world sounds are local (Claude Code, with Codex)
Note: "there is a sound effect that seems to happen randomly but constantly… maybe the sound
effects are not local?" The owner then confirmed a new world is quiet.
- Measured headlessly over 5 game minutes: a fresh world emits no sounds; a lava and water
contact 720+ grains from the bot emitted 2,889 sizzles (about 580 a minute), and `events.js`
played every one at full volume. The sizzle (`heat.js` boiling and quenching) is the only sim
sound with a position.
- `src/ui/audio.js`: `sfxPlace(x, y)` gives gain (1 in view, 0 one view width beyond it) and
pan; `playSfx(name, arg, x, y)` skips silent ones before the rate limit and plays the rest
through a gain and stereo panner (`AU.bus`). `src/ui/events.js` passes positions.
`docs/DESIGN.md`, `docs/PROJECT_MAP.md`.
- `test/play.py`: far off-screen is silent, on screen plays, just off-screen is quieter and
panned. All 11 headless suites, `play.py` and `t_smooth.py` pass.
- Open: not tested against the owner's own save; the owner checks by ear.
## 2026-10-23: fewer, smaller messages (Claude Code, with Codex)
Note: "lets change the engot mold and other status messages. they are way too large and just too