DEV Community

Beatix Studio
Beatix Studio

Posted on

Solvable by Construction: Building a Level Generator That Proves Its Own Levels

Most puzzle games generate levels and hope they are solvable. For Arrow Puzzle, my tap-away game, I wanted a guarantee instead.

The trick is to build backwards. The generator places winding, snakes-style arrows on the board, then removes them in a recorded order — an order in which each arrow's exit path is clear at the moment it is removed. Replaying that recorded order is, by construction, a valid solution. A separate verifier then replays it once more before the level ships, so an unsolvable level cannot reach a player.

Difficulty is scored per level and paced as a sawtooth: ramp, ramp, ramp, HARD, relief — with a boss board every 10 levels. From level 6, every second level is shaped like a picture (dog, star, rocket, smiley — 49 shapes, dealt from a no-repeat deck), and board sizes jitter and grow up to 35x35 by level 200.

Help is adaptive but honest: after repeated fails the game offers a free hint, later a skip — it never secretly changes the board.

The game is Arrow Puzzle — free on Google Play if you want to try the boards yourself: https://play.google.com/store/apps/details?id=com.arrowpuzzle.puzzlegames

Top comments (0)