Adding Sound and Music to Our Godot Game, a Devlog
We shipped the platformer demo to eleven playtesters with no audio at all, because audio was the thing we kept pushing to next sprint. Four of the eleven wrote back asking if the build was broken.

We shipped the platformer demo to eleven playtesters with no audio at all, because audio was the thing we kept pushing to next sprint. Four of the eleven wrote back asking if the build was broken. One said the jump felt floaty, which it had not been before, and the only change was that we had turned off a placeholder sound we forgot was even in there.
So we spent two weeks on it. Not a long time, and we got about seventy percent of the way, which seems to be how audio goes. These are the notes from that fortnight, including the two days we lost to a problem that had nothing to do with sound design and everything to do with how Godot exports to the web.
The bus layout we settled on
We started with everything playing on Master, which lasted about forty minutes. The moment you want to let a player turn music down without turning footsteps down, you need buses, and it is easier to set them up before there are ninety sound calls in the project.
Four buses, in the audio panel at the bottom of the editor. Here is what each one carries and where we left the fader.
| Bus | Carries | Our level | Effects on it |
|---|---|---|---|
| Master | Everything | 0 dB | Limiter, threshold at 2 dB |
| Music | Looping tracks only | 6 dB down | None |
| SFX | Jumps, hits, pickups, UI | 3 dB down | None |
| Ambience | Wind, water, machine hum | 14 dB down | Low pass at 8 kHz |
The limiter on Master was the single biggest improvement for the least work. Before it, a boss slam landing at the same instant as three enemy deaths clipped hard enough to crackle on laptop speakers. After it, the peak just squashes and nobody notices.
One thing that cost us an afternoon: the volume slider in our options menu was wired straight to a linear value from 0 to 1, and dB is not linear. Dragging it to the middle barely changed anything audible. Godot has a helper that converts linear to dB, and once we ran the slider value through it the control felt right. If you are building options and the sliders feel dead in the middle, that is almost certainly why.
The footstep problem and why we stopped chasing realism
Our first footstep implementation played a sound on a timer while the player was moving. At our run speed that fired every 0.18 seconds, and it sounded like someone shaking a bag of gravel.
We tried three fixes. Randomising pitch between 0.92 and 1.08 helped a lot and took five minutes. Rotating through four different footstep samples instead of one helped more. Lowering the rate to every 0.31 seconds, deliberately slower than the animation, helped most of all, and it is wrong. The feet visibly do not match the sound if you stare at them. Nobody has noticed in eleven playtests, and the audio stopped being annoying, so we kept it.
The other thing we did was cap polyphony. Instead of spawning a new player node per sound, we keep a pool of eight for the SFX bus and reuse the oldest. That was a direct lift from the approach we took on performance when we were fixing Godot frame rate drops, where node churn turned out to be most of the problem.
Ogg, wav, and the loop that clicked
Music loops are where we burned the most time for the least visible result.
Godot handles two formats you care about. Wav is uncompressed, loads instantly, and has sample accurate loop points you can set in the import panel. Ogg Vorbis is compressed to roughly a tenth of the size, which matters enormously for a web build, and its looping is handled through a loop offset on the resource.
Our 94 second music track clicked on every loop. The click was not in the file, it was in the encoder: Ogg Vorbis pads the start of the stream, so the loop point lands a few milliseconds into silence. The fix was setting the loop offset on the imported resource to match where the musical bar actually starts, which for our track was 0.027 seconds. We found that number by exporting the file, opening it in a free editor, and reading the sample position of the first transient.
Short sounds stayed as wav. Our 36 sound effects total about 4.1 MB uncompressed, which is nothing next to the 11 MB the music would have been without Ogg. Mixing formats by length is the rule we settled on and it has not caused us any trouble since.
Two days lost to web export latency
The build ran fine on desktop and the jump sound in the browser arrived roughly a quarter second late. Long enough that the game felt broken, short enough that we assumed it was our code.
It was not our code. Browsers will not start an audio context until the user has interacted with the page, and the first sound after that cold start pays a penalty while the context spins up. Our title screen had a Play button, so the interaction happened, but we were loading and starting the music on the same frame the scene changed, which pushed the first few effects into the queue behind it.
What fixed it: play one silent sample of a few milliseconds the moment the Play button is clicked, then load. The context is warm by the time anything real needs to play. Total code, four lines. Total time to find it, about eleven hours spread over two days, most of which went on profiling things that were not the problem.
The lesson we took is the same one we took from adding screen shake and hit stop: when a feel problem shows up only on one platform, suspect the platform before the implementation. We now test every audio change in a browser build before we call it done, which adds about four minutes to the loop and has caught two more issues since.
What is still not right
Music transitions between areas are a hard cut. We know the proper answer involves crossfading two players or using interactive music, and we have not done it, because the areas in the demo are far enough apart that nobody has complained yet. It is on the list under the same honest heading as the other things we deferred when we were cutting features from the game.
We also have no mixing done by anyone who knows how to mix. Our levels came from four of us listening on different headphones and arguing. That is probably fine for a demo and definitely not fine for release.
FAQ
How long should audio take on a small project?
Two weeks got us a working bus setup, 36 effects, three music tracks and an options menu that behaves. It did not get us good mixing or smooth transitions. If you are planning a schedule, budget audio as a feature of similar size to a save system rather than as polish you sprinkle on at the end.
Should I use Ogg or Wav in Godot?
Wav for anything under about three seconds, Ogg for music and long ambience. The deciding factor is build size against loop precision. If your loops click after switching to Ogg, check the loop offset before you blame the file, because the encoder padding is the usual culprit.
Why does my volume slider do nothing until the end?
Because the bus volume is in decibels and your slider is probably linear. Convert the slider value with the linear to dB helper before setting the bus volume, and the whole range becomes useful instead of just the last fifth of it.
How many sound effects does a small platformer need?
We have 36 and roughly a third of them are variations of six real sounds. Pitch variation and a handful of alternates cover more ground than a long list of unique files, and it is far less work to make.
More in Devlogs
Devlogs
Adding Godot Screen Shake and Hit Stop, a Devlog
The most upvoted comment in our last feedback thread was four words long: "hits feel like nothing." Eleven other players agreed...
Devlogs
Adding Controller Support to Our Godot Game, a Devlog
Three of the first ten people who played our demo picked up a gamepad, pressed A on the title screen, and nothing happened.
Devlogs
Adding a Godot Dialogue System to Our Game, a Devlog
Our platformer had six characters who needed to talk, and every line of their dialogue was hardcoded into a label node with a...