← hiroakiishibashi.com
日本語📖 Amazon
FREE PREVIEW

How to Make a Puzzle Game with AI

From your first idea to a game the world can play — with AI as your co-developer.

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:

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.

  1. 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.

  2. 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.

  3. 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.

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.

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:

  1. 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)
  2. 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:

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.

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:

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:

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

[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.

▶ Play it: Fruit Match (Match-3)

2.2 Falling-Block

[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.

▶ Play it: Falling Blocks

2.3 Shape-Fitting

[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.

▶ Play it: Shape Fit (Blockudoku)

2.4 Number Puzzle (Logic)

[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.

▶ Play it: Sudoku (4×4)

🎮 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