Skip to content
🃏 Classic1995Tiger ElectronicsEASY

Lights Out rebuild deck

EASY

Nothing is hard once you know not to randomise the board — shuffle by pressing random distinct cells and every grid you generate is solvable by construction.

You will get essentially the whole thing.

Two hours of work, most of it spent arguing with yourself about the fade timing. The mathematics is the enjoyable part and it is genuinely small: solvable states form a linear subspace over GF(2), which is the formal way of saying shuffle by pressing rather than by randomising. If you want a stretch goal, ask for the minimum-move solution via Gaussian elimination instead of light chasing — about thirty more lines and a much better hint system.

Difficulty
EASY · 1 of 5
First playable
An evening
The original
1 team-years
Released
1995 · Classic
Genre
Toggle Puzzle
The one-shot build prompt
Build a 5x5 toggle puzzle as a single self-contained HTML file. No dependencies, no build step.

Requirements:
- Clicking a cell toggles that cell and its four orthogonal neighbours. Diagonals never toggle. The goal state is all lights off.
- The rule everyone misses: only a quarter of the 2^25 possible boards can be solved at all. Never randomise the grid directly. Start from all-off and press a random set of 8 to 20 DISTINCT cells, which guarantees solvability. Distinct matters: pressing the same cell twice cancels out, so sampling with replacement quietly hands the player a near-solved board. If the shuffle lands back on all-off, reshuffle.
- Solve by light chasing: walk top to bottom pressing the cell directly beneath every lit cell, which leaves only the bottom row lit. Look that row up in a precomputed table mapping bottom-row patterns to first-row presses, apply those presses, and chase again. Surface the solution as a pulsing hint one press at a time.
- Par is the solver's move count, not the shuffle depth; the two are rarely equal.
- Board sizes 3x3, 5x5, 6x6 and 7x7, each with its own shuffle depth and lookup table in levels.json.
- Feel: lights cross-fade over 90ms ease-in-out, the pressed cell scales to 0.92 and back over 120ms, and a 40ms Web Audio click at 800Hz fires on press.
- Show press count against par, and store the best per size in localStorage.

Definition of done: every generated board is solvable, and the hint system finishes any of them without a single guess.
What you lose
  • Almost nothing. Three rules and a piece of public linear algebra
  • The membrane click of the physical unit and the red LED bleeding into cheap plastic
  • The 1995 context, where this lived in a coat pocket rather than a browser tab
What to steal

The puzzle as parity equations over GF(2)

When moves commute, are self-inverse and only ever flip bits, the whole puzzle is a matrix over GF(2), and Gaussian elimination answers every question you have — solvable or not, minimum press count, how many boards are reachable at all — with no search anywhere. Recognising that shape in a puzzle is worth considerably more than the solver you would otherwise have written.

ScopeA weekend— build just this, not the game

Build a parity-puzzle solver playground. Single self-contained HTML file, no dependencies, no build step.

- A grid of toggles, size configurable from 3x3 to 9x9, plus an editable stencil deciding which neighbours a press flips: plus, X, full 3x3, knight's moves.
- Model it as linear algebra over GF(2). Each cell is a variable, each press is a column, the board is a vector, and every operation is XOR. Build the matrix, row-reduce it, and report the rank and the dimension of the null space.
- From those two numbers alone, state what fraction of all boards is solvable, and for any given board either produce a press set or prove none exists. No search, no heuristics, no backtracking anywhere in the file.
- Enumerate the null space cosets so you return the minimum-weight solution, not merely a solution.
- Draw the reduced matrix and the null space basis vectors as small grids.

Definition of done: the plus stencil at 5x5 reports null space dimension 2 and one solvable board in four, and a board I construct to be unsolvable is proved unsolvable instantly.
Make it different

Not a clone — Lights Out 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.

Obsidian No Reflexes

Lights Out, but a puzzle version — same fiction, no reflexes, set in a Mesoamerican empire. Rendered in PS1 low-poly with texture warping.

Themea Mesoamerican empire
Anglea puzzle version — same fiction, no reflexes
LookPS1 low-poly with texture warping
Build a browser game called "Obsidian No Reflexes".

The pitch in one line: a toggle puzzle in the spirit of Lights Out, but a puzzle version — same fiction, no reflexes, set in a Mesoamerican empire.

WHAT THIS IS
Take the SHAPE of Lights Out — 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
A puzzle version — same fiction, no reflexes. Keep the world and the tension, remove execution difficulty entirely. Every encounter has a correct answer discoverable by thought.
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
A Mesoamerican empire. Stepped stone architecture, an astronomical calendar that gates events, and obsidian-edged weapons that break.
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
PS1 low-poly with texture warping. Vertex-snap positions to a low-resolution grid in the vertex shader, use affine texture mapping so textures swim, dither to 15-bit colour, and fog the draw distance.

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 1 team-years to the counter on the homepage.

Questions

How hard is Lights Out to rebuild with an AI agent?

Yes — every game is buildable at some scope. The question is how hard, and Lights Out is EASY (1 of 5). You will get essentially the whole thing. Nothing is hard once you know not to randomise the board — shuffle by pressing random distinct cells and every grid you generate is solvable by construction. Reckon on an evening to something you can actually play — not to something that matches the 1 team-years Tiger Electronics spent.

What makes Lights Out hard to rebuild?

Nothing is hard once you know not to randomise the board — shuffle by pressing random distinct cells and every grid you generate is solvable by construction. That is why it sits at EASY rather than a tier either side of it. If you want the idea without the project, the transferable part is the puzzle as parity equations over gf(2) — a weekend of work.

How long does it take to build a Lights Out clone?

Wrong question, and it is worth saying why. Nobody rebuilds Lights Out — the original took Tiger Electronics on the order of 1 team-years, released in 1995 on Classic. What you can do is reach something playable and genuinely yours in about an evening, 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 Lights Out?

Almost nothing. Three rules and a piece of public linear algebra. The membrane click of the physical unit and the red LED bleeding into cheap plastic. The 1995 context, where this lived in a coat pocket rather than a browser tab. 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.