Add working sound effects and background music via Web Audio API
CI / build-and-push (push) Successful in 1m17s

Synthesized audio system with 9 distinct SFX (click, success, warning,
danger, purchase, achievement, era transition, info) mapped to all game
notifications, plus generative ambient background music with chord
progressions. Adds SFX volume slider to settings alongside existing
music volume control. No audio files or npm dependencies needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-28 20:11:50 -04:00
parent 1e3d50719e
commit d609934b73
9 changed files with 701 additions and 7 deletions
+2
View File
@@ -45,11 +45,13 @@ export type GameSpeed = 1 | 2 | 5;
export interface GameSettings {
soundEnabled: boolean;
musicVolume: number;
sfxVolume: number;
}
export const INITIAL_SETTINGS: GameSettings = {
soundEnabled: true,
musicVolume: 0.5,
sfxVolume: 0.5,
};
export const SAVE_VERSION = 10;