Bewildoor has no recorded sounds. Every footstep, door, chime and both music tracks come out of one Python script that builds them from sine waves and random noise. Run it again and the whole soundtrack is rebuilt in a few seconds. Here is how that works, and why a small studio would bother.

Why generate sound at all?

There were three reasons. The first is ownership: every sound in the game is ours, so there are no licences to track and no risk of a sample turning out to be copyrighted. The second is consistency: because every sound is built from the same handful of tools, the whole game sounds like one place. The third is speed of change: if a door sounds too heavy, we change one number and rebuild everything.

The toolbox

The script works at 44,100 samples per second and uses a few building blocks that any synthesizer has:

  • Envelopes shape how a sound starts and ends: a quick attack, a decay, an optional sustain and a release. A pluck and a pad differ mostly in their envelope.
  • Exponential decay makes something die away naturally, like a knock on wood.
  • Low-pass and high-pass filters turn harsh white noise into a soft "whoosh", a dull thud or a crisp click, depending on which frequencies are kept.
  • Bells combine a few sine waves at related frequencies with a long decay.
  • Pads stack the notes of a chord into a soft, sustained sound.
  • Reverb adds a touch of room so the sounds don't feel dry and close.

How the sound effects are built

Footsteps. There are three slightly different steps, so walking doesn't sound like a machine gun. Each is a very short burst of filtered noise (the scuff) mixed with a low sine "thump" around 70 to 86 Hz, both decaying in a few hundredths of a second.

Opening a door. A slow swell of low-passed noise gives the movement of air. A sine wave whose pitch wobbles three times a second gives the creak. A deep 55 Hz thud lands a third of a second later, when the door swings to the wall. A little reverb puts it in a room.

Sealing a section. When a section's exit seals behind you, you hear a 38 Hz boom with a long tail. It's lower and longer than any other sound, because it's the one moment you can't undo.

Picking up and using items. Picking up a clue plays three quick bell notes going up. Using an item at a door is a short blip that rises in pitch; getting it back by walking back is the same blip falling. Players learn the difference without thinking about it.

Wrong and denied. A refused door is two low, buzzy tones. A wrong riddle answer is two notes falling a major third. Neither is harsh, because you'll hear them a lot.

Winning. Reaching the portal plays five bell notes climbing over a soft major chord.

Music

The two music loops use the same bells and pads. Each is a short chord progression with a bass note, a pad for the chord and random bell arpeggios on top. The in-game track moves slowly through D minor, B-flat, G minor and an unresolved A chord at 72 beats per minute: calm, a little mysterious, good for thinking. The menu track is slower and brighter.

Because the arpeggios are random, the script uses a fixed random seed so the music comes out the same every time. To make the loop seamless, the reverb tail at the end is folded back onto the start of the track. When the music repeats, the echo of the last notes is already playing under the first ones.

What it costs

The trade-off is honesty about quality. Generated sounds won't match a foley artist recording real doors. But for a puzzle game where sounds are short signals ("that worked", "that didn't", "you can't go back now"), clarity and consistency matter more than realism. The script needs only common scientific Python libraries and an encoder to write the compressed audio files the game loads.

If we ever do add outside sounds, they will come from free, no-rights-reserved (CC0) packs and be credited in the game. So far, every sound is made by code.