Prototyping Games with AI

Turn your wild idea into a playable prototype in 1 day. Even if you can't code.

Huy Dũng (DaveHD)
huydung.com · 2026
Making a prototype used to need
  • Coding
  • A game engine
  • Art & sound
  • Rules balancing
  • Either a unicorn — or a budget
When prototyping is expensive, ideas stay stuck in notebooks.
1 day
From idea to playable prototype
  • AI handles the full technical execution
  • You decide if it's fun
  • Discard cheaply if it's not

Alone vs AI Chat vs AI Agent

The gap between "AI helps a bit" and "AI does it" is the whole story.
Task Alone + AI Chat + AI Agent
Game design & rules✅ Can do✅ Thinking partner✅ Writes & saves docs
Game programming❌ Needs coding⚠️ Snippets only✅ End-to-end
2D art & sprites❌ Needs art skills⚠️ Generates, you place✅ Generate + integrate
Animation❌ Needs animation❌ Cannot produce⚠️ Basic CSS / sprites
Sound & music❌ Needs audio skills⚠️ Suggests sources⚠️ Sources + wires in
Git & deploy❌ Needs tech skills⚠️ Explains, you do✅ Commits + deploys
Debug & iterate⚠️ Hard to self-fix⚠️ Snippet fixes only✅ Full loop

The method — 8 phases

Skip a phase and you'll pay for it later. Each one earns its place.
THINK
0 · Set up
  • GitHub · VS Code · AI agent
1 · Idea
  • 10+ ideas, rated
2 · GDD
  • Design doc + wireframe
PLAN
3 · TDD
  • Engineering rules baked in
4 · Plan
  • 2–4 milestones
BUILD
5 · Build
  • Milestone by milestone
6 · Bugs
  • Screenshots + console
7 · Iterate
  • Features + docs in sync
8 · Ship
  • Live GitHub Pages link
0

Set up your toolsone-time pain

  • GitHub — store, version, free hosting
  • VS Code — edit, search, manage git
  • One AI coding agent — Claude, Codex, or Gemini
~$20/month for any one of them. Plus / Pro tier — ~500K VND.

Which AI agent?

Mid-2026. Pick what you already have — the prompts work across all three.
Aspect Claude Desktop ChatGPT Codex Gemini Antigravity
Sign-up in VN⚠️ Blocks VN phones☑️ Easy✅ Already have it
Code & reasoning✅ Strongest✅ Strong for games☑️ Solid
Image generation⚠️ None built-in✅ Yes✅ Yes
Video / music⚠️ None⚠️ None✅ Veo · Lyria
Connects to apps✅ MCP, Office☑️ MCP, plugins✅ Native Google apps
Bundled perksNone✅ Free Plus month✅ YouTube Premium · 5TB Drive
The agent interface looks like chat — but it's much more Give it a local folder, set permissions, pick the right model. This is Codex.
Codex agent interface
  • Brainstorm: mid / creative model
  • Tech design & plan: highest, max thinking
  • Coding: start mid, escalate only if stuck
Top models over-optimize for logic, and under-deliver on creativity.
1

Find the ideaThe best one still comes from you

  • Use a creative (mid-tier) model, in English
  • State who plays — first
  • Make AI ask you questions
  • Get 10+ ideas with rated annotations
  • Discuss until clear favorite
If AI jumps straight to answers, you skipped a step. Go back.
Brainstorm prompt A — open (no fixed theme)
PROMPT · Brainstorm — openPHASE 1 · CHAT AI
I want to prototype a game. Help me find ONE creative, fun game idea worth building.

The game is for this audience (the people who'll play it): [DESCRIBE PLAYERS — e.g. "casual mobile players", "kids 8–12", "puzzle fans"].

Let's brainstorm together — ask me clarifying questions first if anything is vague, don't jump straight to answers.

Constraints for the idea:
- Must play well on BOTH desktop and mobile (fun with touch / tap / swipe)
- ONE interesting, reasonably innovative core mechanic — not a clone
- Small enough to prototype in a few hours (a vertical slice, not a full game)

My hobbies / interests to draw from (optional): [FILL IN — e.g. Poker, Pool, Piano, Origami — or delete this line]

When I say "ready", present at least 10 ideas as a numbered list. For each idea:
- One short paragraph describing the gameplay clearly and concretely (what the player does, what the game responds with, what makes it fun — no inspirational fluff, just how it actually plays).
- Annotated ratings: Innovativeness · Mobile fit · Mechanic clarity · Feasibility (hrs) · Player appeal — each rated Low/Med/High with one phrase of reasoning.

Then call out your top 3 picks with one sentence on why each is a strong prototype for this audience.
Brainstorm prompt B — themed (AI researches first)
PROMPT · Brainstorm — with a themePHASE 1 · CHAT AI
I want to prototype a game built around a specific theme. Help me find ONE creative, fun idea worth building.

The game is for this audience (the people who'll play it): [DESCRIBE PLAYERS — e.g. "casual mobile players", "fans of the theme", "kids 8–12"].

Theme: [STATE YOUR THEME — e.g. "Dragon Mania Legends", "Vietnamese folk tales", "outer space"].

First, RESEARCH the theme so the ideas feel authentic:
- Look up the theme's signature elements, characters, mechanics, tone, and visual identity.
- Summarize back to me, in a short list, the 5–8 most distinctive things about it that a game could build on.

Then brainstorm with me. Ask clarifying questions if needed. Each idea must:
- Stay true to the theme's identity
- Play well on BOTH desktop and mobile (fun with touch / tap / swipe)
- Have ONE interesting, reasonably innovative core mechanic — not a clone
- Be small enough to prototype in a few hours (a vertical slice)

When I say "ready", present at least 10 theme-based ideas as a numbered list. For each idea:
- One short paragraph describing the gameplay clearly and concretely.
- Annotated ratings: Innovativeness · Mobile fit · Mechanic clarity · Feasibility (hrs) · Theme authenticity · Player appeal — each Low/Med/High with one phrase of reasoning.

Then call out your top 3 picks with one sentence on why each is a strong prototype that fits the theme and this audience.
Example brainstorm output Claude in normal chat mode. It's a bit of an overkill 😆
Brainstorm output
2

Lock the designWrite the GDD

  • Core mechanic in one sentence
  • Labelled wireframe of main screen
  • Define the vertical slice
  • Write the non-goals
  • Every rule implementable by a stranger
  • No file names, code, formulas, configs
The GDD prompt — generates gdd.md + wireframe
PROMPT · Generate gdd.mdPHASE 2 · CHAT AI
Let's lock the design for [GAME NAME / chosen idea]. Write a PROTOTYPE GDD as a Markdown file: gdd.md

Rules:
- This is a PROTOTYPE design doc, not a commercial GDD. Keep it lean — aim for under ~2 pages.
- Pure design only. NO technical content (no file names, no code, no formulas, no configs) — that goes in the TDD.
- Structure: Pitch · Design Pillars (2–4) · Core Mechanic · Core Loop · Rules · Controls (mobile + desktop) · UI layout/elements · UX flow · Win/Lose · In-Scope (vertical slice) · Non-Goals.
- Every rule must be unambiguous enough that a coder who never spoke to me could implement it.
- Where a number matters (turn limit, hand size, timing window), state it — but keep it in plain language, not code.

Also produce a VISUAL MOCKUP of the main gameplay screen: a clean labelled wireframe (inline SVG or simple HTML/CSS in an artifact) showing where the play area, controls, HUD/score, and key UI elements sit. Keep it schematic, not polished art.

Ask me up to 3 questions if anything is ambiguous BEFORE writing.
A GDD example Preview in the agent app or VS Code. The wireframe pairs with the doc.
GDD example in the editor
3

Write the TDDEngineering rules, baked in

  • Centralized config + zero magic numbers — non-coders can tweak & playtest
  • Self-documenting config — every key has a comment + sensible range
  • Separation of concerns — states, physics, UI decoupled
  • Commit after every turn — build check + conventional message
  • Tests every turn — AI fixes failures before reporting back
  • Logging + non-coder comments — debug easily, modify safely
  • Canvas-only rendering — HTML is just a container
  • Senior-dev voice — guidance for juniors, not implementation detail
The TDD prompt — all principles baked in
PROMPT · Generate tdd.mdPHASE 3 · AGENT
Put on the Game Architect hat. Create tdd.md (Technical Design Document) for this prototype, based on gdd.md.

Move ALL technical content here: architecture, code conventions, math/formulas, and the full list of tunable configs.

The TDD MUST explicitly encode these requirements:
1. Single centralized configuration file. ALL mechanical, physical, and rules-based constants live in one dedicated config file (e.g. src/config.js) so non-coders can tweak and playtest.
2. Zero Magic Numbers. No pixel dimensions, speeds, friction, colors, or turn limits hardcoded in game loop, physics, or render files.
3. Self-documenting config. Every config key has a natural-language comment explaining what it changes and its recommended range.
4. Maximum separation of concerns — decoupled source files between game states, physics, ui, etc.
6. Commit after every turn. On completing a request: run a local compile/build check, and if it passes, do a Git commit with a clear conventional message (feat:/fix:/chore:/test:). If the build fails, fix it first.
7. Automated workspace diagnostics. Before reporting done, verify the local dev server is running; if not, start it. Note any sandbox limitation that blocks running the server/tests locally and tell me to run it on my machine instead.
8. Health & compilation check. Confirm the build compiles cleanly with no errors before reporting success.
9. Logging. Add log messages with essential info at all key interactions for easy debugging.
10. Comments for non-coders. Add enough code comments to guide a non-coder on how to modify important behavior.
11. Tests. Write a test suite for all logic-based code and run it every turn. Update tests for each new feature or design change.
12. ALL UI elements, game characters, event handlers, etc. must be created inside the Canvas. The html is purely a container. Do not put any logic or visuals in html.

IMPORTANT: The TDD should be concise, clear, but not too detailed. It should confirm the overall architecture, and is a doc written by senior developers as GUIDANCE for junior devs to implement, but do not go into actual implementation itself. Ask me about my game's specific layers/mechanic if you need to before finalizing.
A real TDD inside Codex Preview in the agent app or VS Code — both work.
TDD preview
4

Build plan2 to 4 milestones

  • M1 · Foundation — scaffold, config, scene laid out
  • M2 · Core mechanic — the ONE thing that makes it fun
  • M3 · Win/lose + ship — rules wrapped, deployed
No "polish pass" milestone. Every milestone delivers real functionality.
The plan.md prompt — 2–4 meaningful milestones
PROMPT · Generate plan.mdPHASE 4 · AGENT
Put on the Tech Lead hat. Create plan.md — a build plan with 2 to 4 milestones.

Important: the milestones must be split MEANINGFULLY around THIS game's own mechanic — not a generic template. Read gdd.md and tdd.md, then divide the work into functional layers that each build on the previous one and each end in something I can actually play or test. As a rough guide (adapt to the game):
- Milestone 1 is usually the static foundation: scaffold, centralized config, the scene/board/world laid out correctly, HUD placeholders, clean module boundaries. It runs and looks right; the core interaction isn't live yet.
- Milestone 2 is usually the core mechanic itself — the ONE thing that makes the game fun, working end-to-end (input → simulation/logic → feedback). This is the milestone that proves the idea.
- Milestone 3 (if needed) is usually the rules, win/lose, and full game loop wrapped around that mechanic, plus a GitHub Pages deploy so it's shareable. Skip this if the game is simple enough that it can be included in Milestone 2.
Tell me your reasoning for the split before listing the details. Do NOT make the last milestone a generic "polish" pass; every milestone must deliver real functionality.

Each milestone must include:
(a) a short scope paragraph,
(b) a checklist of things to test FROM THE END-USER's perspective,
(c) a single copy-paste prompt for the local AI coding agent — and that prompt must explicitly remind the user to run the test checklist.

Follow tdd.md for all conventions. Write plan.md now. Then summarize back in chat the list of milestones, its main scope, and your reasoning.
A plan.md example Player-perspective test checklists at the end of each milestone.
plan.md example
5

BuildMilestone by milestone

Run this once, early
  • Init repo, commit current files
  • After every turn: build check → commit
  • If build fails: fix before committing
  • If design shifts: update GDD/TDD live
Set the git + commit habit
PROMPT · Initialize git + commit habitPHASE 5 · AGENT
Initialize a git repo and commit all current files in this folder.

From now on, in ALL of our conversations, after each turn:
- Run a build/compile check; if it passes, commit all changes with a clear, concise, conventional message (feat:/fix:/chore:/test:)
- If the build fails, fix it before answer back and committing.
- If you notice a change in game design or technical direction in my instructions compared to the gdd.md or tdd.md — update those files to sync with latest information
  • Run milestone prompt → do the test checklist
  • Converse: say what to change
  • Tweak config yourself in VS Code
  • After milestone: refresh docs
  • Stay in session while in flow
  • Fresh session when AI loops or gets confused
Run a milestone
PROMPT · Run a milestonePHASE 5 · AGENT
We are building [GAME NAME]. Read gdd.md, tdd.md, and plan.md first.

Execute Milestone [1 / 2 / 3] from plan.md, following every convention in tdd.md (centralized config, zero magic numbers, separation of concerns, incremental edits, logging, comments, tests, commit-after-turn).

Work in small testable steps. When done, verify that the game is runnable and accessible via an URL, create and run tests on the logic parts, report the results.

After everything is done, show user both the URL to test the game AND the list of things to verify on their end, for this milestone.
Milestone 1 — agent builds the foundation Scaffold, config, scene laid out. The game runs but mechanic isn't live yet.
Milestone 1 session
Milestone 2 — the core mechanic working Input → simulation → feedback. The milestone that proves the idea.
Milestone 2 session
The test suite catches its own regressions When AI breaks something, the suite tells AI — AI fixes it before reporting back.
Test suite identifying breaking change
6

Fix bugs smartEvidence beats words

Three bug prompts

Match the prompt to the bug type. Evidence in, fix out.
📷 Visual / UI bugPHASE 6
Here's a visual/UI bug. [ATTACH SCREENSHOT]

What's wrong: [DESCRIBE what you see vs. what you expect]

Find the cause, fix it via the centralized config or the render layer (not by hardcoding), keep the fix incremental, then tell me exactly what you changed and which config value I can tweak to adjust it further.
🪵 Logic bugPHASE 6
Here's a logic bug. Console output below. [PASTE the full console log from F12 → Console]

What happened: [DESCRIBE the wrong behavior]
What I expected: [DESCRIBE correct behavior]

Diagnose the root cause, add temporary debug logs if helpful, fix it incrementally, update the relevant test, and explain the fix in plain language.
🧭 Stuck — diagnose firstPHASE 6
We've been stuck on this bug for a while. Don't patch blindly.

First, review the relevant code end-to-end and explain to me, in plain language, the full flow of how [FEATURE] is supposed to work. Then point to where the flow breaks. Wait for my confirmation before changing anything.
DevTools console + screenshot Two killer tools. Most logic bugs land here.
DevTools console
Tracing a logic bug Sometimes the unblock is a sharp human observation, not AI.
Tracing a logic bug
  • Watch AI's reasoning — stop early if wrong
  • Tell it to add debug logs when bugs are subtle
  • Fresh session if stuck for a while
  • Human observation still wins sometimes
Two killer tools: screenshots and console logs.
7

IterateFeatures & docs in sync

  • One feature at a time — AI proposes before coding
  • Run parallel agents on independent tasks
  • Refresh docs after meaningful changes
  • Fresh session when AI loops — paste docs first
Two iterate prompts — add a feature · refresh the docs
PROMPT · Add a new featurePHASE 7 · AGENT
Read the current docs (gdd.md, tdd.md, plan.md).

I want to add this feature: [DESCRIBE the feature clearly — what the player does, what the game responds with]

Before coding: propose how you'd implement it, what files you'd touch, and flag any risks. Wait for my go-ahead before writing any code.
PROMPT · Keep docs up to datePHASE 7 · AGENT
Review the current state of the code and update gdd.md, tdd.md, and plan.md to reflect what we actually built and any decisions that changed along the way. Keep each doc concise — remove anything that's no longer accurate, add anything that's now true. Commit the updated docs.
  • Scrape reference sites for assets
  • Generate sprites (Codex game-studio plugin)
  • Remove image backgrounds, resize, flip
  • Find assets in folders of thousands of files
  • Even build full game editors
Generate game sprites Codex's game-studio plugin produces sprite series from a description.
Generate game sprites
Scrape reference assets Pull dragon images from a fan wiki, normalize them for the game.
Scrape reference assets
Find assets in folders of thousands "Find me a wave splash sprite in this 2,000-file pack." Done in seconds.
Explore assets in a large pack
Even build a full game editor Level-editing UI, generated end-to-end. For the prototype that needed it.
Custom game editor
Bulk image editing "Remove white backgrounds from these 40 sprites, then flip the right-facing ones." 30 seconds.
Bulk image edit
8

ShipOne link. Real players.

  • AI prepares the GitHub Actions workflow
  • GitHub → Settings → Pages → Source: GitHub Actions
  • Test the live URL on a real phone
  • Send to playtesters — collect feedback
Every push auto-updates the live link. No manual deploy ever again.
Set up auto-deploy to GitHub Pages
PROMPT · Set up auto-deploy to GitHub PagesPHASE 8 · AGENT
Prepare this project for a GitHub Pages workflow that auto-publishes after every push to the main branch.

Do everything you can yourself (create the workflow file, set the correct build/base settings, commit, push). Then tell me exactly what I need to do on my side in the GitHub web UI, step by step.
Dragon Draw Defense — main screen huydung.github.io/Dragon-Draw-Defense · shipped this exact way.
Dragon Draw Defense main
Dragon Draw Defense — mid game Draw a glyph. Strike the matching dragon. Score climbs.
Dragon Draw Defense mid-game
Dragon Draw Defense — late game Difficulty ramps; more dragons, faster. The pressure test.
Dragon Draw Defense late game
Dragon Draw Defense — game over Score, summary, replay. The end of the loop.
Dragon Draw Defense game over
Another prototype — PokerPool Mash-up of poker and pool, built end-to-end with this same workflow.
PokerPool prototype
2–6 hrs
Across 2–3 sessions
  • 5-hour rolling token windows
  • If mechanic is proven fun: stop there
  • That was the goal

One-glance recap

PhaseOutputModelTool
1 · IdeaIdeas list → 1 chosen ideaCreative / midChat AI
2 · Game Designgdd.md (≤2 pages) + wireframeCreative / midChat AI (Canvas)
3 · Tech Designtdd.md (principles baked in)HighestAgent
4 · Project Planplan.md (2–4 milestones)HighestAgent
5 · BuildPlayable prototype + spritesMid first, escalateAgent + VS Code
6 · BugsScreenshots + logs → fixesMid first, escalateAgent
7 · IterateAdd features, docs in syncMid first, escalateAgent
8 · ShipLive GitHub Pages linkMid first, escalateAgent + GitHub
  • AI does the technical heavy lifting
  • You bring the idea, the taste
  • You make the call: worth pursuing or not
The part that matters — still you.

Now go prove
your idea is fun.

Bring your ideas, curiosity, and passion. We'll make something fun.

Huy Dũng (DaveHD)
huydung.com