look on internet for free sources of SFX and add death vfx, shot and building destruction vfx. #146

Closed
opened 2026-08-28 13:49:37 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

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.py generates 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 .wav and nothing else. Sfx.gd does 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.

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: - **[Kenney](https://kenney.nl/assets/category:Audio)** - the best fit here. [Sci-fi Sounds](https://kenney.nl/assets/sci-fi-sounds) (70 assets), plus [Impact Sounds](https://kenney.nl/assets/impact-sounds) and [Digital Audio](https://kenney.nl/assets/digital-audio). Everything Kenney publishes is CC0 1.0, personal or commercial. - **[OpenGameArt CC0 packs](https://opengameart.org/content/100-cc0-sfx)** - a 100-sound CC0 set with explosions and shots; [more CC0 sets here](https://opengameart.org/content/cc0-sound-effects). - **[Freesound](https://freesound.org)** - enormous, but licences are per-sound. Filter to CC0 or you inherit an attribution obligation per file. - **[ZapSplat CC0 section](https://www.zapsplat.com/license-type/cc0-1-0-universal/)** - CC0 1.0 Universal, no permission needed. - **[Pixabay sound effects](https://pixabay.com/sound-effects/search/cc0/)** - CC0-filtered. - **[Daniel's free laser weapon library](https://danielsoundsgood.itch.io/laser-weapon-sound-library)** - laser-specific, if you want more variety on the guns. ### What actually shipped, and why The sounds are **synthesised**, not downloaded - `audio/make_sfx.py` generates 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 `.wav` and nothing else. `Sfx.gd` does 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.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#146
No description provided.