Commit Graph

1 Commits

Author SHA1 Message Date
56e900d93a Add physics-based collision damage, spatial audio, and synchronized audio loading
All checks were successful
Build / build (push) Successful in 1m17s
Audio Loading Improvements:
- Ensure all sounds load before gameplay starts
- Wrap RockFactory explosion sound in Promise for async/await support
- Move background music loading from play() to initialize() in Level1
- Update loading messages to reflect audio loading progress

Collision and Audio Features:
- Implement energy-based collision damage using reduced mass and kinetic energy
- Add ship velocity property and display on scoreboard HUD
- Add collision sound effect with volume-adjusted playback (0.35) on ship impacts
- Move explosion sound to RockFactory with spatial audio positioning
- Configure explosion sound with exponential rolloff for better audibility

Technical Changes:
- Reorder audio engine initialization to load before RockFactory
- Background music now preloaded and ready when play() is called
- All audio assets guaranteed loaded before ready observable fires

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 11:28:31 -06:00