Dig, place and hit feedback: sounds, particles, swing #16

Closed
opened 2026-11-07 18:27:42 +00:00 by claude · 1 comment
Member

Add a sound per node group, block-break particles on the plane, an avatar swing animation when using tools, and a hurt flash plus sound when taking damage. Use placeholder CC0 sounds until the audio pass.

Add a sound per node group, block-break particles on the plane, an avatar swing animation when using tools, and a hurt flash plus sound when taking damage. Use placeholder CC0 sounds until the audio pass.
claude added this to the v0.2 Core Feel milestone 2026-11-07 18:27:42 +00:00
claude added the
type
art-audio
priority
medium
labels 2026-11-07 18:27:42 +00:00
eric added this to the Strata Roadmap project 2026-11-07 18:36:27 +00:00
eric moved this to To Do in Strata Roadmap on 2026-11-07 18:37:23 +00:00
eric closed this issue 2026-11-11 17:10:03 +00:00
Author
Member

Done in 4ee3e33.

What changed

  • mods/strata_core/feedback.lua: four sound sets (stone, dirt, wood, leaves) via strata.node_sounds(set). Any node registered without sounds gets a set from its dig group after all mods load, so new nodes sound right by default. Walls get dirt/wood/stone explicitly.
  • Block-break dust: the server spawns particles textured from the dug node, just in front of the plane, so every player sees a block break (the client's own dust only shows for the digger).
  • Walls, torches and doors play their place sound from their custom on_place (strata.play_place_sound).
  • Avatar footsteps on two of the walk frames. On damage the avatar flashes red (strata.flash) and other players hear player_damage / player_falling_damage at it; the engine plays the same files for the hurt player.
  • Slimes flash through damage_texture_modifier and squelch when hit or killed.
  • The swing animation was already done in #15.

Audio: all sounds are synthesized by the new tools/gen_sounds.py from noise and oscillators, with no samples, and are dedicated CC0. They're listed in the new CREDITS.md. These are placeholders until a real audio pass.

Tests: 9 new selftest cases (tests/feedback.lua): group→set mapping, every diggable node has sounds, every referenced sound has a file, dig spawns dust in front of the plane, place/footstep/hurt sounds, the flash clears, slime hit/death sounds. Full suite 55/55 locally at this commit, zero ERROR lines; CI run 19864 green.

Needs a hands-on check in the client: volume balance. Sounds play at the node or avatar, and the listener is the camera about 22 nodes away, so I used full gain and a 40-node hearing distance. How loud the dig ticks feel relative to footsteps needs ears.

Done in 4ee3e33. **What changed** - `mods/strata_core/feedback.lua`: four sound sets (stone, dirt, wood, leaves) via `strata.node_sounds(set)`. Any node registered without sounds gets a set from its dig group after all mods load, so new nodes sound right by default. Walls get dirt/wood/stone explicitly. - Block-break dust: the server spawns particles textured from the dug node, just in front of the plane, so every player sees a block break (the client's own dust only shows for the digger). - Walls, torches and doors play their place sound from their custom `on_place` (`strata.play_place_sound`). - Avatar footsteps on two of the walk frames. On damage the avatar flashes red (`strata.flash`) and other players hear `player_damage` / `player_falling_damage` at it; the engine plays the same files for the hurt player. - Slimes flash through `damage_texture_modifier` and squelch when hit or killed. - The swing animation was already done in #15. **Audio**: all sounds are synthesized by the new `tools/gen_sounds.py` from noise and oscillators, with no samples, and are dedicated CC0. They're listed in the new `CREDITS.md`. These are placeholders until a real audio pass. **Tests**: 9 new selftest cases (`tests/feedback.lua`): group→set mapping, every diggable node has sounds, every referenced sound has a file, dig spawns dust in front of the plane, place/footstep/hurt sounds, the flash clears, slime hit/death sounds. Full suite 55/55 locally at this commit, zero ERROR lines; CI run 19864 green. **Needs a hands-on check in the client**: volume balance. Sounds play at the node or avatar, and the listener is the camera about 22 nodes away, so I used full gain and a 40-node hearing distance. How loud the dig ticks feel relative to footsteps needs ears.
Sign in to join this conversation.