look on internet for free sources of SFX and add death vfx, shot and building destruction vfx. #146
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Done in
940540d. Three events now have a sound: a shot leaving a gun, a vessel dying, a structure coming down.The sources you asked me to find
All CC0 (public domain, no attribution required), which is the only licence class worth using for a game you may ship:
What actually shipped, and why
The sounds are synthesised, not downloaded -
audio/make_sfx.pygenerates all three from scratch and is committed alongside them. Three reasons: a generated sound has no licence to track and no attribution to keep; there is no binary in the repository whose provenance nobody can check a year from now; and it makes the sounds data - if a shot is too sharp, that is a number in that file and a re-run, not a hunt through a library.Swapping in a Kenney file later is replacing a
.wavand nothing else.Sfx.gddoes not know or care which it is.How it is built
A voice pool, not a player, because these overlap constantly - a fleet firing is several shots inside one shot's length. Twelve voices, and when they are all busy the one furthest through its own sound is recycled: the one with least left to lose.
Parented to the tree root, for the reason that matters here: every one of these sounds is started by something being freed on the same frame. A dying ship cannot own the sound of its own death.
Levels are per sound rather than shared - a shot fires constantly and a death happens once, so equal volumes are not proportionate ones (shot -22dB, ship -6dB, structure -4dB) - and shots get a little pitch spread so a stream of them does not flatten into one machine-gun note. The deaths get none: a wobbling explosion sounds broken rather than varied.
The test goes at the failures a play-through would hide for weeks: firing three times the pool size must leave exactly the pool's worth sounding with no leaked voices, and the ship-death case is driven from a node that really has been freed on that frame.
Suite: 147/147.