Utility

Spark Engine

A game engine for the browser, with a demo game, a scene launcher and a starter app to build from.

Overview

Spark Engine is my game engine for the browser, built on WebGPU. I put the hard parts in up front, from physics and destructible buildings to streaming worlds and sound, with one consistent way to build a scene on top. It ships with a demo game, a launcher of scenes that each show off one system, and a starter app small enough to read in a sitting.

Try the EnginePlay the DemoTry DestructionSource on GitHub

Highlights

  • A demo game, not a spinning cube. I proved it out on a rainy night street, with enemies that hunt and take cover, gunplay, objectives and a generated soundscape.
  • Buildings that know what holds them up. I built destruction into the engine, so blowing out a wall brings down what it was carrying. Bridges hang by their rebar and an eight-story tower tips over when its base goes.
  • One scene per system. Twelve scenes, from hundreds of moving lights to a whole city district streamed in around a flying camera.
  • Same run, every time. Fix the clock and the seed and any run plays out exactly the same, which makes bugs easy to catch.
  • Built to be handed over. I included a starter app, a one-command project generator, and Blender scripts that build the levels and characters.

How It’s Built

It uses WebGPU where the browser has it and WebGL2 everywhere else. Five quality presets let a weak laptop and a strong desktop run it from the same link.

Process

I designed and built it solo, with automated screenshots, playthroughs and benchmarks checking every change before it lands.

More from Spark Engine

The showcase: objectives, gunplay and a generated soundscape
Knock out the ground floor and the tower comes down
Blow one end and the skybridge is left hanging
One blast: broken concrete, rebar stubs and dust
256 moving lights over 1,600 instanced props, clustered on the GPU
GPU particles: embers, steam vents and a rain volume
A 960 m district streamed in chunks around a flying camera
Rapier physics: a seeded pile, a ramp, a character controller