Commit Graph

7 Commits

Author SHA1 Message Date
c78fb85f25 feat(assets): add and update block break/place/walk sounds
Add sounds for dirt, grass_block, leaf, log, sand, snowy_grass_block, stone.
Update existing leaf/walk, sand/place, sand/walk, and stone/place sounds.
2026-07-07 18:02:07 +08:00
85dadc17c9 feat(gameplay): detect underwater state and play transition/bubble sounds
- Add is_underwater() and set_underwater() to ClientPlayer.
- Change get_world() to return non-const reference for audio access.
- Update Camera::update_move_camera() to detect water block changes and trigger transition sound.
- Add repeating timer in ClientWorld to play random bubble ambient sounds while underwater.
- Include new ambient sound assets for water transitions and bubbles.
- Also add sand walk sound asset (unused in this commit).
2026-07-07 17:19:47 +08:00
f36b05e2fd feat(gameplay): add ocean wave ambient sounds with random selection
Add four ocean wave FLAC sound files and play one randomly when player is within 10 blocks of sea level and in an ocean biome. Include a Random member initialized from ChunkGenerator seed for consistent randomization.
2026-07-07 16:50:59 +08:00
6b3872dc97 refactor(game_time): introduce Timer for time-based updates and rename existing to TickTimer
Add a new `Timer` class that operates in seconds (using `TimeType`) alongside the existing `TickTimer` which uses `TickType`. Rename the original `Timer` to `TickTimer` throughout the codebase. Update `ClientWorld` to maintain separate maps for tick-based and time-based timers, and replace the hardcoded footstep timer in `ClientPlayer` with a time-based callback timer. Also add `play_2d` to `AudioEngine` and load an ambient bird sound to demonstrate the new timer functionality.
2026-07-07 15:32:07 +08:00
a5bc4e238d feat(sound): add block place and break sounds 2026-07-07 11:45:38 +08:00
68ddd78a6f feat(audio): add footstep sounds and fix audio listener orientation 2026-07-07 11:20:17 +08:00
747b152fdf feat: add bgm001 2026-07-06 15:57:03 +08:00