World sounds are heard in a radius around the bot, not the view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 23:40:08 -04:00
co-authored by Claude Opus 5.5
parent daf91891fc
commit c50444b333
5 changed files with 36 additions and 18 deletions
+7 -6
View File
@@ -178,12 +178,13 @@ 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. It was the sizzle: in the owner's world, water that
had found its way down to hot basalt and granite (480-800°C, about 500 grains below the
surface) boiled about 48 times a minute, and every sizzle played at full volume.
any other event with a place) are heard around the bot, whatever the zoom: full volume within
24 grains, fading to silent at 96, panned left or right. The owner heard a constant snapping
that followed the bot in an older world but not in a new one. It was the sizzle: in the
owner's world, water that had found its way down to hot basalt and granite (480-800°C, about
500 grains below the surface) boiled about 48 times a minute, every one at full volume. The
first fix faded sounds with distance from the view; zoomed out they were still heard, so the
owner asked for a radius around the bot instead.
- **The silo has pixel art in the pixel look**, drawn grain by grain like the rest of the world;
the smooth look keeps the illustrated silo. The owner noticed it looked the same in both.
+2 -2
View File
@@ -354,10 +354,10 @@ 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 (228 lines)
### src/ui/audio.js (230 lines)
Audio: chiptune effects and generative music that changes with depth. Everything is synthesized with WebAudio, no samples.
- functions: auInit, auVolumes, rateOk, tone, noiseBurst, sfxPlace, playSfx, auAmbient, mtof, zoneForDepth, scaleNote, musicScheduler
- variables: AU, SFX, ZONES
- variables: AU, SFX, SFX_NEAR, SFX_FAR, ZONES
### src/ui/state.js (67 lines)
Game shell (src/ui/): browser only. This file: settings, the GAME state object, DOM helpers, toasts and the status line.
+12
View File
@@ -4,6 +4,18 @@ 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 heard around the bot, not the view (Claude Code)
Note: "the sound effect is still heard when the player's zoom level is farther out… sounds
shouldnt be heard based on the viewport, but rather in a radius from the player."
- `src/ui/audio.js` `sfxPlace`: gain from the distance to the bot's centre (full within 24
grains, silent at 96), pan from the horizontal offset; zoom no longer matters.
- `test/play.py`: the audio checks use points relative to the bot; a new check zooms out to 2
and plays a visible sizzle 200 grains away: silent (it played before). `play.py` and all 11
headless suites pass. `docs/DESIGN.md`.
- Open: nothing.
## 2026-10-23: F on an ingot mold does nothing and says nothing (Claude Code)
Note: "now that ingot molds empty themselves, F still makes a message…"