d237d692

Author: Michael Lynch <git@mtlynch.io>

Add background music and sound effects

The game now plays a calm looping soundtrack in the spirit of Stardew
Valley, plus sound effects for arm swings (a short grunt), boulder
breaks (a rumbling crush), and tree hits (a wooden thunk). Remote
players' swings and breaks are audible too, driven by the same
broadcast events that already animate them.

There are still no audio assets: a new Sounds class synthesizes every
voice at runtime with the Web Audio API, matching how the game
generates all of its textures in code. Phaser's sound manager stays
disabled. The AudioContext is created lazily on the first in-game
input, since browsers keep audio suspended until a user gesture and a
returning player boots straight into the game without one.

Music runs on a frame-driven lookahead scheduler against the audio
clock, so the eight-bar loop is seamless and drift-free, and stale
beats are skipped rather than burst-played after a hidden tab
returns.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Total

4m27s

Time to Start Worker time Duration Time to finish Idle
Config 1s 3s 3s 5s 1s
Eval 6s 10s 10s 17s 1s
Build 16s 6m41s 4m12s 4m29s 25s
Suite 1s 6m55s 4m27s 4m29s 28s

Timeline

Config Eval Build Compressed gap
0s40s1m1m20s1m40s2m2m20s2m40s3m3m20s3m40s4m4m20s