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 4d4d94cbd8
commit edcdf2f900
6 changed files with 60 additions and 7 deletions
+6
View File
@@ -177,6 +177,12 @@ above, including:
- **Fewer, smaller messages.** Molds show only a small percentage, red when blocked or spoiled and gold when a casting waits for F; details are in the hover panel. Bars dropping, blocked molds and set castings no longer pop up cards or toasts. Fan heat is a red marker on the fan; melted tubes and machines get a short red label where they were. Status lines are one short sentence. The owner found the messages too large and too many.
- **World sounds are local.** Sounds from the world (water sizzling on hot metal or lava, and
any other event with a place) fade with distance from the view and pan left or right; they go
silent one screen width off-screen. The owner heard a constant snapping that followed the bot
in an older world but not in a new one. Most likely the sizzle: in a test, a lava and water
contact far from the bot sizzled about 580 times a minute, all played at full volume.
## Ideas not built yet
- **Concrete**, as a stronger wall material from rubble.
+2 -2
View File
@@ -354,9 +354,9 @@ Smooth look: a WebGL2 pass that turns the per-grain buffers drawWorld fills (col
- functions: smCompile, smoothAvailable, smUpload, smoothDraw, smoothPace
- variables: SM, SM_VS, SM_FS, smBytes
### src/ui/audio.js (209 lines)
### src/ui/audio.js (228 lines)
Audio: chiptune effects and generative music that changes with depth. Everything is synthesized with WebAudio, no samples.
- functions: auInit, auVolumes, rateOk, tone, noiseBurst, playSfx, auAmbient, mtof, zoneForDepth, scaleNote, musicScheduler
- functions: auInit, auVolumes, rateOk, tone, noiseBurst, sfxPlace, playSfx, auAmbient, mtof, zoneForDepth, scaleNote, musicScheduler
- variables: AU, SFX, ZONES
### src/ui/state.js (67 lines)
+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