Game sound effects
Choose one action and find the frame when the world changes. For a pick swing, the useful cues are the head striking rock and a chip breaking loose. The button press can precede both. Write the event name, emitting object, material and intended perspective before sourcing the sound.
Make a small cue family
For an Earshot workflow, give the installed skill a concrete brief such as “one wooden peg tapped into cedar, heard from a few steps away, dry attack, short tail, several separate takes.” Use its actual interface to render or select takes. Trim leading silence against the transient and audition the tail against the next action. Store a stable cue ID with the variants or clip ranges so game code can refer to the event by name.
Schedule what the player sees
Emit an event when the animation or simulation crosses the contact marker. Detect a crossing over the previous and current simulation times so a dropped frame still plays the hit. Track the action instance and marker to prevent the same impact playing twice. When work is interrupted before contact, cancel any queued hit for that action.
For browser audio, start or resume the audio context from a user gesture, decode a bank once and use a fresh source per one-shot. Share gain buses for effects, ambience and music. Give important events room when several residents work at once. Alternate takes, set a bounded voice count and fade the tail of an interrupted loop.
Listen in context
Loop one slow action and compare contact against the onset on the waveform. Then play several workers, the river and the score together at normal volume. Verify that mute, tab suspension and resume do not replay old events. Test one sound with the music off and again with it on.