← 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 13 and 14, 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 19), how to sync saves and run leaderboards across devices (Chapter 20), and how to ship as a mobile app to the app stores (Chapter 21). And then past that — launch day isn't the finish line, it's the start of observation. Read the numbers and rebuild the game (Chapter 22), run ads and gather players (Chapter 23), and keep building rather than stopping at one game (Chapter 24) — 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 7–11), 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. Then in Chapter 12 you'll go one step further and have an AI play it automatically to verify it works.

In the second half, you'll use that experience as your foundation and reverse-engineer games the author actually published — treating them as blueprints.

These aren't hypothetical examples. They're real games — published on GitHub, Playgama, and elsewhere — 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 has 24 chapters across six parts. Underneath, it's only four stages: build → invent → ship → grow.

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. - 🎮 Play it … A sample game you can play on the spot. In the digital edition it opens right in your browser; in print it's shown as a screenshot. - ⚠️ Watch out … 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 13 and 14).

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 6. 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?" As you read, mark anything that sparks a "that's cool" reaction.

The chapter covers the eight most important types in detail. The remaining six — word, hidden object, physics, quiz, timing, and spot-the-difference — live in Appendix E, "Puzzle Catalog," each with a playable sample, alongside a quick-reference table of all fourteen.

For each type, you'll find the same six fields, followed by a 💬 Prompt to try:

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


2.1 Match-3

[Rule Details] You swap two adjacent pieces to line up three or more of the same type. Swap the Orange (O) at B-3 with the Apple (A) at C-3, and three Apples (A) line up vertically in column B and vanish. (A = Apple, O = Orange, G = Grape, L = Lemon, S = Strawberry.)

Match-3: swap two pieces, line up three, and they vanish
Match-3: swap two pieces, line up three, and they vanish

New pieces fall from above to fill the gaps — and a chain might kick off.

The author started here too. Both the original seed of Cyber Marge 2048 and Fractas, which rebuilds the same idea on a circular board, trace back to this one format.

💬 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. In Part III 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 tightly; when a row is completely filled, it clears.

Falling blocks: rotate, slot them in, and clear a full row
Falling blocks: rotate, slot them in, and clear a full row

💬 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 — Stack the pieces tight and clear a full row.

▶ Play it: Falling Blocks

2.3 Shape-Fitting

[Rule Details] Rotate and move the pieces to fill the frame without leaving gaps. Below, an L-piece and a square piece are fitted into a 3×3 frame.

Shape-fitting: fill the frame with the pieces, leaving no gaps
Shape-fitting: fill the frame with the pieces, leaving no gaps

No gaps, nothing hanging over the edge. That's where this format's pleasure lives.

💬 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 — Fill rows, columns, and 3×3 blocks to clear them.

▶ Play it: Shape Fit (Blockudoku)

2.4 Number Puzzle (Logic)

[Rule Details] In Sudoku, the rule is that no number may repeat in a row, a column, or a block. In the 4×4 grid below — where each row, each column, and each 2×2 block holds 1 through 4 exactly once — what goes in the top-left ??

4×4 Sudoku: 1 through 4 exactly once in every row, column, and 2×2 block
4×4 Sudoku: 1 through 4 exactly once in every row, column, and 2×2 block

The top row already has 1, 4, and 3, so ? can only be 2. You fill the grid 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 through 4 exactly once in every row, column, and 2×2 block.

▶ 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 letting AI playtest it, to inventing your own game, publishing it worldwide, and growing it with real numbers. 24 chapters, all 13 playable games, and what actually happened after shipping.

📚 Free to read with Kindle Unlimited.

📖 Get the full book on Amazon →

$2.99 · Kindle / $19.99 · Paperback