Tyrbo Get early access

How to Make a Match-3 Game with AI, from Board to Level 10

Tyrbo · · 6 min read

A match-3 looks simple: swap two tiles, clear three in a row. Underneath sit five systems that decide whether it feels fair: board generation, swap rules, cascades, special tiles, and level goals with a move limit. This guide covers each one with numbers you can start from, lays out a first ten-level difficulty ramp, then shows how to build and tune it in Tyrbo.

Board generation with no starting matches

A new board must not contain a match already, and it must contain at least one possible move. Both rules matter. A board that clears itself on load feels random; a board with no moves feels broken.

The standard way to get there:

  1. Fill the grid cell by cell, left to right, top to bottom.
  2. For each cell, pick a random color, but exclude a color if the two cells to its left share it, or the two cells above share it. That is all it takes to avoid a starting match.
  3. When the grid is full, scan for at least one swap that would make a match. If there is none, regenerate or shuffle.

Grid size: 8 by 8 is the classic. In portrait on a phone, 7 by 9 or 8 by 9 uses the screen better. Colors: five is the right default. Four colors cascade constantly and feel easy; six make moves scarce. Use five for your first levels and add a sixth as a difficulty lever later.

Swap rules

  • Only adjacent tiles swap, never diagonal.
  • A swap that makes no match slides back. Keep the animation short (around 0.15 seconds each way) so a wrong guess costs a moment, not patience.
  • Lock input while tiles are moving and clearing. Most strange match-3 bugs come from swaps during a cascade.
  • If the player is idle for about five seconds, highlight a valid move. It quietly teaches beginners without a tutorial screen.

Cascades

After a match clears, tiles above fall into the gaps and new tiles drop in from the top. Then the board checks again, and any new matches clear on their own. That chain is a cascade, and it is where most of the delight in the genre comes from.

Rules worth getting right:

  • Resolve in steps: clear, fall, refill, check. Repeat until nothing matches.
  • Score each step of a chain higher than the last (for example, 1x, 1.5x, 2x) so long cascades feel rewarding.
  • After the chain ends, check for a valid move again. If none exists, shuffle with a visible animation, never silently.
  • Cap the refill logic so a chain always ends; an unlucky loop should not freeze the board.

Special tiles

Specials reward bigger matches and give the player tools. Three are enough to start:

  • Match 4 in a line: a line clearer that wipes the row or column, depending on the swap direction.
  • Match 5 in an L or T shape: a bomb that clears a 3 by 3 area.
  • Match 5 in a line: a color clearer that removes every tile of the color it is swapped with.

Then decide what happens when two specials are swapped together (a line clearer plus a bomb clearing three rows and three columns is a common choice). Combos are where skilled players find depth, but add them after the basic three feel right.

Level goals and move limits

A match-3 level is a goal plus a budget of moves. Four goal types cover most of what you need:

  • Score: reach a target score. The easiest to understand, the weakest to design around.
  • Collect: clear a number of tiles of given colors.
  • Clear blockers: break ice or crates sitting under or on tiles.
  • Drop items: bring an object down to the bottom row.

Moves left over at the end can turn into bonus points, which feeds a star rating: one star for clearing, two and three for score thresholds above it. Set move limits generously at first, then tighten by playing.

A first ten-level ramp

Treat this as a draft. Every number should move after you play it a few times. The shape matters more than the values: introduce one thing at a time, spike, then breathe.

  1. Collect 15 red tiles, 25 moves. Teaches the swap.
  2. Reach 3,000 points, 25 moves.
  3. Collect 20 blue and 20 green, 22 moves. A line clearer is placed on the board to show what specials do.
  4. Break 12 single-layer ice tiles, 25 moves. First blocker.
  5. Reach 6,000 points, 20 moves. First real squeeze; teaches the bomb.
  6. Break 16 ice tiles in two corners, 26 moves. A breather after level 5.
  7. Drop 2 items to the bottom, 25 moves. New goal type.
  8. Break 10 ice tiles and collect 25 purple, 22 moves. Two goals at once.
  9. Collect 30 yellow, 24 moves, with a few double-layer ice tiles. Gentle, to set up the next spike.
  10. Drop 3 items and break 14 ice tiles with six colors on the board, 24 moves. The first level many players fail once.

As a target, levels 1 to 4 should almost never be lost, and level 10 should usually take two or three tries. If your playtesters fail level 3, the moves are too few or the board is too stingy.

Build it in Tyrbo, step by step

  1. Describe it. Give it a setting and a goal: "A match-3 in a bakery where you swap pastries to fill customer orders before the shop closes."
  2. Answer the questions. Tyrbo asks a few, with a suggested answer selected for each: portrait, how many levels, which goal types. Keep the first answer to ten levels.
  3. Check the plan. It lists every part of the game with concept art before anything is built. Look for the board size, the color count, the specials and the goals. The board itself starts from a tested grid board brick.
  4. Play on your phone. Scan the code. Play the first five levels twice each.
  5. Tune by talking. "Level 5 needs 23 moves." "Make the bomb clear a 5 by 5 area." Paste the ramp above to start from it.
  6. Add your own test tools. Ask for a button to jump to any level, one to refill moves, and a slider for the number of colors. Your helpers live inside your game, so you tune where you play.

When it plays well, pick a look on the match-3 game maker page.

Mistakes to avoid

  • Starting matches on the board. The first thing players see is a board that clears itself. Use the generation rule above.
  • Score-only levels. They give players nothing to aim at. Mix in collect and blocker goals early.
  • Silent dead boards. Always detect no-move boards and shuffle with feedback.
  • Difficulty that only goes up. Players need easier levels after hard ones.
  • Too many specials at once. Teach one per level, with a placed example.

Honest limits

A good match-3 is mostly level design, and that takes playing. AI builds the board, the rules and the levels you describe; it cannot know which level feels unfair until you or a tester plays it. Keep the first version to ten levels and the three basic specials, and grow from there. For a broader look at the category, see the puzzle game maker.

Questions people ask

How do you stop a match-3 board from starting with matches?

Fill the board one cell at a time and, for each cell, exclude any color that would complete three in a row with the two cells to its left or the two above. Then check that at least one valid move exists, and reshuffle if not.

How many colors should a match-3 board use?

Five is the usual default. Four colors cascade so often that levels feel easy, and six make valid moves rare. Start with five and use a sixth color as a difficulty lever on later levels.

Can I make a match-3 game without coding?

Yes. With Tyrbo you describe the game, answer a few questions, check the plan and play it on your phone. You change goals, move limits and specials by saying what you want, and you can ask for in-game tools to jump between levels while you tune.

How many levels should a first match-3 have?

Ten is enough to teach the swap, two specials, a blocker and a second goal type, with one real spike at the end. Get those ten to feel right before adding more; each extra level is design work, not just content.

Make the game this guide is about.

Get early access

We are letting makers in a few at a time. One email when your spot opens.