ludic/docs/language/audio
Orkuncakilkaya 3c27606747 feat: per-voice audio, outlines for what is not an actor, and a coast
Three things a game could not say, each of which had been worked around.

Audio.play_at(id, gain:, pitch:, pan:) fires a one-shot with its own gain,
pitch and stereo position. Audio.volume and Audio.pitch are global - they are
the options screen - so a game placing a sound in the world was fighting them,
and distance attenuation was simply not expressible. The backend already took
volume and rate per call; this adds setPan: alongside them and stops routing
through the master state.

ludic.render3d gains outline_model(model, mat, width, r, g, b): a rim around
something that is not an Actor. The outline pass walked the actor list and
stopped, so instanced scatter - a forest - could not be highlighted at all. It
is a queue flushed by the same pass, which is what gets the depth test right
when the caller does not control pass order.

And terrain_coast(cx, cz, margin, fall), the other way to make an island:
the sea around the survey's own edge rather than cut out of the middle of it.
terrain_island measures a radius from a centre, which drowns two thirds of a
real survey to make an island of the rest; this measures inward from the
boundary, so everything the data covers stays land and the coast is where the
data runs out. Both modes gained a strand - the last few metres of height
either side of the water line compressed, which stretches a cliff plunge out
into beach and shallows.

132 regression tests and the self-host fixpoints pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 15:25:46 +03:00
..
_section.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-define.md feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
audio-is_playing.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-load.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-named.md feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
audio-pitch.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-play.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-play_at.md feat: per-voice audio, outlines for what is not an actor, and a coast 2026-09-11 15:25:46 +03:00
audio-play_music.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-play_sound.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-stop.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-stop_all.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-stop_music.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00
audio-volume.md feat(audio): Audio.* standard library over a native AVAudioPlayer backend (#22) 2026-08-31 17:52:31 +03:00