Small, runnable projects that show how to add sound effects to a game, each tested before it was published. Every sound is a free CC0 file from SFXMint: use it in a game you sell, change it, put it in your own repository, no credit needed.
| Example | What it shows | Tested on | Guide |
|---|---|---|---|
| pygame-arcade | A one-screen arcade game: 7 sounds by name, enough channels that none are dropped, a reserved channel for game over, mute and volume, OGG for the browser build | pygame 2.6.1, Python 3.11 | Sound effects for Pygame |
| renpy-visual-novel | A short scene: text blips per character, a knock and a door, rain and wind on their own channels, hover and click sounds on menus and choices | Ren'Py 8.5.3 | Sound effects for visual novels and Ren'Py |
The code here is the fixed version of what the guides first said. These are the things that only showed up when it ran:
- Pygame drops sounds silently. With the default 8 channels, ten coins caught in one frame played only 7 times, with no error. The example uses 16 channels and keeps one for game over.
- Pygame's
get_length()includes silence. The jump file is 1.00 s; the sound in it is 0.35 s. - Ren'Py's default menu choices have no button sounds. The template's
screens.rpydeclareschoice_button is default, sostyle buttondoes not reach it. - A text blip on Ren'Py's sound channel cuts off
play sound. The example gives blips their own channel. - A new Ren'Py project shows text instantly, so a typing blip is never heard. The example sets a text speed.
- Ren'Py runs files in name order.
script.rpydefines the characters beforesounds.rpydefines their callback, so the sound setup usesinit -1.
Each folder's SOUNDS.md lists every file with its page and SHA-256. To add sounds to your own project:
npx sfxmint add --set retro-game --format wav --out assets/soundsCoding with Claude Code, Cursor or Codex? The game starter lets the assistant add sounds itself through the SFXMint MCP server.
Our code, text and sounds are CC0 1.0 (see LICENSE). The Ren'Py example also contains files from Ren'Py's new-project template, which are under Ren'Py's MIT license; see renpy-visual-novel/README.md.
