Skip to content
🌐 Browser2000PopCap GamesFIDDLY

Bejeweled rebuild deck

FIDDLY

Cascades are the enjoyable part to write; the part that fights you is the deadlock scan that guarantees the board always holds a legal swap, and nobody volunteers for it.

You will get it, but one specific system will fight you.

It shipped in November 2000 as Diamond Mine, a Java applet on PopCap's own site, and took the Bejeweled name when Microsoft licensed it for MSN Games in 2001. Cascades are the enjoyable part to write and the deadlock scan is the part nobody volunteers for, so ask for it explicitly and then verify it by playing until the board thins out. Watch the refill loop: agents often refill and rescan in the same frame, which produces boards that resolve themselves before the player can see what happened, so make the settle step explicit and slow enough to read. The audio ramp buys more perceived quality here than another week of gameplay code.

Difficulty
FIDDLY · 2 of 5
First playable
A weekend
The original
1 team-years
Released
2000 · Browser
Genre
Match Three
The one-shot build prompt
Build a match-three gem swapper as a single self-contained HTML file with Canvas 2D. No build step, no dependencies.

Requirements:
- 8x8 board, seven gem colours. Swapping two orthogonal neighbours that creates no line of three or more animates back over 150ms and does not consume a move.
- Board setup is where clones break. The starting board must contain zero pre-existing matches AND at least one legal swap. Fill it by rejecting any colour that would complete a line as you place it, then scan every possible swap for a resulting match. If none exists, reshuffle instead of dealing a dead board. Run that same deadlock scan every time a cascade settles.
- Resolve cascades in a loop until stable: clear matches, drop columns under gravity, refill from the top, rescan. Score each cascade level with a rising multiplier of 1x, 2x, 4x, 8x.
- A match of four spawns a gem that clears its row and column when next matched. A match of five spawns one that clears every gem of a chosen colour.
- Feel: gems accelerate downward at 1400 px/s squared, cap at 1200 px/s, and squash to 0.85 height on landing for 80ms. Clears use a 180ms scale-and-fade. Each cascade step raises a Web Audio chime by one semitone.
- Gem colours, base scores and special-gem behaviour live in gems.json.

Definition of done: I trigger a five-deep cascade with rising audio, and the board never presents me a position with no legal swap.
What you lose
  • The gem art and the facet lighting, which is doing far more work than the code is
  • The announcer landing 'Excellent!' at precisely the right beat of a cascade
  • Two decades of variants — Blitz, Twist, Butterflies — and the Facebook-era leaderboard economy that kept them alive
  • EA's trademark, and the certainty that anything shipped under that name gets taken down
What to steal

One legal-move enumerator, four jobs

Write the enumerator once and it pays four times: hints, the deadlock check nobody volunteers for, board generation by rejection, and a difficulty knob that is a number instead of a feeling. Any puzzle you can solve programmatically you can also generate — that is the whole trade, and most match-three clones only ever collect one quarter of it.

ScopeA weekend— build just this, not the game

Build a match-three board TOOL rather than a game, as a single self-contained HTML file. Canvas 2D, no build step, no dependencies.

- 8x8 board, seven token colours, standard three-in-a-line matching with gravity refill.
- Write one function, enumerateMoves(board), returning every legal swap annotated with tokens cleared, whether it forms a line of four or five, and the depth of the cascade it triggers. It simulates resolution on a copy and must never mutate the live board.
- Wire that single function to four consumers: a hint button showing the highest-scoring move; a live count of legal moves that reshuffles at zero; a board generator that deals candidates and rejects any with a pre-existing match or a move count outside a target range; and a difficulty slider that sets that range.
- Overlay every legal swap as a faint arrow, brightest for the best move.
- Print enumeration time in milliseconds.

Definition of done: set the slider to its tightest setting, deal 100 boards, and every one is match-free on deal with between two and four legal swaps, arrows on screen proving it.
Make it different

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

Blackpowder Hands Off

Bejeweled, but an auto-battler — you set up, it plays itself, set in the Wild West. Rendered in CRT arcade with scanlines.

Themethe Wild West
Anglean auto-battler — you set up, it plays itself
LookCRT arcade with scanlines
Build a browser game called "Blackpowder Hands Off".

The pitch in one line: a match three in the spirit of Bejeweled, but an auto-battler — you set up, it plays itself, set in the Wild West.

WHAT THIS IS
Take the SHAPE of Bejeweled — 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 auto-battler — you set up, it plays itself. The player only makes decisions between rounds. Combat resolves deterministically from board state and seed, so a replay is exact.
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
The Wild West. Distance, dust and long reloads. A single main street the whole design hangs off.
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
CRT arcade with scanlines. Post-process pass with scanlines, barrel distortion, phosphor bloom and slight chromatic aberration at the edges. Keep it subtle enough to read text through.

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.
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 Bejeweled to rebuild with an AI agent?

Yes — every game is buildable at some scope. The question is how hard, and Bejeweled is FIDDLY (2 of 5). You will get it, but one specific system will fight you. Cascades are the enjoyable part to write; the part that fights you is the deadlock scan that guarantees the board always holds a legal swap, and nobody volunteers for it. Reckon on a weekend to something you can actually play — not to something that matches the 1 team-years PopCap Games spent.

What makes Bejeweled hard to rebuild?

Cascades are the enjoyable part to write; the part that fights you is the deadlock scan that guarantees the board always holds a legal swap, and nobody volunteers for it. That is why it sits at FIDDLY rather than a tier either side of it. If you want the idea without the project, the transferable part is one legal-move enumerator, four jobs — a weekend of work.

How long does it take to build a Bejeweled clone?

Wrong question, and it is worth saying why. Nobody rebuilds Bejeweled — the original took PopCap Games on the order of 1 team-years, released in 2000 on Browser. What you can do is reach something playable and genuinely yours in about a weekend, 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 Bejeweled?

The gem art and the facet lighting, which is doing far more work than the code is. The announcer landing 'Excellent!' at precisely the right beat of a cascade. Two decades of variants — Blitz, Twist, Butterflies — and the Facebook-era leaderboard economy that kept them alive. 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.