Skip to content
🦔 Sega1991Sonic TeamHARD

Sonic the Hedgehog rebuild deck

HARD

The physics constants are published as exact binary fractions, so the work is entirely the thing nobody published: one hill shaped so that protecting your momentum means something.

You will get the loop working. Then the real work starts.

This is the rare case where the reverse engineering community has done the hard part for you: the constants are published as exact binary fractions and an agent given them produces something close in a single pass. Leave them out and you get a stock AABB platformer with a fast run animation, which is not the same game at all. Watch the rolling state specifically, since models tend to copy the running numbers into it. The real work is afterwards, because level geometry that exploits momentum is a design skill and no prompt supplies it. Budget most of your forty hours for building one good hill.

Difficulty
HARD · 3 of 5
First playable
A project
The original
8 team-years
Released
1991 · Sega
Genre
Momentum Platformer
The one-shot build prompt
Build a momentum-driven side-scrolling platformer on real slope physics. Single self-contained HTML file, Canvas 2D, tile data in JSON, no build step.

Requirements:
- The player is not an axis-aligned box tested against tiles. Ground movement is a scalar ground speed plus a ground angle. Each frame, add a slope factor of 0.125 times sin(angle) to ground speed, then decompose into x and y by that angle. Uphill drags, downhill accelerates, and that relationship is the whole feel of the game.
- Collision uses sensor lines cast from the hitbox: two ground, two wall, two ceiling. Each 16px tile stores 16 height values plus an angle. Sample the tile column under each sensor.
- Per-frame constants: acceleration 0.046875, friction 0.046875, deceleration 0.5, top speed 6, gravity 0.21875, jump 6.5. Air drag applies only while rising, with vertical speed between -4 and 0.
- Rolling is its own state, not a skin on running: friction halves to 0.0234375, deceleration drops to 0.125, and input adds no acceleration.
- If ground speed falls below 2.5 on a surface steeper than 45 degrees, the player detaches and control locks for 30 frames.
- Rings are the damage buffer: a hit scatters up to 32 of them in an arc that bounce and despawn after 256 frames. Zero rings means death.
- One loop and one corkscrew, built purely from angled tiles, no scripted sequences.

Definition of done: I can build enough speed on a downhill to carry myself through a full loop, and fall out of it if I enter too slowly.
What you lose
  • Six zones of level design by people who understood the physics better than any document of it does
  • Masato Nakamura's soundtrack, written by a working pop musician and it shows
  • The character, who is simultaneously a legal minefield and the entire point
  • The Mega Drive palette and the parallax budget that quietly shaped every background
What to steal

Ground speed carried along a surface angle

Swap velocity-on-a-box for a single scalar speed carried along the surface angle and slopes start doing your design work: downhill hands back what uphill took, and the player learns to protect their momentum. Worth having in anything with terrain — a sledge, a skater, a marble in a bowl.

ScopeA weekend— build just this, not the game

Build a slope-momentum toy as a single self-contained HTML file, Canvas 2D, tile data in JSON, no build step.

While grounded, the character is not an axis-aligned box with x and y velocity. It has one scalar ground speed and one ground angle. Each frame: add a slope factor of 0.125 * sin(angle) to ground speed, then apply acceleration, friction and deceleration to that same scalar, then decompose it into world x and y using the angle.

Collision uses sensor lines cast from the hitbox — two downward, two horizontal. Each 16px tile stores an array of 16 height values plus its surface angle; sample the tile column beneath each sensor to find the surface and its slope.

Build one rolling hill, one steep ramp and one full loop entirely from angled tiles, with no scripted sequences. If ground speed falls below 2.5 on a surface steeper than 45 degrees, detach from the ground and lock control for 30 frames.

Definition of done: I stall halfway up the steep ramp, slide back down, and arrive faster than I left.
Make it different

Not a clone — Sonic the Hedgehog re-themed and cut down to something you can finish. The angle is the important reel: it is what turns a project into a weekend. 5,880 ways to land.

Orbital Idle

Sonic the Hedgehog, but an idle version that plays while you are away, set in deep space. Rendered in silhouette against one light.

Themedeep space
Anglean idle version that plays while you are away
Looksilhouette against one light
Build a browser game called "Orbital Idle".

The pitch in one line: a momentum platformer in the spirit of Sonic the Hedgehog, but an idle version that plays while you are away, set in deep space.

WHAT THIS IS
Take the SHAPE of Sonic the Hedgehog — its core loop, and whatever makes that loop good — and rebuild it as your own game in a different world at a smaller scope. Use your own names, art and audio, which you want anyway: a reskin of somebody else's game is less interesting than a new one that works the same way.

THE ANGLE — this is the important constraint, honour it above everything else
An idle version that plays while you are away. Offline progress on load, big-number maths from line one, and a prestige reset. The fantasy survives; the input does not.
This is what makes the project finishable. If a decision would push the scope back towards the original's, take the smaller option every time.

THE THEME
Deep space. Vacuum, delay and no help coming. Sound only travels through the hull.
The theme is not a coat of paint. Let it change what the mechanics mean — a reload, a health pack and a locked door should all be things that make sense in this world and nowhere else.

LOOK
Silhouette against one light. Everything renders pure black against a lit background, with depth from four parallax layers of increasing blur, grain and a heavy vignette.

REQUIREMENTS
- Runs in a browser with no build step. Canvas 2D unless the angle genuinely requires 3D, in which case three.js.
- Fixed-timestep update loop with interpolated rendering, so it behaves the same at 60Hz and 144Hz.
- Every tuning constant in one CONFIG object at the top, exposed as live sliders in a debug panel. You will find the feel by dragging those, not by prompting.
- All content — levels, entities, balance numbers — in JSON or plain data files, never inline in the logic.
- Audio generated with the Web Audio API rather than asset files.
- Respect prefers-reduced-motion: keep the fades, drop the shake and the parallax.

BUILD ORDER
1. The core loop with placeholder rectangles, at the reduced scope the angle demands. No theme, no art, no audio. Make it fun as rectangles first.
2. The angle's consequences. Cutting to bots, or to turn-based, or to one level changes the design rather than just shrinking it — find out how and rewrite step 1.
3. The theme, as content and data.
4. The look, applied last as a rendering layer over a game that already works.

Start by writing a one-page plan: the core loop, what the angle removes and what that frees you to do properly, and what you are deliberately leaving out. Wait for me to approve it before writing code.
Prior art — read before you build

Half the time one of these already does what you wanted, and the other half it saves you a week of solving a problem someone documented in 1997.

Did you build it?
0Share on X

One count per game. No account — it is tied to a salted hash of your IP, which is not stored in a form anyone can reverse. Every build adds 8 team-years to the counter on the homepage.

Questions

How hard is Sonic the Hedgehog to rebuild with an AI agent?

Yes — every game is buildable at some scope. The question is how hard, and Sonic the Hedgehog is HARD (3 of 5). You will get the loop working. Then the real work starts. The physics constants are published as exact binary fractions, so the work is entirely the thing nobody published: one hill shaped so that protecting your momentum means something. Reckon on a project to something you can actually play — not to something that matches the 8 team-years Sonic Team spent.

What makes Sonic the Hedgehog hard to rebuild?

The physics constants are published as exact binary fractions, so the work is entirely the thing nobody published: one hill shaped so that protecting your momentum means something. That is why it sits at HARD rather than a tier either side of it. If you want the idea without the project, the transferable part is ground speed carried along a surface angle — a weekend of work.

How long does it take to build a Sonic the Hedgehog clone?

Wrong question, and it is worth saying why. Nobody rebuilds Sonic the Hedgehog — the original took Sonic Team on the order of 8 team-years, released in 1991 on Sega. What you can do is reach something playable and genuinely yours in about a project, and then keep going for as long as it stays interesting. Any figure that claims otherwise is measuring a prototype and calling it a game.

What do I lose by building my own Sonic the Hedgehog?

Six zones of level design by people who understood the physics better than any document of it does. Masato Nakamura's soundtrack, written by a working pop musician and it shows. The character, who is simultaneously a legal minefield and the entire point. Those are the parts a prompt will not hand you.

Which AI coding agent should I use to build it?

Any of Claude Code, Codex or Cursor will handle this prompt. Paste it as your first message, let the agent scaffold the project, then iterate on feel — the second, third and tenth prompts are where a game actually gets good. Work in an empty folder or a fresh git branch so you can throw it away cheaply.

Get the next game

One email when new games go on the list. No other reason to email you, ever.