Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Three puzzles built backwards: make the answer first, then the board

A topic by ytrofr created 2 days ago Views: 112 Replies: 1
Viewing posts 1 to 2

Three of the puzzles on my site are built the same way, and it took me longer than it should have to notice it was one idea.


Pipe Flow deals a board by walking one path that visits every square of the grid exactly once, then cutting that walk into one segment per colour. The segments cover the board and cannot overlap, so a solution exists before the player ever sees it.


Untangle joins the dots with no crossings FIRST, shortest pair before longest, and only then scrambles where the dots sit on screen. A crossing-free drawing exists by construction; nothing has to be searched to know it.


Picture Logic draws the picture, reads the run lengths off it, and hands those numbers to a line solver that may only fill a cell when every legal arrangement of that line agrees about it. If the solver cannot finish, the board is thrown away.


The shared rule is that none of them shuffles a board and hopes. They build the answer and derive the puzzle from it, which is the only way I found to promise a child that the thing in front of them is actually solvable. Shuffle first and you are left either checking solvability afterwards or apologising afterwards.


The cost is real and worth naming: the deal is slower, the generator is the hardest code in each game, and for Picture Logic a share of candidate boards get discarded. I will take all of that over a kid stuck on a board that never had an answer.


All three are here if you want to poke at them:


https://ellaz.fun


Source is MIT, so the generators are readable:


https://github.com/Sigmafier/ellaz-games


- Yatir

Nice write-up. Building the answer first and deriving the puzzle from it is the only approach I'd trust too: a promise of solvability is worth more than a clever shuffle.


One thing that helped us on top of that: once the board exists by construction, run a solver anyway, not to check solvability but to measure how hard it is (how many forced steps vs. guesses). That way you can sort the generated boards into difficulty tiers instead of guessing it from the board size.


Curious how you rate difficulty for Picture Logic, since the line solver already knows how many steps it needed?