Log inGet started
World

Procgen Effects Showcase

Branchmain
Branchesmain
Commit99ff90d12c

README.md

storm_thunder_2

Thunder sound clip for the lightning storm in the fx_storm scene. The scene's Thunder2 entity references it from an Audio component with autoplay off, looping off, the sfx channel, source type SoundEffect, volume 1 and spatial off.

StormDirector plays it. The storm loops every 13.6 s through four strikes (storm/schedule.module), and the director gives strike i the Audio component of the entity Thunder ((i - 1) mod 3) + 1. During play, when the storm clock passes a strike's time plus the distance from the strike's target to the hero camera divided by 343 m/s, it stops and restarts the clip with volume thunderVolume (1 in the scene) times 1.0 for a tower strike or 0.85 for a ground strike, and pitch 0.92 + 0.16 * ((i * 37) mod 11) / 10. This clip sounds for strike 2, a tower strike at 5.0 s (pitch 1.048).

storm/audio.module generates the samples in Luau and creates the clip with asset.create (mono, 32000 Hz); its M.bake() makes each storm clip whose name is still free. This clip comes from M.thunder(134, 11): seed 134, 11 seconds, ending in a 0.6 s fade.

data.zaud is the engine-native payload the runtime decodes and plays. Its header states Opus, 48000 Hz, 1 channel and 528000 frames, 11.0 seconds. settings.yaml sets the encoding: codec opus, 96 kbps, VBR on, forceMono false, load type auto.