Our Sonic
A from-scratch simulation of the 2D Sonic games, running in the browser at 60fps. The level data is derived from the original games; the physics are a direct port of the documented Genesis behaviour rather than a modern physics engine standing in for it.
It is also a level editor — open the editor.
How it works
Five stacked canvases
Background low/high, foreground low/high and a sprite layer are composited every frame, so parallax and foreground tiles never force a full redraw of the scene.
A real physics port
Ground speed, slope factors, air drag and rolling are ported from the Sonic Physics Guide — not approximated with a generic 2D physics library.
Height-map sensors
Collision runs the original sensor model: per-tile 16-wide height maps probed by directional sensors, with rotation modes for floor, ceiling and both walls.
Levels straight from the cartridges
54 zones from Sonic 1, 2 and 3 & Knuckles, stored as deflate-compressed chunk/tile/object blobs and expanded in the browser.
Controls
- ← → — run
- ↓ — crouch / roll
- Space — jump
- Q — toggle play / edit
- F — show height maps
- C — dump physics state to the console
On a touch device the screen splits into a movement stick on the left and a jump pad on the right.