A puzzle game is a board, one rule and a list of levels. First decide which family you are making: sliding tiles, match-three or a logic grid. Describe the rule, the move limit and what earns three stars, and the agent builds a first level you can play in the emulator preview. Because levels are stored as data, more levels, hints and an undo button are each one chat message.
Three families, three different games
"Puzzle game" covers games that have little in common. Pick the family first, because each one needs a different description.
Sliding tiles
One slot is empty and a neighbouring tile slides into it. The goal is to put numbers or the pieces of a picture in order. After the scramble there is no luck at all. Board size sets the difficulty: any 3 by 3 board can be solved in 31 moves or fewer, while a 4 by 4 board can need up to 80.
A sliding tile puzzle for phones. A 3 by 3 board shows the numbers 1 to 8 and one empty slot. Tap a tile next to the empty slot to slide it in. The level is solved when the numbers are in order. Each level starts from a different scramble and has a move budget. Finishing within the budget earns three stars, up to 10 moves over earns two, anything more earns one. Show moves used, the budget, an Undo button and a Restart button.
Match-three
A grid of coloured pieces. Swapping two neighbours to make a line of three or more removes the line, the pieces above fall and new ones drop in. Luck is part of the game. A grid 7 wide and 8 tall fits a phone held upright. Five colours is the usual number: four gives long chain reactions and an easy game, six makes every move tight.
A match-three game for phones on a grid 7 wide and 8 tall, with five colours of gems drawn as simple shapes. Swipe a gem to swap it with a neighbour. A swap must make a line of three or more, or it slides back. Matched gems vanish, the gems above fall and new ones drop in. A line of four leaves a gem that clears a whole row. Each level gives 25 moves and a score target. Chain reactions score double. Show moves left, the score and the target.
Grid logic
No luck and no reflexes: a grid, a rule and one answer to find. Lamps that flip their neighbours, crates pushed onto marked squares, a grid where no number may repeat in a row or column, one path that must visit every cell.
A lamp puzzle for the browser, played with a mouse or a finger. A 5 by 5 grid of lamps, some of them on. Clicking a lamp flips it and the four lamps next to it. The level is solved when every lamp is off. Each level has a target number of moves. I get three stars for meeting it, two for up to three extra moves and one otherwise. Include 12 levels in rising difficulty, an Undo button, a Restart button and a level select screen.
Write the level format down once
The code of a puzzle game is the same on level 1 and level 100. Only the data changes. So tell the agent how a level is written, and every later level becomes a short message. For a crate puzzle:
Level 4, budget 14 moves
#######
#..B.T#
#.##..#
#P.B.T#
#######
Here # is a wall, P is the player, B is a crate and T is a target square. For a sliding puzzle, a level is a board size, a scramble and a budget. For match-three, it is a short row of numbers: moves, colours, target score and any blocked cells. The levels and difficulty guide shows how such a list becomes a level map with stars.
Making sure a level can be solved
One level that cannot be solved makes players stop trusting all the others. Each family needs its own guard.
Sliding tiles. If the tiles are placed at random, exactly half of all arrangements can never be solved. So scramble by sliding: start from the finished board and make, say, 40 random legal slides, never sliding a tile straight back. Whatever comes out can be solved.
Match-three. Two checks. The starting board must hold no ready-made lines and at least one possible swap. And after every move, if no swap is possible, the board reshuffles. Whether the target can be reached within the move limit is tuning, not logic: play each early level five times, and you should win about three of them.
Grid logic. Build the level from its answer. For a lamp puzzle, start with every lamp off and click a few lamps at random: the same clicks solve it. For a number grid, fill in a correct grid first, then hide cells while checking that only one answer remains. For crate puzzles, solve each level yourself before it goes in, and ask the agent to store your solution with the level.
Move limits and stars
Par is the length of the shortest solution you know. Give early levels a budget of about 1.5 times par, and tighten towards 1.2 times par in late levels.
| Result | Sliding or logic level | Match-three level |
|---|---|---|
| One star | Solved | Target score reached |
| Two stars | Within 1.5 times par | Target reached with 3 or more moves left |
| Three stars | Within par plus 2 moves | Target reached with 6 or more moves left |
Decide what happens when the moves run out. In match-three the level fails. In a logic puzzle it is kinder to let the player finish for one star. The stars already give a reason to come back.
Hints and undo
Undo is essential in sliding and logic puzzles. One tap takes back one move, all the way to the start if needed, and gives the move back to the counter. A crate puzzle without undo is cruel: a crate pushed into a corner can never be moved again. A Restart button belongs in every puzzle game.
Hints should give the next step, never the whole answer. In match-three the common form costs nothing: after about 5 seconds without a move, one possible swap wiggles. In a logic or sliding puzzle, a Hint button highlights one good move from the current board. Limit it, for example to three hints per level or one every 30 seconds, and consider capping a hinted level at two stars.
Putting levels in order
- Level 1 takes one or two moves. It teaches the input and nothing else.
- One new idea at a time. A new piece, a bigger board or a tighter budget, never two in the same level.
- Sort by par, then correct by feel. Time your own first solve of each level. If one takes three times as long as the level before it, move it later.
- Follow a hard level with an easier one. Players need a win after a struggle.
- Grow the board slowly. Ten levels on 3 by 3 before the first 4 by 4.
Requests worth sending next
- "Scramble by sliding tiles from the solved board, so every level can be solved."
- "Level 6 is harder than level 9. Swap them."
- "Give level 3 a budget of 18 moves instead of 14."
- "Add an Undo button that takes back one move at a time and gives the move back."
- "If I do nothing for 5 seconds, make one possible swap wiggle."
- "When no swap is possible, reshuffle the board and show a short message."
- "Add 10 more levels on a 4 by 4 board."
Each follows the habit from how to describe a game: say what you saw, then what you want. If your idea is closer to flipping pairs or finding words, the memory card game guide and the word game guide cover those boards.
Begin with one board
Choose one family, paste its description into the builder and solve your own first level.
Frequently asked
Which kind of puzzle game is easiest to start with?
A sliding tile puzzle on a 3 by 3 board. It has one rule, one input and a clear end, so the first version is easy to judge. Match-three needs more tuning because new pieces fall at random.
How do I know every level can be solved?
Ask for levels that are made backwards from the solution. A sliding puzzle is scrambled by legal slides from the finished board, and a logic grid is built from a complete answer. Both can then be solved by construction.
How many moves should a puzzle level allow?
Start from the shortest solution you know, called par. A budget of about one and a half times par is friendly for early levels, and three stars can be kept for finishing within a move or two of par.
Can I write my own puzzle levels?
Yes. Ask the agent to store each level as rows of characters and say what each character means. Then you type new levels straight into the chat and the agent adds them to the list.
Does a match-three game need an undo button?
Usually not. New pieces fall at random after every move, so an undo would let players retry a move until the fall is lucky. Undo belongs in sliding and logic puzzles, where nothing on the board is left to chance.
Build it now — free to start
Type the idea, sign in, and the agent builds it in your browser. Change anything by describing it.
Open the builder ›