Making Game Sounds With Code (No Audio Files)

Ten of the thirteen games on SalutGames ship without a single audio file. The rain in Lightkeeper, the swing of Skyhook's hook, the traps in Trap Castle and the voices in Silent Maze are all generated by the browser while the game runs, from settings a few lines long. The other three games use recordings, and the reason is worth knowing, because it shows exactly where code stops being enough.
Which games use recordings
| Game | Audio files | Size |
|---|---|---|
| Rondo | 202 | 3.4 MB |
| One Tap Hero | 165 | 1.4 MB |
| Tap Burst | 29 | 196 KB |
| The other 10 | 0 | 0 |
The recordings are mostly voices. One Tap Hero has a roar and a cry for each boss, jump, hurt and attack sounds for the heroes, plus footsteps on stone and grass. Tap Burst has an announcer calling "three", "one", "go" and "champion". Rondo has a stadium crowd. Even those three games still generate some of their effects in code.
The cost shows up in loading. In a speed test of all thirteen games, Rondo and One Tap Hero were the two heaviest downloads, at 4.6 MB and 5.4 MB. On those figures, recordings make up roughly three quarters of Rondo's download.
The parts every sound is made from
Browsers include a sound engine called the Web Audio API. It works like a chain of small units plugged into each other:
- an oscillator produces a steady tone, as a sine, square, triangle or sawtooth wave
- noise is random static, the raw material for rain, wind, breath and impacts
- a filter removes high or low frequencies, or keeps only a band in between
- a gain controls volume over time, so a sound can swell, hold and fade
Most game sounds are some arrangement of those four.
A storm from one kind of static
Lightkeeper's weather is three layers of the same noise, each filtered differently:
| Layer | Filter | Frequency |
|---|---|---|
| Rain | High-pass | above 1,800 Hz |
| Wind | Band-pass | around 420 Hz |
| Surf | Low-pass | below 260 Hz |
High, hissing static reads as rain. A band in the middle that drifts up and down reads as wind. The lows, swelling and falling, read as waves breaking. Each layer moves at its own slow rate, so the storm never repeats in an obvious loop.
A bell from three tones
A struck bell rings at several frequencies at once, and unlike a guitar string they aren't neat multiples of each other. Lightkeeper's bell copies that with three sine tones: the main note, a second at 2.76 times its frequency, and a third at 5.4 times. The upper two are quieter and fade sooner, at 32% and 12% of the main volume.
Each perfect signal in a chain rings the bell one step higher on a pentatonic scale that starts at C, 523.25 Hz. A run of perfects turns into a short tune, and no two chains sound quite the same.
The ship's horn uses a different trick. Two sawtooth waves at 138 and 146 Hz play together, and the 8 Hz gap between them makes the sound throb, like an old foghorn. Both fade in over 0.12 seconds instead of starting sharply, which makes the ship sound far away.
Voices without recordings
Silent Maze goes furthest. Its characters speak, gasp and growl, and none of it is recorded. Each vowel is made the way a mouth makes it, by shaping a buzzing tone with three resonances at once. For an "a" those sit at 780, 1,180 and 2,500 Hz. For an "i" they sit at 300, 2,300 and 3,000 Hz.
The voices differ by pitch and by how far those resonances are shifted. The kid speaks at 310 Hz with every resonance raised by 32%, the sound of a smaller voice. The Shade sits at 55 Hz with its resonances lowered and a growl added. The voice called Ticker uses a square wave modulated at 140 Hz, which gives it a metallic edge. Short sequences of vowels become "eep", "uh-oh", "phew" and "yay", and the kid's tips are spoken as a stream of made-up syllables.
Even the echo is generated. The reverb that gives Silent Maze its cave sound comes from a burst of noise that the game builds and fades out itself, not from a recording of a real room.
The one rule every game follows
Browsers don't let a page start making sound on its own. Chrome's rule, in place for the Web Audio API since Chrome 71, is that an audio context created before the user interacts with the page starts out suspended, and has to be resumed after a tap, click or key press. That is why every SalutGames game stays silent until the first touch, and why that first tap is also the one that switches the sound on.

Sources
- François Beaufort, Autoplay policy in Chrome, Chrome for Developers
- SalutGames: game source code and builds for Lightkeeper, Silent Maze, Rondo, One Tap Hero and Tap Burst, and the October 2026 speed test of all 13 games




