Levelwick guide
How to write a good AI game prompt
A practical structure for AI game prompts: core loop, controls, win and lose rules, scoring, difficulty, style, feedback and constraints, with examples.
Steps
- State the game in one sentence. Name the genre and the player's main action, such as 'a one-screen game where you catch falling fruit in a basket'.
- Describe the core loop. Explain what the player does again and again, and what happens in response.
- List controls for keyboard and touch. Name every key and on-screen button.
- Define win, lose and scoring. Say exactly how points are earned, how the game ends and how a player wins.
- Set the difficulty curve. Describe how the game gets harder over time with numbers and limits.
- Describe style, feedback and constraints. Give a palette and shape style, ask for feedback effects, and set limits like one screen and no external files.
The eight parts of a prompt that works
A good AI game prompt reads like a short design document. It doesn't need to be long; 60 to 150 words is often enough. It needs to cover:
- Core loop: what the player does repeatedly.
- Controls: keyboard and touch, every key named.
- Win and lose conditions: how it ends.
- Scoring: what earns points and how much.
- Difficulty curve: what changes over time.
- Visual style: palette, shapes, mood.
- Feedback: what the player sees and hears when things happen.
- Constraints: one screen, no external assets, single file, size limits.
An example, piece by piece
Make a one-screen game where the player catches falling fruit in a basket. (one-sentence pitch)
Left/right arrows or A/D move the basket; on touch, drag anywhere to move it. (controls)
Fruit falls from random positions; each caught fruit is +10, a golden fruit +50. (loop and scoring)
Missing 3 fruit ends the game; show score and best score with a Restart button. (lose condition)
Fruit falls 5% faster every 10 seconds, capped at 2x. (difficulty)
Bright summer palette, rounded shapes drawn in code. (style)
Caught fruit pops with small particles and a blip sound made in the browser. (feedback)
Keep it in one HTML file with no external images. (constraints)
Numbers beat adjectives
"Fast", "hard" and "fun" mean different things to everyone, including the AI. "Enemies move 150 pixels per second and get 10% faster every wave, capped at double" can be tested and tuned.
Say what not to do
Constraints save attempts. Useful ones include: "no external images or sounds", "fit on one screen without scrolling", "no menus except start and game over", and "keep it under 600 lines". If you're making a game for children, say so and list what to avoid.
Ask for editable data
Request that levels, questions, prices and waves live in clearly labelled lists at the top of the code. You can then change content yourself instead of spending a generation on it.
Plan your follow-ups
Treat the first generation as a prototype. Then improve it with one focused prompt at a time: fix the biggest bug, tune the feel, add one feature, then polish. Add "don't change anything else" to each follow-up so working parts stay working.
Avoid copying other games
Describe mechanics in generic terms ("a falling-block puzzle where full rows clear") rather than naming existing games, characters or brands. It keeps your game original and avoids rights problems if you share or sell it.
FAQ
How long should a game prompt be?
Long enough to cover the loop, controls, win/lose, scoring, difficulty, style, feedback and constraints. That's often 60 to 150 words.
Should I name an existing game to explain what I want?
Describe the mechanics instead. It keeps your game original and avoids copying protected names, characters or art.
Why does the AI ignore part of my prompt?
Very long or contradictory prompts get partially followed. Put the most important rules first and move extras to follow-up prompts.
Do the same prompts work in every AI tool?
The structure works broadly, but each tool has its own strengths and limits, so expect to adjust wording and follow-ups.