Make a game with AI: 10 prompts to copy
On this page
A prompt to make a game with AI works best as a short brief that says what the game is, what it runs on, what it mustn’t do and how you’ll know it’s done. The ten prompts below take a build from the first idea all the way to a fresh start.
We wrote them from the tools’ own guidance, and we haven’t measured them against each other. Paste them into a chat app or a coding agent and fill in the brackets. The tool facts on this page are as of September 2026, and each one links to its source.
Give the agent a finish line
The tools’ own docs come from three different companies, and they agree on four habits.
- Goal, context, constraints and a finish line. OpenAI’s Codex guide says a good default prompt has the goal, the context, the constraints and a “done when” line (Codex best practices).
- A check the agent can run. Anthropic’s guide says to give Claude a check it can run, such as tests, a build or a screenshot to compare (Claude Code best practices). Cursor’s guide says much the same, that you should give the agent clear signals for whether changes are correct (Cursor).
- Specific symptoms. For a bug, Anthropic suggests giving the symptom, the likely location and what “fixed” looks like (Claude Code best practices).
- A plan for bigger work. Codex and Cursor both toggle a plan mode with Shift+Tab, and Codex also takes
/plan(Codex best practices, Cursor). Anthropic, for its part, says to skip the plan if you could describe the diff in one sentence.
Anything you’d repeat in every prompt belongs in the rules file your agent reads on its own. Claude Code reads CLAUDE.md, Codex reads AGENTS.md (Claude Code best practices, Codex best practices), and Cursor reads markdown rules from .cursor/rules/ (Cursor). For a small game, four lines are plenty.
# Game
- One-screen dodge game, plain JavaScript, one canvas, no libraries.
- Run it with `npx vite` and open http://localhost:5173.
- After every change, play one round and report what the score screen shows.
- Tuning numbers live in src/config.js; never inline them.
How much can one prompt do?
Sometimes one prompt really is enough for a small game, at least according to two entries in our catalog, while others describe review passes and weeks of work. These aren’t measurements, just statements from creators and repositories in our catalog on September 29, 2026.
According to its repository, little flock, a networked 3D game with its own server, was made in one shot with GPT-6 Astra in Codex. The repository of Ombres goes even further and says Claude Opus 5.5 designed and built it from a single brief, with a human supervising and all of the code written by the model. The work ran as multi-agent workflows in Claude Code.
Others describe more steps. Chess3dastra’s repository says it was built in the GitHub Copilot app with GPT-6 Astra from four prompts, including a review pass by a second agent.
The creator of Ranger Danger says it was the most fun loop among several one-shot ideas they tried, so the one-shots were basically sketches to choose from. Kanso took about a week with Codex, and Doctrine about two weeks with Cursor, according to their creators.
Copy a prompt and fill in the details
The prompts follow the order of a build, from the brief and a first slice through one change at a time, fixes and a review, to a restart when a session stops getting anywhere.
1. Ask the chat app for one HTML file
Make a complete browser game in one HTML file with no external libraries. The game: [one sentence]. Controls: arrow keys and touch. A round lasts about [60] seconds and ends on a score screen with a restart button. Put the tuning numbers in constants at the top of the script and keep the code readable.
2. Ask for an interview before building
I want to build [a small browser game]. Interview me about the core loop, the controls, how a round ends, the art and sound, and whether it must work on phones. Ask about the hard parts I might not have considered. When we have covered everything, write the answers to SPEC.md.
This one adapts the interview prompt in Claude Code’s guide, where Claude writes the spec to SPEC.md (Claude Code best practices). Codex’s guide has a pretty similar idea and suggests asking Codex to question you and challenge your assumptions before it writes code (Codex best practices). Its browser-game use case even starts from a PLAN.md file (Codex use case).
3. Give the goal, context, limits and finish line
Goal: a [90]-second dodge game where you steer a small ship through falling rocks. Context: an empty folder, plain JavaScript and one canvas. Constraints: pointer events for mouse and touch, no libraries, relative asset paths. Done when: I can play a full round on my phone and it ends on a score screen.
It’s OpenAI’s four parts in order, so each line answers a question the agent would otherwise have to guess at.
4. Build a small playable slice
Build only the smallest playable version: [movement, one hazard and a score]. No menus, no sound, no art files. Run the game, tell me exactly what you see and list what you left out.
Then actually play it before you ask for anything else.
5. Add one mechanic at a time
Add [a second enemy type that fires every 3 seconds]. Change nothing else. Tell me which files you touched, then run the game and check that a round still starts, ends and restarts.
6. Report what happened and what fixed looks like
The score stays at 0 after the second round. Look at the reset code in [src/game.js]. Fixed means the score returns to 0 at the start of every round and then counts up. Write a test that reproduces the bug, then fix it and run the test.
That covers the three things Claude Code’s guide asks for in a bug report, which are the symptom, the likely location and what fixed looks like.
7. Tune the feel
The jump feels floaty. Make the jump peak at [2] tiles and make falling [30]% faster than rising. Let a jump still work for [100] ms after the player leaves a ledge. Put every number in a named constant and tell me what each one does.
8. Measure the speed
Add an on-screen frame rate counter that I can toggle with a key. Then spawn [50] enemies, find what slows the game most, fix it and tell me the frame rate before and after.
9. Request a review before making fixes
Review everything changed since the last commit for bugs that would break a round: score, input, restart, and win or lose. Report only problems that affect play, with the file and line for each. Do not suggest style changes.
Claude Code’s guide describes a writer and a reviewer in separate sessions. It also warns that a reviewer told to find gaps will usually report some, so tell it to flag only gaps that affect correctness or the stated requirements.
10. Restart with a sharper brief
Summarize this project for a new session in under [200] words: what the game is, what works, what is broken and what we already tried that failed. End with the next step.
It sounds drastic, but Claude Code’s guide says that after two failed corrections you should clear the session and start again with a more specific prompt.
Put each prompt where it can act
Prompt 1 goes in a chat app, and prompts 2 to 10 go in a coding agent.
| Where | Prompts | What the maker says |
|---|---|---|
| A chat app such as Claude or Gemini | 1 | Claude artifacts open in their own window beside the conversation, on every plan including Free (Anthropic). Gemini’s Canvas turns a described idea into a working, shareable app or game (Google) |
| A coding agent such as Claude Code, Codex or Cursor | 2 to 10 | Claude Code can read your files, run commands and make changes (Anthropic). Codex’s guide asks for the files and folders that matter as context (OpenAI). In Cursor, @ attaches a file or folder, and the agent searches for the rest when you don’t (Cursor) |
For tool prices and plans, best AI game makers has a full table.
Build the whole game one slice at a time
How to make a game with AI and vibe coding a game cover the whole route, while Claude Code game development and Codex game development go deeper on each agent.
For art and asset prompts, there’s how to make game assets with AI, and how to make a mobile game with AI has prompts for phones. Vibe coding game jam turns all of this into a jam plan.
To see what each tool has made, browse the Claude Code, Codex, Cursor, Claude app and Gemini app hubs.
Games to look at
, Online multiplayerlittle flock
Tend a shared flock of sheep on a cozy farm with other players.
Ombres
Steer a giant bird whose shadow paints the desert; biggest territory at nightfall wins.
Chess3dastra
Play chess against a computer opponent on a 3D or 2D board.
, Phone friendlyRanger Danger
Defend your base by placing defenses and fighting enemies yourself in pixel-art combat.
, Phone friendlyKanso
Grow and tend digital bonsai trees in calm, pretty scenes.
, Phone friendlyDoctrine
Summon conquered armies from spellcards and battle rival wizards in real time.
Questions
What is a good prompt to make a game with AI?
One that names the goal, the context, the constraints and a done-when line, which OpenAI's Codex guide gives as a good default. Think of a 90-second dodge game, plain JavaScript on one canvas, pointer events and no libraries, done when a full round plays on a phone.
Can one prompt make a whole game?
Sometimes, for a small game. According to its repository, little flock was made in one shot with GPT-6 Astra in Codex, and the repository of Ombres says it was built from a single brief. Chess3dastra's repository says it took four prompts, including a review pass.
Which AI app should I paste a game prompt into?
Chat apps and coding agents both work. Claude shows artifacts beside the chat on every plan, Gemini's Canvas generates code for a working app or game, and coding agents like Claude Code, Codex and Cursor work in your project files. We haven't ranked them.
How long should a game prompt be?
About as long as the task needs. Anthropic says to skip the plan if you could describe the change in one sentence, and for larger features to have Claude interview you and write a spec file.
What if the AI gets it wrong twice?
Clear the session and start over with a sharper prompt. Anthropic says a clean session with a better prompt almost always outperforms a long session with accumulated corrections.