Mainspring
A clockwork puzzle about swapping enamel gear plates until every row, column and clue lines up. Every board has exactly one solution.

What it is
Mainspring gives you a grid of gear plates in the wrong order. You swap pairs of plates, inside a swap budget, until each row and column has every gear exactly once and every clue is satisfied. The fewer swaps you use, the more stars you earn.
Each plate shows a cog with as many lugs as its number, so you read the board by shape as well as by digit.
Walkthrough
- Take the quick tourThe first time you open it, the game offers a skippable four-board tutorial. You can replay it later from Settings.
- Read the cluesRiveted plates are fixed in place. Ratchet arrows point at the smaller of two neighbors. Brass frames are boxes that also need one of each gear.
- Swap platesTap a plate and then another to swap them, or drag one onto another. On a keyboard, move the cursor with the arrows and use space to pick up and swap. Swapping two identical gears is refused and costs nothing.
- Watch your budgetYou have a set number of swaps. Undo gives one back, and Reset gives them all back. The Lens will reveal a single plate, but it costs a swap and caps that run at two stars.
- Earn your starsThree stars means you matched the Master's best, which is the true minimum number of swaps. Two stars is within two swaps of it, and one star is finishing inside the budget.
- Visit the WorkshopEmbers you earn buy plate finishes and board frames. A Parts Drawer fills in as you meet new kinds of clue.
Three ways to play
Campaign has four worlds of twelve puzzles, growing from 4 by 4 up to 7 by 7, and each world teaches a new kind of clue. Daily Workbench is one seeded board a day with a spoiler-free result you can share and a streak to protect. Endless Mainspring gives you three springs and a budget that keeps tightening.
Why the puzzles are trustworthy
- Each puzzle starts as a random valid grid. Clues are then removed one at a time while a solver confirms the answer stays unique, so every clue you see is necessary.
- The par is exact, not estimated. The minimum swap count is worked out from the cycles in the mismatch graph, and I cross-checked it against a full breadth-first search.
- Difficulty is graded by the technique needed to solve a board, from simple single-gear deductions up to boards that need a careful guess.
Campaign boards are baked in ahead of time. Daily and Endless boards are generated in a background worker, usually within tens of milliseconds.
How it's built
- Plain HTML, JavaScript, Canvas 2D and Web Audio with no dependencies. Sound and music are synthesized in code.
- There are 966 unit checks and a 58-step test that plays through the real interface, including the tutorial, the Lens, keyboard play and the fallback when background workers are unavailable.
- One thing I learned from testing: simply fixing the first wrong plate each time already hits par on most boards, so three stars is really about deducing the answer without wasted moves. I kept a test floor so boards do not drift toward trivial.