How to Make a Puzzle Game with AI
From First Idea to Worldwide Launch — Build, Publish, and Grow with AI
— From Concept to Launch —
Author: Author & AI Partner English Edition
Preface
This book was written by two people.
One is a human author who has built games and shipped them to the world. The other is an AI — a partner who sat right alongside, writing code, tossing out ideas, and helping push through every obstacle along the way. That's exactly why the cover says "Author & AI Partner."
Just a few years ago, the idea that someone with zero programming experience could build their own game, publish it to the world, run ads, and actually attract players sounded like a distant dream. There was simply too much to learn: programming languages, dev tools, servers, app store reviews, marketing… Most people gave up before they even got started.
But everything has changed. AI is now your partner.
Today's AI can:
- Take your idea — "I want to make a game like this" — and turn it into working code.
- When something isn't behaving right, help you track down exactly what's wrong.
- When you ask "how do I make this more fun?" fire back with dozens of ideas.
In other words, your job is simply to think about what you want to build, tell your AI partner, try what comes out, and then say "I'd like to tweak this part." That's it. You don't need to memorize a single line of code. We're living in an era where anyone can make a game.
What Makes This Book Different
There are plenty of books about making games. But this one is different in three key ways.
-
Everything is written with AI as your partner from the start. You won't find "memorize this function first" anywhere in these pages. Instead, you'll see "ask your AI like this." What you're actually learning isn't syntax — it's how to talk to AI and how to evaluate what comes back.
-
We don't stop at copying — we take you all the way to inventing. The goal isn't just to be able to build a classic match-3. We go one step further: creating rules that are yours alone — something nobody has seen before. In Chapters 11 and 12, the author walks you through the entire invention process behind original games that were built exactly this way.
-
We don't stop at building — we take you all the way to shipping. A game isn't finished until someone plays it. That's why this book covers how to publish for free to the world (Chapter 15), how to sync saves across devices (Chapter 16), how to ship as a mobile app to the app stores (Chapter 17), and how to run ads to attract players (Chapter 18) — all with real numbers. The author shares how much was spent on ads, how many players showed up, what worked, and what flopped — nothing held back.
What You'll Build
In the first half of the book (Chapters 6–10), you'll work alongside AI to build a match-3 puzzle game from scratch that runs right in the browser. No installation, no cost — a game anyone in the world can play on their phone or PC.
In the second half, you'll use that experience as your foundation and reverse-engineer three games the author actually published — treating them as blueprints.
- Cyber Marge 2048 — A 300-level, 3D neon-drenched puzzle that fuses the sliding mechanics of "2048" with a tilting board.
- Fractas — A fresh take on turn-based match-3 played on a circular board that you rotate. Proof that remixing classic rules can spawn an entirely new genre.
- Cyber Slide — A real-world example of taking the same game and repackaging it for multiple platforms.
These aren't hypothetical examples. They're real games — live on GitHub, CrazyGames, and Playgama — that have been advertised and played by real players. Every wall the author ran into and every solution found in making and running those games is woven into the fabric of this book.
Let's Get Started
All you need is a computer with an internet connection and an account to chat with AI (most are free to start). No special software to buy. No expensive hardware required.
Let's set off on a journey with the best partner you've ever had — and build a puzzle game the world has never seen before.
How This Book Is Organized
This book is divided into six parts.
- Part I — Discover (Chapters 1–2) …… Why puzzle games? What kinds of puzzles are out there? You'll build a mental map of the landscape of ideas.
- Part II — Get Ready (Chapters 3–5) …… Review the full syllabus for this book, set up your development environment, and learn the art of talking to AI.
- Part III — Build (Chapters 6–10) …… Working alongside AI, you'll build a complete match-3 puzzle game from the ground up. This is the heart of the book.
- Part IV — Invent (Chapters 11–14) …… Dissect the author's real-world projects, discover how to generate rules that are uniquely yours, and polish your visuals and sound.
- Part V — Ship It (Chapters 15–17) …… Publish your game for free, sync saves to the cloud, and ship it as a mobile app to the app stores.
- Part VI — Reach Players / Appendices (Chapter 18 + Appendices A–D) …… Run ads to grow your player base, explore monetization, and get instant access to a prompt library, troubleshooting guide, and glossary.
How to Use This Book
This book is designed to work as a proper textbook. Each part includes chapters for learning the theory alongside hands-on "How To" chapters where you put it into practice.
Reading alone will give you knowledge — but don't stop there. When you hit a prompting example in a "How To" chapter, actually type it into your AI, run the code that comes back, and tinker with it yourself. That's when knowledge stops being passive and becomes real creative ability.
Icon guide - 💬 Prompt to try … A ready-to-copy prompt you can send straight to your AI. - 🛠 Hands-on … Something to actually try and do. - ⚠️ Pitfall … A trap the author stumbled into — and how to get out of it. - 💡 Going further … Advanced challenges to tackle once you're feeling confident.
Now let's dive in — starting with Chapter 1.
Chapter 1 Introduction
1.1 Why Build a Puzzle Game — Right Now?
"I want to make my own puzzle game!"
If that's you, great news: now is the perfect time. This book is your guide to making that dream happen.
There are two big reasons why building a puzzle game is such an exciting challenge.
A Massive Market Full of Opportunity
Puzzle games are played by people of all ages and backgrounds, all around the world. The global mobile puzzle game market is worth over $12 billion a year (based on 2024 projections). Some hit titles bring in more than $1 billion in a single year. Your game has a real shot at reaching players everywhere on the planet.
And here's what makes puzzles especially appealing: they're something one person (plus an AI) can actually finish — and still compete on the world stage. You don't need a team of dozens or years of development time the way you would for a big-budget RPG. All it takes is a good idea, a simple set of rules, and a well-polished feel. With those ingredients, an indie creation can stand shoulder-to-shoulder with titles from major studios. In fact, the games the author shares later in this book were each built solo — just one person and an AI — and delivered to players around the world.
A Treasure Chest of Undiscovered Ideas
Sure, there are famous formulas like Tetris and match-3 — but the world of puzzle games is still full of unexplored ideas waiting to be found.
At the heart of every great puzzle is deep, strategic gameplay that emerges from simple rules. And new rules don't have to come from nowhere. Tweaking or combining existing rules can produce a completely fresh experience. What if you took 2048 (merge numbers) and added a mechanic where the whole board tilts and everything slides at once? What if you took a square match-3 grid and made it circular — and let players rotate it? Those are real examples of how the author invented new games (Chapters 11 and 12).
This book is your invitation to invent something like that — and we're going to do it together.
1.2 What This Book Is Really About: From "Imitation" to "Invention"
The goal of this book isn't just to teach you how games are made. The real goal is this: create a puzzle game that nobody has ever seen before — your own original idea — and get it out into the world.
To get there, we'll move through two big stages:
- Learn the fundamentals: Start by learning how to build the core experience of a classic puzzle game — like match-3. This is your foundation for everything that comes next. (Part III)
- Invent something new: Then take those fundamentals and use them to design your own rules and bring your ideas to life. (Part IV)
And the book doesn't stop there. We'll take you all the way through publishing your game and finding players (Parts V and VI). A game isn't truly done until someone's playing it.
AI is going to be a powerful partner for you at every step — especially on that creative leap from "learning" to "inventing."
1.3 Your Best Partner: AI
Every game developer hits moments of doubt — a design that isn't clicking, a technical problem that won't budge. But here's the thing: you've got an incredible (AI) partner on your side.
In this book, you'll use AI in four key ways:
- Ideas brainstorm partner: Need inspiration? Just ask. "What happens if I mix match-3 with a falling-block mechanic?" and your AI partner will hand you a handful of directions to explore.
- Rapid prototyping: AI can turn your idea into playable code — fast. Even if you've never written a line of code in your life, that's okay.
- Rule experimentation: Wonder "what would happen if the rules worked like this?" You can test that with AI in a conversation. Don't like the result? Try again. And again.
- Debugging help: "This part isn't working." "The colors aren't changing for some reason." Describe what's happening and AI will help you track down the cause.
The development cycle this book proposes looks like this:
"Idea → Test it with AI → Mockup → Refine"
This is mockup-driven development, and we'll dig into it in Chapter 5. This approach lets you explore your own game quickly and deeply — testing ten ideas in a single evening is totally realistic.
Two Types of AI — Know When to Use Each
This book uses two broad categories of AI. You don't need to worry about the distinction right away, but keep it in the back of your mind.
- Conversational AI (ChatGPT, Claude, etc.): Your chat-based thinking partner. Use it for brainstorming, bouncing ideas around, generating short snippets of code, and troubleshooting errors. Most of what we do in this book runs on this type.
- Coding AI (Claude Code, etc.): An AI that reads and writes files directly on your computer, then runs the code it generates. This becomes especially valuable once your game grows larger (Part IV and beyond).
Both follow the same principle: tell them what you need in plain language, and they'll do it. Start with conversational AI — it's the easiest place to begin.
1.4 How to Use This Book
This book works both as a course and as a reference you can dip into. Conceptual chapters are paired with hands-on "How-to" chapters so theory and practice always go together.
When you work through the hands-on chapters — actually chatting with AI, actually running code — you're building something more than knowledge. You're building real creative muscle. So don't just read. Talk to the AI, run what comes out, and see it move.
Throughout the book, you'll see these icons:
- 💬 Prompt to try … Ready-to-use prompts you can paste straight into an AI.
- 🛠 Hands-on … Something to actually try and do.
- ⚠️ Pitfall … Traps the author personally fell into — and how to dodge them.
- 💡 Going further … Extensions to explore once you're comfortable.
Chapter 3 lays out the full syllabus — treating this book as a 12-session course. If you like to see the whole map before you start the journey, head there next. If you're the type who'd rather just dive in and start building, feel free to jump straight to Chapter 4 and get your environment set up.
Ready? Let's set out on this adventure — you, me, and the best AI partner you've ever had — to build a puzzle game the world has never seen.
Sidebar: Do You Really Not Have to Learn to Code? Halfway true — but it's more accurate to say the way you learn changes. In the old days, you had to memorize syntax and function names before you could write a single line. From now on, you let AI write the code first, run it, read it, and gradually start to understand what it means — in that order. Think of it less like reading a swimming manual before getting in the pool, and more like jumping in with floaties (the AI) already on. Before you know it, you can swim a little without them. By the time you finish this book, you may not be able to write code from scratch — but you'll absolutely be able to read it and give AI precise instructions to fix it. And that's all you need to ship a game.
Chapter 2 Types of Puzzles
Puzzle games come in countless flavors. In this chapter, you'll survey the most common rule sets and walk away with a map for generating new ideas.
This isn't just a taxonomy. It's raw material for asking yourself, "What if I combined this rule with that one?" When you reach Part IV and invent your own game, the building blocks you pick up here will come in handy. As you read, mark anything that sparks a "that's cool" or "I want to mash these two together" reaction.
For each category, you'll find the following:
- Overview: What kind of puzzle it is
- Reference games: Well-known titles
- Player goal: What players are trying to achieve
- The fun: Why players get hooked
- The challenge: Where the satisfying difficulty comes from
- Rule details: How the game actually plays
- 💬 Prompt to try: A ready-to-use prompt you can hand to an AI when you want to build a prototype of this type
The 💬 prompts don't need to be run just yet. They're here to give you a feel for what you can get from an AI by asking the right question. You'll start building for real in Chapter 6.
2.1 Match-3
- Overview: The most iconic puzzle format — swap adjacent pieces to line up three or more of the same color or shape, and watch them disappear.
- Reference games: Candy Crush Saga, Puzzle & Dragons
- Player goal: Clear conditions within a limited number of moves — hitting a target score, clearing specific pieces, and so on.
- The fun: The rush of a chain (combo) as pieces pop off one after another. The satisfying blast of a special piece when you clear four or five at once. The strategy of figuring out which swap will do the most damage.
- The challenge: The pressure of a shrinking move counter. The luck element when unexpected pieces drop in. Obstacles like blocker tiles that get in your way.
[Rule Details] You swap two adjacent pieces to line up three or more of the same type.
Example move: swap B-2 (O for Orange) and B-3 (A for Apple) — A = Apple, O = Orange, G = Grape, L = Lemon, S = Strawberry.
A B C D E
1 G L S G O
2 A [O] A L S ← swap B-2
3 G [A] O S G ← with B-3
4 S L G O L
After the swap, three Apples (A) line up vertically in column B and vanish.
A B C D E
1 G · S G O
2 A · A L S ← matched A's clear
3 G · O S G
4 S L G O L
New pieces fall from above to fill the gaps — and a chain might kick off.
💬 Prompt to try "Build a 6×6 Match-3 puzzle prototype as a single HTML file that runs entirely in the browser. Use five colors of circles as pieces. Clicking two adjacent pieces swaps them; if three or more of the same color align horizontally or vertically, they clear. Pieces above fall down to fill the gaps, and empty spaces are refilled with random colors. Handle chain reactions too. Prioritize mechanics over visuals for now."
🎮 Play it — A real Match-3 built from that exact prompt. Line up three of the same color horizontally or vertically to clear them, and chain combos to rack up your score. In Chapters 6–10, you'll build this same game from scratch alongside an AI.
2.2 Falling-Block
- Overview: Control blocks falling from above, stack them without gaps, and clear rows — the granddaddy of action puzzles.
- Reference games: Tetris, Puyo Puyo
- Player goal: Chase a high score by surviving as long as possible before the stack reaches the top.
- The fun: The satisfaction of slotting a piece in with zero gaps. The rush of clearing multiple lines at once. The mounting tension as the speed ramps up.
- The challenge: You can't choose which shape comes next. Mistakes pile up and create unfillable "holes." At high speeds, there's barely time to think.
[Rule Details] Pieces of various shapes fall from above. You slide them left or right and rotate them to stack them without gaps.
Example move: a T-piece is falling. You shift it right, rotate it, and tuck it into a gap.
Falling Rotated and shifted Full row clears
. T . . . . . . . . . .
T T T . → . . T . → (that row vanishes)
. . . . . . T T ↓ pieces above drop down
■ . . ■ ■ . T ■ ■ . . ■
■ ■ . ■ ■ ■ T ■ ← filled
When a row is completely filled, it clears and you earn points.
💬 Prompt to try "Build a Tetris-style falling-block puzzle as a single HTML file that runs in the browser. Use a 10×20 board. Seven tetrominoes fall from the top; left/right arrow keys move them, up arrow rotates, down arrow speeds up the fall. When a row is completely filled, it clears and adds to the score. Game over when the stack reaches the top."
🎮 Play it — Rotate tetrominoes and stack them tight to clear rows. On PC, use the arrow keys; on mobile, use the on-screen buttons below the board.
2.3 Shape-Fitting
- Overview: Fit a set of differently shaped pieces perfectly into a fixed frame — no overlaps, no gaps.
- Reference games: Tangram, Blockudoku
- Player goal: Place every given piece inside the frame without any piece overlapping another.
- The fun: That "aha!" moment when the last piece snaps into place after a long struggle. The visual beauty of a completed layout. The meditative calm of focused, quiet thinking.
- The challenge: Complex piece and frame shapes. What looks easy at a glance often has exactly one correct solution. Rotating pieces and juggling multiple options keeps your brain working hard.
[Rule Details] You're given several pieces. Rotate and move them to fill the frame without leaving gaps.
Example move: fit an L-piece and a square piece into a 3×3 frame.
Pieces Frame Solved
L . + P P [ . . . ] [ L P P ]
L . P P [ . . . ] → [ L P P ]
L L [ . . . ] [ L L L ]
💬 Prompt to try "Build a Blockudoku-style shape-fitting puzzle as a single HTML file. Use a 9×9 board. Three block pieces (Tetris-like shapes) can be dragged onto the board. When a row, column, or 3×3 block is completely filled, it clears and adds to the score. Game over when none of the three pieces can be placed."
🎮 Play it — Place three pieces onto the 9×9 grid and fill rows, columns, or 3×3 blocks to clear them. Tap a piece to select it, then tap the cell where you want to place it.
2.4 Number Puzzle (Logic)
- Overview: Use number clues to fill in cells through pure logic — no guessing required.
- Reference games: Sudoku, Picross
- Player goal: Fill every blank cell correctly according to the rules.
- The fun: The pure satisfaction of reaching the answer through logic alone, with zero randomness. The joy of realizing "only one number can go here." A detective-like feeling of unraveling the puzzle step by step.
- The challenge: Few starting clues to work from. Some positions only open up when you combine multiple rules at once. Larger grids mean more complexity.
[Rule Details] Follow the rules to place the correct number in each blank cell. In Sudoku, the rule is: no number may repeat in any row, column, or 3×3 block.
Worked example: In the 4×4 grid below, what goes in the top-left ?? (In 4×4 Sudoku, each row, column, and 2×2 block contains 1–4 exactly once.)
+-----+-----+
| 1 ? | 4 3 |
| 2 3 | 1 4 |
+-----+-----+
| 3 1 | 2 ? |
| 4 2 | 3 1 |
+-----+-----+
The top row already has 1, 4, and 3, so the only possibility for ? is 2. You find each answer one logical step at a time.
💬 Prompt to try "Build a playable 4×4 Sudoku as a single HTML file. Include one pre-made puzzle. Let the player click an empty cell and type a number. Highlight any cell in red if it conflicts with another in the same row, column, or 2×2 block. Show a clear message when every cell is correctly filled."
🎮 Play it — Place 1–4 in every row, column, and 2×2 block exactly once. Select an empty cell, then tap the number buttons below to fill it in.
🎮 That was 4 of the 13 playable games.
The complete book takes you all the way — from building your first match-3, to inventing your own game, to publishing it worldwide and getting real players. 18 chapters, all 13 playable games, a full 12-session syllabus, and real revenue data.
📖 Get the full book on Amazon →$4.99 · Kindle eBook