Make a game with AI: 10 prompts to copy and adapt

By GamesByAI · Updated · 7 sources

A prompt to make a game with AI works best as a short brief: what the game is, what it runs on, what it must not do and how you will know it is done. The ten prompts below cover a build from the first idea to a fresh start.

We wrote them from the tools’ own guidance and haven’t measured them against each other. Paste them into a chat app or a coding agent, and replace the brackets. Every tool fact on this page is as of September 2026 and links to its source.

What makes a game prompt work?

The tools’ own docs agree on four habits:

  • Goal, context, constraints and a finish line. OpenAI’s Codex guide says a good default is four things in a prompt: 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 to 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 says to skip the plan if you could describe the diff in one sentence.

Anything you would repeat in every prompt belongs in the rules file your agent reads on its own. Claude Code reads CLAUDE.md and Codex reads AGENTS.md (Claude Code best practices, Codex best practices). Cursor reads markdown rules from .cursor/rules/ (Cursor). For a small game, four lines do the job:

# 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?

One prompt can produce a small game, according to two entries, and others describe review passes and weeks of work. Data note: these are statements from creators and repositories in our catalog on September 29, 2026, not measurements.

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 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. Kanso took about a week with Codex, and Doctrine about two weeks with Cursor, according to their creators.

Ten prompts to copy

They follow the order of a build: brief, first slice, one change at a time, fixes, review, restart.

1. A one-file game, for a chat app

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. An interview before you build

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 adapts the interview prompt in Claude Code’s guide, which has Claude write a spec to SPEC.md (Claude Code best practices). Codex’s guide suggests asking Codex to question you and challenge your assumptions before it writes code (Codex best practices), and its browser-game use case starts from a PLAN.md file (Codex use case).

3. A four-part brief

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 follows OpenAI’s four parts in order, so each line answers a question the agent would otherwise guess at.

4. The smallest 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.

Play it before you ask for anything else.

5. 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. A bug report

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.

The prompt carries the three things Claude Code’s guide asks for in a bug report: 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. A review pass

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 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. A fresh start

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.

Claude Code’s guide says that after two failed corrections you should clear the session and start again with a more specific prompt.

Where do you paste them?

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, see best AI game makers.

Keep going

Games to look at

Questions

What is a good prompt to make a game with AI?

Name the goal, the context, the constraints and a done-when line, which OpenAI's Codex guide gives as a good default. For example: 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 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 such as Claude Code, Codex and Cursor work in your project files. We have not ranked them.

How long should a game prompt be?

As short as the task. Anthropic says to skip the plan if you could describe the change in one sentence, and to have Claude interview you and write a spec file for larger features.

What if the AI gets it wrong twice?

Clear the session and start again with a sharper prompt. Anthropic says a clean session with a better prompt almost always outperforms a long session with accumulated corrections.