Our block puzzle Blokito has an Adventure mode with 300 designed levels: 10 chapters of 30. A puzzle level that can't be won is the worst bug you can ship. The player blames themselves, retries, and quits. With 300 levels, nobody on a small team can replay every one after each rules change. So every level ships with a recorded solution, and our test suite replays that solution through the real game engine.

What a level is

Each level is a data file with:

  • an immutable ID and version, its chapter and index, and a difficulty tag
  • the starting 8×8 board (some cells pre-filled, never a full row or column) plus item markers on cells
  • one objective: either collect item quotas (stars, diamonds, rubies, emeralds) or clear every pre-placed block of one color
  • a move limit, the piece batches and an RNG seed
  • a witness: the winning sequence, recorded as batch slot plus anchor cell for every move
  • a content hash, so edited content can be told apart from the version that was tested

The witness is the key part. It is a concrete solution, not a claim that one exists.

The validator

The validator loads each level, feeds the witness moves into the same pure-domain engine the game uses (placement, simultaneous line clears, scoring and combo, item collection, move countdown, win check), and asserts that:

  1. every witness move is legal at that moment
  2. the objective completes within the move limit
  3. no ad, revive or other help is needed

Because it runs the real rules code, not a copy, a rules change that breaks a level fails the tests right away. The engine has no scene, file or tween dependencies, so the tests run headless.

What it does not prove

A witness proves that at least one winning path exists. It does not prove that the level is fun, that the difficulty is right, or that a reasonable player will find the path. We still playtest and balance by hand. The validator removes one class of bug (impossible levels) so playtesting time goes to feel instead.

Pacing 300 levels

  • Levels 1–10 teach one idea at a time.
  • After that, easy, medium and hard levels alternate, so a hard level is always followed by a breather.
  • Level 30 of each chapter is a challenge level.
  • Every first win reveals one of 30 pieces of the chapter's picture. Replays don't give extra rewards.
  • Progress is stored as the set of completed level IDs. Unlocks and revealed pieces are derived from that set, never kept as separate counters that could drift apart. Adding level 301 later doesn't renumber anything.

Takeaways for your own puzzle game

  • Store a solution next to every handmade level, and replay it in your tests with your real engine.
  • Keep the rules engine free of scene and UI code so it can run headless.
  • Version levels immutably and hash their content.
  • Derive progress from one source of truth.

If you want to see how it plays, Blokito and our other games are at https://lamian.dev.