# How to make a match 3 game

Source: https://roam.gg/make/how-to-make-a-match-3-game/. Checked November 5, 2026. Roam is our app, and the Roam team wrote this page.

A match-3 game is a grid where swapping two pieces lines up three of a kind. They clear, new ones fall, and sometimes the fall makes another match. The grid takes a weekend to build. Making it feel good on a phone is the real work.

## Build it step by step

- **1. Store the board**: A 2D array, about 8 by 8, holds one color number per cell. Draw the pieces from the array, never the other way round.
- **2. Fill it with no ready matches**: When you place each starting piece, pick again if it would make three in a row.
- **3. Swaps**: Swap two neighbors. If no match forms, swap them back. That bounce teaches the rule.
- **4. Match check**: After each move, scan rows and columns for three or more of the same piece.
- **5. Cascades**: Cleared pieces leave gaps. Pieces above fall, new ones drop in, and you check again until nothing matches.
- **6. Special pieces**: Match 4 for a line clear, 5 for a color bomb, an L or T shape for an area blast. Candy Crush Saga (King, 2012) made these famous.
- **7. Dead boards**: If no move is possible, shuffle. Players should never be stuck.

## Level goals turn it into a puzzle

Endless swapping is a toy. Levels add goals: reach a score in 20 moves, clear tiles under the pieces, drop items to the bottom. A goal plus a move limit makes each level a small puzzle. Bejeweled (PopCap, 2001) was score-based; Candy Crush added level goals and a map to travel.


## Tools and phone tips

- **Unity**: The most common choice. You need a 2D array for the board, the match check, and tweened animations for swaps and falls.
- **Godot**: Free, light on phones and strong in 2D. The same logic, written in GDScript.
- **GDevelop**: Free, event-based and has phone apps. Workable for simple boards.
- **Construct 3**: A browser editor with event sheets, and older Construct 2 tutorial series build a whole match-3 step by step. The free edition stops at 50 events, which a full match-3 may outgrow.
- **Phone tips**: Big pieces (about 8 by 8 fits a phone screen), swipe to swap, a rising sound for each cascade step, and pieces that pop instead of vanishing.
- **Roam**: Free to download and play, and making works without a subscription. Describe the board, the pieces and the goal, and it comes back playable on iPhone. Change it by asking: "add a bomb piece", "15 moves only".

## Play it on Roam

- [Pour, Cork, Shelve](https://roam.gg/play/pour-cork-shelve/): A cozy potion shop, a sleepy cat, and vials to sort.
- [Pull the Right Key](https://roam.gg/play/pull-the-right-key/): Pick the key, pop the color, clear the jar.

## Create your match-3 puzzle with Roam

Pick your pieces, a goal and one special piece of your own. Play it on your iPhone and tune the levels by talking.

Try: "match-3 with candy planets, match 4 for a rocket, 20 moves to free 10 trapped astronauts"

[Get Roam on the App Store](https://apps.apple.com/app/apple-store/id6745489251?pt=126889634&mt=8&ct=gg-how-to-make-a-match-3-game)

## Questions people ask

**What is a match 3 game?**
A puzzle game on a grid. You swap two neighbors to line up three or more of the same piece, they clear, and new ones fall in. Bejeweled and Candy Crush Saga are the famous ones.

**How do you make a match 3 game in Unity?**
Store the board in a 2D array, check rows and columns after each swap, clear matches, drop pieces down, fill from the top and check again.

**Why are match-3 games so popular?**
They are easy to learn, fit short sessions on a phone, and cascades give surprise rewards the player did not plan.

**How many piece colors should a match-3 game have?**
Five or six is typical. Fewer makes matches too easy; more makes the board feel random.

**How do you make a simple matching game?**
For a memory game, lay out pairs of cards face down, flip two per turn and keep them if they match. It is a good first project before a match-3, since there are no cascades.

**Can a 12 year old make a match 3 game?**
Yes. Scratch is free and made for ages 8 to 16, and a simple grid game is a good project there. Roam is rated 13+ on the App Store.

## Sources

- Candy Crush Saga by King, 2012: https://en.wikipedia.org/wiki/Candy_Crush_Saga
- Bejeweled by PopCap Games, 2001: https://en.wikipedia.org/wiki/Bejeweled
- Construct 3 free edition: 50 events: https://www.construct.net/en/make-games/buy-construct
- Scratch is free and designed for ages 8 to 16: https://scratch.mit.edu/help/about/

Product names belong to their owners. Roam is not affiliated with them.

## About Roam

Roam ("Roam - Make Games" on the App Store) is an iPhone app where you play games and make your own by describing them or from a photo. It is free to download and play, and making games works without a subscription; optional Spark and Reality plans and credit packs add more creation. Android: pre-register on Google Play. https://roam.gg
