Blog · · Agentdex Editorial
ChatGPT Game Prompts: Templates for Playing and Designing Games
ChatGPT can run a text adventure, host a trivia night, help you design a game or write the code for a small browser game. The difference between a flat result and a fun one is almost always the prompt. Below are copy-and-paste ChatGPT game prompts for playing and building games, with notes on why each one works and how to fix the common problems.
Key Takeaways
- Good game prompts set a role, clear rules, a turn structure and a stopping point, so ChatGPT waits for your move instead of writing the whole story.
- Ask for a short state summary each turn (health, inventory, location). It keeps long games consistent.
- For game design, ask ChatGPT to critique your idea as a skeptical player, not just to praise it.
- For code, ask for one self-contained HTML file first, then add features one at a time.
What makes a good game prompt
ChatGPT will happily improvise, which is the problem: without structure, it rushes the plot, forgets your inventory and decides outcomes for you. Strong prompts include five things:
- Role: "You are the game master" or "You are a game designer."
- Rules: stats, win and lose conditions, what the player can and can't do.
- Turn structure: describe the scene, offer choices, then stop and wait.
- State: a short status block every turn.
- Boundaries: tone, content limits and length of each reply.
Prompts for playing games
Text adventure engine
You are the game master for a text adventure. Setting: [a flooded city in 2140].
Rules:
- I play [a salvage diver]. Stats: Health 10, Oxygen 10, Credits 5.
- Each turn: describe the scene in under 120 words, then give me 3 numbered
choices plus "or type your own action". Then stop and wait for my reply.
- Resolve risky actions with "Yes, and", "Yes, but" or "No, but" outcomes.
Never kill me without warning.
- End every reply with a status line: Health / Oxygen / Credits / Inventory / Location.
- If I type "save", give me a short save code that summarizes the game state.
Start with an opening scene.
Why it works: the word limit and "stop and wait" keep turns short, the three outcome types make failure interesting instead of final, and the status line stops ChatGPT from forgetting what you carry. The save code lets you paste the state into a new chat if the conversation gets long.
Mystery or detective game
Run a murder mystery set in [a 1920s train]. Decide the culprit, motive and
three real clues before we start, but don't reveal them. I can question
suspects, search locations and accuse once. Keep suspects consistent with
the hidden solution. After my accusation, reveal the full solution and
show which clues pointed to it.
Trivia or quiz host
Host a 10-question trivia game on [90s video games] for [3] players.
Ask one question at a time with four options. Wait for every player's
answer, then reveal the correct one with a one-line fact. Keep a running
scoreboard. Mix easy, medium and hard questions.
Check any facts that matter. ChatGPT can state wrong trivia answers with confidence, so use this for fun rather than a competition with prizes.
Combat with simple numbers
Use a simple combat system: I roll by typing "roll" and you generate a
number from 1 to 20. 1-7 miss, 8-15 hit for 2 damage, 16-20 hit for 4.
Show the roll and the new health totals after every exchange.
Small numbers are easier for the model to track than complex rule sets. If totals drift, ask it to restate the current state before continuing.
Prompts for designing games
Game design document
Act as an experienced game designer. My idea: [a co-op cooking game where
the kitchen changes every level]. Write a one-page game design document:
core loop, player goal, three key mechanics, progression, target player,
art direction in one sentence, and the biggest risk to fun. Keep it under
500 words.
Skeptical player stress test
Now act as a skeptical player who has played many games in this genre.
List the five most likely reasons you would quit in the first 10 minutes,
and suggest one concrete fix for each.
This pair is the most useful design combo. The first prompt gives structure, and the second pushes back on your idea instead of agreeing with it.
Lore bible
Create a lore bible for [my world]: history in five eras, three factions
with goals and conflicts, key locations, and ten names that fit the
setting. Format it as headings and bullet points I can reuse.
Prompts for coding a game
Write a complete endless-runner game in a single HTML file using the canvas
API and plain JavaScript, no libraries. The player jumps with the space bar
or a tap, obstacles speed up over time, and the score shows at the top.
Include a game-over screen with restart. Add short comments explaining
each section.
Save the result as index.html and open it in your browser. Then improve it one request at a time: "add a high score saved in localStorage," "add sound effects," "make it work on mobile." Small steps make bugs easier to find. For bigger projects, use an engine such as Phaser for browser games or Godot for desktop and mobile, and see our guides to AI game coders and AI game makers.
Fixing common problems
- It writes the whole story: add "Then stop and wait for my reply" and limit reply length.
- It forgets details: require a status line every turn, and ask for a recap every 10 turns.
- Everything succeeds: ask for real consequences and the "Yes, but / No, but" outcome rule.
- The game goes somewhere you don't want: set content boundaries up front, and use "rewind to the last turn" to undo.
- Long games drift: ask for a save code, start a new chat and paste it in.
Can you use what ChatGPT makes?
Under OpenAI's terms of use, as between you and OpenAI, you own the output you get, subject to OpenAI's terms. Two caveats: output may not be unique (another user can get similar text), and you can't present AI output as human-made when it isn't. If you publish or sell a game, review everything, check names and characters for trademark issues, and test the code yourself.
For more ideas, see our prompt games guide.
FAQ
How do I make ChatGPT play a game with me?
Give it a role, the rules, a turn structure and an instruction to stop and wait after each turn. The text adventure prompt above is a good starting template.
Why does ChatGPT forget things in long games?
Long conversations get harder for the model to track. Ask for a status line every turn and a recap every few turns, or save the state and continue in a new chat.
Can ChatGPT code a full game?
It can write small, complete games such as an endless runner in a single HTML file. For larger games, use it alongside an engine like Phaser or Godot and build one feature at a time.
Can I sell a game I made with ChatGPT?
OpenAI's terms say you own the output as between you and OpenAI. You are still responsible for checking the code, the content and any trademark or copyright issues before you sell.
What are good ChatGPT games to play?
Text adventures, murder mysteries, trivia, word games and choose-your-own-adventure stories all work well because they are turn-based and mostly text.
Written by Agentdex Editorial. Agentdex is an independent directory reviewing AI coding tools; we are not affiliated with the companies mentioned. Prices and features are as of October 24, 2026, from official sources linked above. Always confirm on the vendor's site.