Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
GamesNovember 22, 20265 min read

How to make a game like Candy Crush

A match-3 saga is a grid engine plus a few hundred small puzzles with goals. The engine takes days; the level design is the game.

Startbase Team
Editorial ink illustration of a wooden tray of sea glass in a grid with three matching pieces in a row, the middle piece in ember orange

Key takeaways

  • The engine is a loop: swap, find matches, clear, spawn specials, drop, refill, repeat until nothing matches.
  • Levels are goals plus a move limit, and the variety comes from goal types and blockers, not from new rules every level.
  • Difficulty should rise like a saw: a hard level, then two easier ones, so players feel both challenge and relief.

Candy Crush belongs to the match-3 saga genre: swap two neighboring pieces on a grid to line up three or more of the same kind, matched pieces clear and new ones fall in, bigger matches create special pieces, and each level asks for a specific goal within a limited number of moves, laid out along a long map. Making one means building a reliable grid engine first and then designing many small levels. The Candy Crush name, its candies, characters, art, music and levels belong to its owner. Match-3 itself is a long-established genre, and the field rewards a fresh theme with one new rule.

Why match-3 sagas keep players

  • Every move pays out. Even a mediocre swap clears something and causes motion. Cascades add unplanned bonuses that feel like luck and skill at once.
  • Goals turn a toy into puzzles. A move limit and a specific target make players plan, not just match whatever they see.
  • The map shows progress. A long path of level nodes is a visible record of how far you have come.
  • Sessions are tiny. One level takes a minute or two.

The grid engine

A board of 8 by 8 or 9 by 9 cells, each holding a piece of one of five or six kinds (five makes matching easier, six harder). Some cells can be holes so levels can have shapes. One turn runs this loop:

  1. 01Swap: the player drags a piece toward a neighbor. If the swap creates no match, animate it back and do not spend a move.
  2. 02Find matches: scan every row and column for runs of three or more. Collect runs into groups, and detect shapes (a run of four, a run of five, an L or T where a row and column run share a piece).
  3. 03Clear and create specials: clear matched pieces; if the shape earns a special, place it where the player’s swapped piece landed (or the group’s center for cascades).
  4. 04Drop and refill: pieces fall into empty cells below; new random pieces fall in from the top.
  5. 05Repeat: scan again. Each new match in the same turn is a cascade, worth a growing score multiplier.
  6. 06Check for moves: when the board settles, if no swap can make a match, shuffle the board (with a short animation) until one can.

Tip

Generate the starting board without any ready-made matches: when filling each cell, re-roll if it would complete a run of three with the two cells to its left or above. Write the match finder as a pure function and test it on shapes like L, T and crosses before adding any animation.

Special pieces, generically

Most match-3 games converge on a similar ladder of specials because it rewards bigger matches in a readable way. A typical starting set:

  • Match four in a line: a piece that clears its whole row or column when matched.
  • Match an L or T: a piece that clears a small area around itself.
  • Match five in a line: a piece that, swapped with any piece, clears every piece of that kind.
  • Combining two specials by swapping them together creates a bigger effect. These combos are where most of the excitement lives.

This is exactly where your game can become its own. Design specials that fit your theme and do something unusual. The power-ups guide covers making effects readable, and the match-3 boosters prompt shows an original set.

Goals, blockers and the map

A level is data: board shape, piece kinds, move limit, goal and blockers. Goal types to rotate between:

  • Score: reach a target score.
  • Collect: clear 30 of one kind, or 20 of two kinds.
  • Clear the floor: cells have a layer underneath that clears when a match happens on top.
  • Drop items: special pieces that cannot be matched must reach the bottom row.

Blockers add texture: a covering that needs one or two adjacent matches to break, a locked piece that cannot be swapped until matched, a spreading growth that takes a cell each turn you do not clear one. Introduce one new element every few levels, give it a solo level to learn it, then mix it with earlier ones. Twenty to thirty levels is a good first release; the difficulty curve guide explains the sawtooth pattern (a spike, then two easier levels) that keeps players from burning out.

A word on lives and boosters

Many games in this genre limit attempts with lives that refill over time and sell extra moves or boosters. That works commercially but is easy to overdo, and players notice when levels feel tuned to force a purchase. For a web game, start generous: unlimited attempts, a few free boosters per day, and optional cosmetic purchases. The web game monetization guide lays out options that do not poison the puzzle.

Three twists that make it yours

  1. 01Gravity that turns. Each level (or each special) sets which way pieces fall: down, left, up. Cascades go in new directions and players rethink every board.
  2. 02Recipes, not colors. Matches collect ingredients, and the goal is a set of recipes (three shells and two pearls make a necklace). The board is the same, the planning is different.
  3. 03A creature that moves. A small character walks across the board each turn toward an exit, and matches next to it clear its path or redirect it. Every level becomes a tiny escort puzzle.

A brief for an original match-3 game

A match-3 puzzle game called Tidewell, portrait, phones first. The board is an 8 by 8 tide pool (some levels have rock holes) filled with five kinds of sea glass: green, blue, amber, white and lavender. Drag a piece onto a neighbor to swap; swaps that make no match slide back for free. Runs of three clear; cascades multiply score. Specials: a run of four makes a wave piece that clears its row and column at once; an L or T makes a whirlpool that pulls in and clears every piece within two cells; a run of five makes a lighthouse that clears all pieces of the kind it is swapped with. Twist: the tide changes direction. Each level states whether pieces fall down, left or right, and the moon piece, when cleared, rotates the flow by 90 degrees. Goals: collect counts, clear sand from under cells, or bring floating bottles to the edge the tide flows toward. Move limits per level, 3 stars by score. A winding beach map with 24 levels that introduces barnacles (need two matches) at level 7 and spreading seaweed at level 15. No lives: unlimited retries. Gentle wave sounds, glassy clinks that rise in pitch through a cascade. Reshuffle with an animation when no move exists.

Pitfalls

  • Matches resolved mid-animation. Lock input until the board settles, but let players queue the next swap the moment it does.
  • Unreadable specials. Each special needs a distinct shape, not just a glow.
  • Impossible levels. Play every level at least ten times; random refills make difficulty vary, so judge by the average.
  • Too many piece kinds. Six kinds on a small board leads to boards with no moves and constant shuffles.

For the full engine walkthrough without a saga layer, see the match-3 game guide.

Frequently asked questions

How do match-3 games detect matches?

After each swap, scan every row and column for runs of three or more of the same kind, group runs that share pieces to detect L and T shapes, then clear them and repeat after pieces fall until nothing matches.

How many levels does a match-3 game need?

Twenty to thirty well-designed levels is a solid first release. Add more in batches once you see where players stop.

Can I make a candy-themed match-3 game?

You can make a match-3 game with any theme, but do not copy the original’s name, candy designs, characters, art, music or levels. A distinct theme and a new rule protect you and make the game more memorable.

Should my match-3 game have lives?

It is optional. Lives can support monetization but frustrate players if overused. Many small web games do better with unlimited retries and optional extras.

On this page

  • Why match-3 sagas keep players
  • The grid engine
  • Special pieces, generically
  • Goals, blockers and the map
  • A word on lives and boosters
  • Three twists that make it yours
  • A brief for an original match-3 game
  • Pitfalls

Keep reading

More in Games
Editorial ink illustration of a wooden toy figure jumping between two stone ledges, the coin above the gap in ember orange
GamesNovember 22, 2026

How to Make a Platformer Game with AI

A platformer lives or dies on its jump. Here are the numbers behind a jump that feels fair, how to build levels around it, and how to get an AI agent to build both.

7 min read
Editorial ink illustration of a tin wind-up runner on track pieces laid down ahead of it, the next track piece in ember orange
GamesNovember 22, 2026

How to Make an Endless Runner Game

An endless runner is a level generator with a character on top. Get the chunks, the speed curve and the controls right and the rest is art.

6 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.