Guides·5 min read

Two of Our Games Contain No Sound Files at All

A tape screech, a sword clang, thunder rolling. No audio files involved in any of them.

The cassette loading screen from Tape Loader, whose screech is generated from oscillators rather than played from a recording.

Our chess game is 104 kilobytes and contains a sword clang, a hoof beat, chain lightning, rolling thunder and a victory fanfare. It has no audio files in it.

Neither does our platformer, which manages a tape screech, a landing thud and a set of pickup blips with nothing recorded. The only build of the three that carries actual audio is the largest, and it carries eighteen pieces of music for a reason worth explaining.

What a sound is made of

Every browser has a synthesiser in it. Not a metaphor: an actual audio graph you can build nodes in and connect together. Two building blocks carry almost everything.

An oscillator produces a tone at a frequency, with a shape: sine is smooth and flutey, square is hard and electronic, sawtooth is buzzy and aggressive, triangle sits between. That gives you notes, blips, alarms and anything melodic.

Noise is the other half, and it is what most people miss. Fill a buffer with random values and you have static. On its own it is useless. Put it through a bandpass filter, which keeps a narrow band of frequencies and discards the rest, and you can aim it: high and short is a hi-hat, low and long is a rumble, swept downward is a whoosh.

Percussion, impacts, footsteps, wind and water all come out of filtered noise. Almost nothing in a game needs a recording of them.

The envelope is the whole trick

Here is the part that separates sound design from beeping.

A raw oscillator switched on and off sounds like a fire alarm, because real sounds do not start and stop at full volume. They have a shape over time: a fast rise, then a decay. That shape is the envelope, and it is what your ear actually identifies.

The same oscillator at the same frequency becomes a completely different object depending on it. A sharp rise with a very short decay is a click. A sharp rise with a long decay is a bell. A slow rise with a slow decay is a pad. One sound source, three instruments.

Add a frequency slide during the note and you get more for free. A tone that starts high and drops as it decays is a falling object. The same tone rising is something powering up. In our platformer, a hit is a low square wave sliding from 160Hz down to 60Hz with a burst of low noise underneath. That is the entire sound: two lines.

What a real palette looks like

The chess game's audio is fifteen named sounds, and reading the list tells you what the game is: step, hoof, clang, swing, slam, zap, thunder, magic, die, select, place, check, fanfare.

Every one is oscillators and filtered noise through an envelope. The cavalier's charge is a hoof beat, the lance landing is a clang, the sorceress is a zap with magic layered over it, the golem's slam brings thunder. None of it is recorded, none of it is licensed, and the entire audio system is a fraction of a file already smaller than a photograph.

A cavalier landing a lance strike on a footman in Fighting Chess, with the captured square highlighted.
Hoof, swing, clang. Three generated sounds, no files.

When the machine is the point

Our platformer takes the same approach for a different reason, and it is the more interesting one.

The game is about a home computer from 1982. The loading screen reproduces a cassette screeching data into a machine, and the finish plays a little fanfare built from a square wave running up an arpeggio.

Those machines made their sounds exactly this way. They had a handful of oscillators and no memory for recordings. So generating the audio is not a saving here, it is the correct texture. A high-fidelity recording of a tape screech would sound less like a Spectrum than a square wave does.

Animated clip of the cassette loading screen in Tape Loader, with the byte counter climbing.
Nothing behind this screen is recorded.

When to record instead

The third build is the counter-example, and the line is clear.

It is a painted storybook crossing London, ending in a flight to Cape Town. It carries eighteen pieces of recorded music, and it should.

Synthesis is excellent at things that are mechanical, electronic or percussive. It is poor at a melody with real instruments and real performance in it. You can approximate strings with oscillators and everybody can tell. A game whose whole texture is hand-painted, and which is meant to feel like a bedtime story, cannot have music that sounds like a modem.

The rule we work to: synthesise the effects, record the score. Most builds want both, and the mix is a style decision rather than a budget one.

The one universal catch

Every browser blocks audio until the visitor has interacted with the page. No tap, no sound. This is a deliberate rule to stop pages making noise at people, and it applies to synthesis and recordings equally.

It is the actual reason games have a start screen. That screen exists partly to be pretty and mostly to collect the click that lets the audio context begin. Every one of our builds unlocks its sound on the first press, which is why the tape screech starts exactly when you ask the game to load rather than before.

What this means for a commission

Sound is not where the cost is. A full synthesised palette is a few hundred lines and ships free. Original scored music is real work by a person, which is why it is what changes between tiers.

The technique should match the world. A retro build usually sounds more authentic generated. A painted storybook usually needs a score. Choosing on file size rather than on feel is the wrong way round.

Ask for a mute. Every build we deliver has one, and every build should. A game a family opens on a laptop in a quiet house needs a way to turn itself down.

What decides a game's size covers the same trade for artwork, and the build diary goes through the largest build in detail. Both playable builds in the arcade have their sound generated this way, so the fastest test is to turn your volume up and click one.

◆ Questions

Common questions

Can a game have sound without any audio files?+

Yes. Two of our three builds contain no audio files whatever. Every sound is generated as it plays, from oscillators and filtered noise, using the Web Audio API built into every browser.

What kind of sounds can be synthesised convincingly?+

Anything percussive, electronic or mechanical: clangs, blips, footsteps, thunder, a tape screech. What synthesis does not do convincingly is a scored melody with real instruments, which is why our largest build carries eighteen recorded pieces instead.

Why not just use sound files for everything?+

File size and delivery. Synthesised audio costs nothing to ship, never has to be licensed, and can be varied endlessly at runtime. A game that fires a slightly different footstep every step needs one function, not forty recordings.

Does a custom game come with original music?+

The 8-Bit tier from £349 and above include an original scored soundtrack. Lower tiers include a shorter original score. Which approach suits depends on the game: a retro build often sounds more authentic synthesised.

Will the sound work on a phone?+

Yes, though every browser requires a tap or a click before any audio can start. That is a platform rule rather than a limitation of the technique, and it is why games have a start screen.

  • process
  • behind the scenes
  • craft
  • audio
◆ Keep reading

Related from the journal.