All Gerk Games use Web Audio API for sound effects. Not a library, not a framework — just raw oscillator nodes and gain envelopes. Here's what we learned building a full sound engine in 50 lines.

Why Web Audio API Beats Audio Files

Audio files (MP3, OGG, WAV) need to load, decode, and buffer. On a slow connection, this can take 2-5 seconds per sound. Web Audio API generates sounds procedurally — zero network overhead, zero file size, zero loading time. A game with 10 sound effects using procedural audio loads instantly.

Our sound engine uses a single function: an oscillator with a frequency, duration, waveform type (sine/square/sawtooth), and a gain envelope that starts at a volume and fades to zero. That's it. Everything from the Snake Arena eating sound to the Pixel Jumper jump sound is just different parameters to the same function.