2026-08-14ยท5 min read
Game & Audio

Zero-G Inertia and Procedural Audio: Designing the Void Miner Arcade Game for the Browser

#Game Dev#Canvas 2D#Web Audio API#TypeScript#Physics

When designing the Void Miner game for this portfolio Arcade zone, the goal was not just another shoot-em-up, but a spacecraft control experience with inertia physics (momentum, thrust, and vacuum drag).

The starfighter is designed with an aerodynamic needle nose, striped delta wings, and twin wingtip laser cannons firing accurate twin plasma beams.

For audio, instead of weighing down the web bundle with large MP3 files, all sounds are synthesized in real time with the Web Audio API โ€” delivering instant 0ms-latency response and an authentic 8-bit retro arcade feel.

TECHNICAL CODE (TYPESCRIPT)
PRODUCTION READY
// Procedural Web Audio API Laser Synthesizer
playLaser() {
  const ctx = this.getAudioContext()
  const osc = ctx.createOscillator()
  const gain = ctx.createGain()
  
  osc.type = 'sawtooth'
  osc.frequency.setValueAtTime(880, ctx.currentTime)
  osc.frequency.exponentialRampToValueAtTime(110, ctx.currentTime + 0.12)
  
  gain.gain.setValueAtTime(0.2, ctx.currentTime)
  gain.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.12)
  
  osc.connect(gain).connect(ctx.destination)
  osc.start()
  osc.stop(ctx.currentTime + 0.12)
}
TECHNICAL NOTE:All ship, laser-shot, shrapnel-explosion, and quantum-crystal sound effects are generated 100% procedurally via native oscillators with no external audio files.
๐Ÿš€

Rizky Mardhani

Computer Engineering ยท FILKOM Universitas Brawijaya