
The world stopped being silent
For a while Buildom was a quiet game. Rain fell without a sound, trees fell without a crash, and the zombie hands got you in perfect silence. Visually the world was already loud, but audio was that one sense the game did not use at all. That bugged me, so this round became all about sound effects.
A tiny engine for a lot of noise
The whole system lives in one small module. Every gameplay event that should make a noise calls one function, the event maps to a list of sound files, and a random entry of that list plays. Two footsteps instead of one, so running around does not sound like a machine gun.
The browser quirks were the fiddly part. Browsers block audio until the first interaction, so the engine waits for the first click or keypress before it plays anything. A small pool of Audio elements gets reused per sound instead of creating new ones, and once four of the same sound overlap, further triggers are simply dropped, because four footsteps at once is noise, not feedback. Missing files are remembered and skipped silently, so a broken asset can never spam the console.
Chiptune from a script
I did not record the default sounds, I generated them. A build script synthesizes the whole set as small WAV files: square and triangle blips, filtered noise for thumps and crumbles, exponential fades. Deterministic output through a seeded random generator, so rerunning it always produces the same files. Chiptune style on purpose, it matches the pixel art look better than any attempt at realism would.
Footsteps are quiet, the tree fall is loud, and every event has its own volume multiplier. All of that is tuned in config, like every other feel value in the game.

Wired into everything
The events are all over the engine now. Footsteps tick on a timer while you walk, jump and landing answer the grounded transitions, and the switch from walking to swimming plays a splash. Taking damage has a sound, dying has a small jingle, both for you and for the entities. Every axe hit that does not yet break the tree plays a chop, and when the threshold is reached, the break-off comes with a proper rumble and crash. Mining and placing blocks are covered too.
The nice part for later: blocks and characters can override these defaults in their own JSON files. Dirt can crunch differently than stone, and a rabbit can die with a different noise than a zombie hand. The engine never needs to change for that, it is just asset data.
Real recordings welcome
The generated set was always meant to be replaceable, and a few sounds already got swapped for real recordings. The engine treats every file the same, so the only rule is that the paths stay referenced. For now the mix of chiptune blips and a couple of real sounds works better than I expected.
Next time you enter a world, listen. The caves are darker with sound in them, and the tree falling on your head is a lot more dramatic when it announces itself. Follow along, there is more noise coming.