Skip to content
Browse the store

Home › AI game prompts › Fix & tweak recipes

Levelwick · 49 recipes

Fix and tweak recipes for AI-made games

Follow-up prompts that change one thing at a time: jump feel, gravity, collisions, scoring and combos, rules, difficulty curves, juice, touch controls, menus, and the bugs AI-made games hit most.

Physics

Make the jump feel good

The jump feels floaty or stiff, like the character is on the moon or a spring.

Improve the jump feel. Make gravity 1.6x stronger while falling than while rising, cap the fall speed, and keep the jump height at about 3 tiles. If the jump key is released while rising, cut the upward speed in half so taps give short hops and holds give full jumps. Don't change anything else.

Faster falling than rising is the single biggest improvement to most platformers.

Add coyote time

Players press jump just after running off a ledge and nothing happens, so they fall and blame the game.

Add coyote time: let the player still jump for 0.1 seconds after walking off a ledge, as long as they haven't jumped already. Use elapsed time, not frame counts. Keep all other movement the same.

0.08 to 0.15 seconds is a common range. Test at the edge of every gap.

Add jump buffering

Pressing jump slightly before landing is ignored, so jumps feel unresponsive.

Add jump buffering: if the player presses jump up to 0.1 seconds before landing, perform the jump the moment they land. Store the time of the last jump press and check it on landing.

Pair it with coyote time; together they remove most 'I pressed jump!' complaints.

Tune gravity with sliders

You can't tell what values feel right, and every regeneration changes them.

Add a hidden tuning panel that opens with the backtick key. Include sliders for gravity, jump strength, run speed, acceleration and friction, showing their current values. Changes apply instantly. Add a Copy button that copies the values as text so I can paste them into my next prompt.

Tune by hand, then paste the final values into a prompt to make them permanent.

Give vehicles weight

The car turns instantly like an arrow on a grid and feels weightless.

Give the vehicle momentum: it accelerates over 1.5 seconds to top speed, coasts to a stop over 2 seconds when no key is pressed, and its turning rate depends on speed (no turning while stopped, tightest at medium speed). Add a little sideways drift when turning at top speed.

Speed-dependent steering is what separates a car from a cursor.

Ride moving platforms correctly

The player slides off moving platforms or jitters on top of them.

Fix moving platforms: when the player stands on one, move the player by the same amount the platform moved this frame, before applying the player's own movement. Detect standing by checking the platform directly under the player's feet.

Order matters: move platforms first, then carry the player, then apply input.

The player falls through platforms

At high speed or after a big frame gap, the player passes through floors or thin platforms.

Fix the bug where the player falls through platforms. Move the player in small steps: split each frame's movement into steps no bigger than half the player's height, and check collisions after each step. Resolve vertical and horizontal collisions separately, vertical first. Also cap the time step to 1/30 of a second so a lag spike can't teleport the player.

This is the most common platformer bug; the step-and-cap fix solves almost all cases.

Player gets stuck in walls

The player sticks to walls when pressing into them, or gets stuck inside corners.

Fix collision so the player never gets stuck in walls. Move along the X axis first and resolve X collisions by pushing the player out to the nearest edge, then do the same for the Y axis. Use slightly smaller collision boxes than the drawn sprite (2 px inset). Don't apply friction from walls.

Separate-axis resolution is the classic fix for corner snags.

Make hits feel fair

Players get hit when it looks like the enemy missed.

Make the player's hitbox 70% of the drawn size and centred, and make collectible pickup boxes 120% of their drawn size. Add a debug toggle on the H key that draws all hitboxes as outlines.

Small player hitboxes and big pickup boxes make games feel generous.

Fast balls pass through paddles

A ball or puck moving fast goes straight through the paddle or wall.

Fix tunnelling: check collisions along the ball's path, not just its final position. Either move the ball in several sub-steps per frame or do a swept circle test against the paddle. Also cap the ball's maximum speed.

Use sub-steps if you're unsure; they're easier for the AI to get right.

Game is too fast on high-refresh screens

On 120 Hz or 144 Hz screens everything runs twice as fast.

Fix the speed bug on high refresh rate screens. Use requestAnimationFrame's timestamp to calculate delta time in seconds, and multiply all movement, timers and animations by it. Cap delta time at 0.05 s. Speeds should be expressed in pixels per second, not per frame.

If speeds are written per frame, ask the AI to convert them to per second at 60x.

Scoring

Add combos

Scoring feels flat: every action gives the same points.

Add a combo system: each scoring action within 2 seconds of the last increases a combo counter. Points are multiplied by 1 + combo x 0.1, capped at x3. Show the combo number large near the score, pulsing on each increase, and fading when it expires. A hit or a miss resets it.

Showing the combo timer as a shrinking bar makes players chase it.

Risk-reward multipliers

Players play it safe because risk isn't rewarded.

Add risk-reward scoring: actions done near danger (within 30 px of an obstacle or enemy) score double, with a small 'CLOSE!' text. Collectibles in harder spots are worth more and shine slightly brighter.

Near-miss bonuses work especially well in runners and shmups.

Save the high score

The best score disappears when the page reloads.

Save the high score in localStorage under a key named after the game. Load it on start and show 'Best: N' on the start and game over screens. If the new score beats it, show 'New best!' with a short sparkle. Wrap storage access in try/catch so the game still works if storage is blocked.

The try/catch matters: some browsers block storage in private mode.

Local top-5 leaderboard

Multiple people play on the same device and want their own scores listed.

Add a local top-5 leaderboard. After a qualifying score, ask for 3 initials with large letter buttons (and keyboard input). Store entries in localStorage, sorted by score. Show the table on the game over screen with the newest entry highlighted.

Great for classroom and party machines.

Star ratings per level

Levels have a win screen but nothing to aim for on replays.

Add a 1 to 3 star rating per level based on time or moves (define 3-star and 2-star thresholds per level in the level data). Show stars on the win screen and on a level select screen, and save each level's best rating in localStorage.

Write the thresholds in level data so you can tune them without code changes.

Copy-to-share result

Players want to show friends their score.

Add a Share button on the game over screen that copies a short text to the clipboard: the game name, score and a one-line summary (for example, 'Wave 12, 3 stars'). Show 'Copied!' for 2 seconds. If the browser supports the share sheet, use it instead.

Keep the text short and free of links if you don't have a public page yet.

Rules

Add lives instead of instant game over

One mistake ends the game, which is too harsh.

Change the rules: the player has 3 lives shown as hearts. Losing a life makes the player blink and be invulnerable for 2 seconds, then continue from the same spot. Game over only when all lives are gone. Add one extra life every 5,000 points (max 5).

Invulnerability after a hit prevents losing several lives at once.

Switch to a time attack

Endless play has no natural end and sessions drag.

Add a 60-second time attack mode selectable on the start screen. A countdown is shown at the top; certain pickups add 3 seconds. When time runs out, show the score and best score for this mode separately.

Keep both modes; some players prefer endless.

Add checkpoints

Dying sends the player back to the very start of a long level.

Add checkpoints: flags placed in the level that turn green when touched. After losing a life, the player respawns at the last touched checkpoint with coins collected so far kept.

Put checkpoints after every hard section, not at fixed distances.

Add one new enemy type

The game gets repetitive after a few minutes.

Add one new enemy type without changing existing ones: [describe it in one sentence, e.g. 'a hopper that jumps toward the player every 2 seconds']. It first appears after [time or wave] and gets its own colour and shape. Keep its code separate from the other enemies.

Introduce one new thing at a time and test before the next.

Add a power-up

There's nothing exciting to grab during play.

Add a power-up that appears every 20 to 30 seconds at a reachable spot. When collected, it gives [effect] for 8 seconds, shown as an icon with a shrinking timer in the HUD. Only one power-up can be active; picking up another replaces it.

A visible timer prevents 'did it run out?' confusion.

Add a local two-player mode

Friends want to play together on the same device.

Add a local two-player mode on the start screen. Player 1 keeps the current controls; Player 2 uses [arrow keys / IJKL / right side touch buttons]. Each player has their own colour, score and lives, shown at opposite top corners. The round ends when both are out; show who scored more.

Choose key sets far apart on the keyboard to avoid hands colliding.

Report a bug the AI can fix

Vague bug reports ('it's broken') lead to random changes.

There is a bug: [what I did], [what I expected], [what happened instead]. It happens [always / sometimes / only after X]. Fix only this bug and don't change anything else. Then tell me in one sentence what caused it.

Asking for the cause helps you check the fix makes sense.

Difficulty

A smooth difficulty curve

The game is either boring at the start or impossible after a minute.

Rework the difficulty curve. Start easy for the first 30 seconds. Then every 20 seconds increase spawn rate by 8% and enemy speed by 5%, capped at 2.5x the starting values. Every 2 minutes, give a 10-second calm moment with fewer spawns. Show the current level number in the HUD.

Caps and calm moments stop the curve from running away.

Easy, normal and hard modes

Some players find it too hard, others too easy.

Add Easy, Normal and Hard on the start screen. Easy: 70% enemy speed, 5 lives, more pickups. Normal: current values. Hard: 130% speed, 1 life, double points. Save the chosen mode and keep separate high scores per mode.

Define each mode as a small table of multipliers so balance stays in one place.

Gentle adaptive difficulty

New players quit early; experts get bored.

Add gentle adaptive difficulty: if the player loses a life within 20 seconds of the last one, reduce spawn rate by 10% for 30 seconds. If they go 60 seconds without losing a life, increase it by 5%. Never go below 70% or above 150% of the base. Don't show this to the player.

Keep adjustments small; players notice big swings.

Scripted waves

Random spawns produce unfair clusters or long empty stretches.

Replace random spawning with a wave script: an array of waves, each listing enemy types, counts, spawn interval and entry side. After the scripted waves end, loop them with +15% health and speed each loop. Show 'Wave N' at the start of each wave.

A wave script is easy to edit by hand later.

No unfair spawns

Enemies or obstacles sometimes appear on top of the player or in impossible patterns.

Never spawn enemies within 150 px of the player, and never create obstacle patterns that have no safe path. After generating each obstacle row, check that at least one lane or gap the player can reach is open; if not, regenerate the row.

Rules that check patterns are more reliable than hoping randomness is fair.

Juice

Add screen shake

Hits and explosions feel weak.

Add a small screen shake: when the player is hit, shake the camera by up to 6 px for 0.2 seconds with decreasing strength; for big events, 10 px for 0.3 seconds. Add a setting to turn shake off. Don't shake the HUD.

Always offer an off switch; shake can bother some players.

Add particles

Actions happen without any visual reward.

Add simple particles: when an enemy is defeated or an item collected, spawn 8 to 12 small circles in the object's colour that burst outward, slow down and fade over 0.4 seconds. Reuse particle objects from a pool and cap total particles at 300.

Pooling and a cap keep particles from slowing the game.

Add sound effects without files

The game is silent, and you don't have sound files.

Add short sound effects generated with the Web Audio API (no audio files): a rising blip for collecting, a low thud for getting hit, a quick noise burst for explosions, a two-note chime for level complete. Start audio only after the first user click or tap. Add a mute button that remembers its setting.

Browsers block audio until the first interaction, so ask for that explicitly.

Squash and stretch

The character looks stiff.

Add squash and stretch to the player: stretch vertically by 15% when jumping, squash by 20% for 0.1 seconds when landing, and lean slightly in the direction of movement. Only change how it's drawn, not its hitbox.

'Only change how it's drawn' prevents collision bugs from visual tweaks.

Hit pause

Big hits don't feel impactful.

Add a hit pause: when a strong hit lands, freeze the game for 60 ms (keep rendering), then continue. Flash the hit object white for one frame. Use it only for big hits so it doesn't slow normal play.

Tiny pauses add weight; longer than 100 ms feels like lag.

Floating score text

Players don't notice points they earned.

Show floating text for points: '+10' appears where the points were earned, drifts up 30 px and fades over 0.6 seconds. Bigger scores use bigger text. Combo text in a different colour.

Cheap to add and makes scoring readable at a glance.

No sound on phones

Sounds work on desktop but not on mobile.

Fix mobile audio: create or resume the AudioContext inside the first tap or click handler. Show a small 'Tap to start' screen if needed. Make sure the mute setting is respected.

Mobile browsers only allow audio after a user gesture.

Game slows down over time

The game gets choppy after a few minutes of play.

Find and fix the slowdown: remove bullets, particles and enemies once they leave the screen or finish, reuse objects with pools instead of creating new ones each frame, and make sure event listeners and intervals are not added again on each restart. Show an FPS counter on the F key so I can check.

Duplicate listeners after restart are a very common hidden cause.

Controls

Add on-screen touch controls

The game only works with a keyboard.

Add touch controls that appear only on touch devices: a left and right button at the bottom left, and a jump (and action) button at the bottom right. Buttons are at least 64 px, semi-transparent, and support holding and multi-touch so I can move and jump at the same time. Prevent page scrolling and zoom while playing.

Multi-touch and scroll prevention are the two things usually missing.

Virtual joystick

Top-down games need free movement on phones.

Add a virtual joystick for touch: touching the left half of the screen places a joystick base at the touch point; dragging moves the knob up to 50 px and sets movement direction and speed. Releasing hides it. Keyboard controls keep working.

A joystick that appears where you touch is easier than a fixed one.

Swipe controls

Swipes are detected unreliably or trigger by accident.

Make swipe detection reliable: a swipe counts if the finger moves at least 30 px within 300 ms; use the larger of horizontal or vertical movement to decide the direction. Ignore other touches during a swipe. Also prevent the browser's pull-to-refresh and back gestures inside the game area.

Distance plus time thresholds stop taps being read as swipes.

Keyboard remapping

Players use different keyboard layouts.

Add a controls screen where each action shows its key and the player can click it and press a new key to rebind. Support both arrow keys and WASD by default, and save bindings to localStorage. Show the current bindings on the pause screen.

Helps players on non-QWERTY keyboards.

Gamepad support

Players want to use a controller.

Add gamepad support with the browser Gamepad API: left stick or d-pad moves, A/bottom button jumps or confirms, B/right button goes back, Start pauses. Use a small dead zone (0.2) on the stick. Keyboard and touch keep working.

The dead zone prevents drifting characters.

Keys get stuck after switching tabs

After alt-tabbing, the character keeps moving on its own.

Fix stuck input: clear all pressed keys and touch states when the window loses focus or the page becomes hidden, and pause the game at the same time.

Listen for blur and visibilitychange events.

Ui

Start screen

The game starts instantly with no context.

Add a start screen with the game title, a one-line goal, the controls for keyboard and touch, the best score, and a big Play button (Enter or Space also starts). Keep the game running in the background, dimmed, as decoration.

A one-line goal and controls answer the first two questions every player has.

Pause menu

There's no way to pause.

Add pause: P or Escape and a pause button in the top right toggle pause. While paused, stop all movement and timers, dim the screen and show Resume, Restart and Quit to menu. Pause automatically when the tab loses focus.

Auto-pause on tab switch prevents unfair deaths when players look away.

Game over and instant restart

Restarting needs a page reload.

Add a game over screen showing score, best score and the reason (for example, 'Hit by a slime'). A Restart button and the R key restart immediately by resetting all game state in one reset function, without reloading the page. Make sure timers, enemies, particles and score are all reset.

One reset function avoids leftover enemies or doubled timers after restart.

Readable HUD

Score and lives are hard to read over the game.

Improve the HUD: place score top left, lives top right, and level/timer top centre. Use a bold font at least 20 px, white with a dark outline or a semi-transparent background panel, so it's readable over any colour. Keep the HUD inside safe margins on phones with notches.

Outlines or panels fix readability on busy backgrounds.

First-time hints

New players don't know what to do.

Add first-time hints: on the first play only, show short hint bubbles at the right moments ('Tap to jump' at the start, 'Collect coins for points' when the first coin appears). Each hint disappears after it's done once. Save that hints were seen in localStorage.

Teach in context instead of a wall of text.

Fit any screen

The game is cut off or tiny on phones.

Make the game fit any screen: keep a fixed internal resolution (for example 800x450) and scale the canvas to fit the window while keeping the aspect ratio, with letterboxing. Recalculate on resize and orientation change. Use devicePixelRatio for sharp drawing. Touch positions must be converted to game coordinates.

Converting touch positions is the step most often missed after scaling.

Levelwick Pro

Ship a whole game, not just a first draft

30 fill-in master templates with worked examples, 12 multi-step build recipes (what to prompt, what to check after each step, and the fix prompt when it breaks), 40 bug-fix prompts by symptom, 20 art-direction briefs with upload tips, and a game-design + launch checklist. Markdown files, instant download.

One-time $12. Use and adapt the prompts in your own games, commercial ones included. 14-day fix-or-refund if it doesn't work as described. Secure checkout by Stripe.

Free sampler

T01 · Path defense master template (template)

Use it for: classic tower defense with a fixed route and placed towers. The most reliable starting point for the genre.

Variables

VariableWhat to writeExample
{{theme}}Setting in a few wordsbackyard garden
{{enemy}}Who walks the pathslugs
{{base}}What the player protectsthe garden gate
{{waypoints}}Path as a waypoint description6 waypoints snaking left to right
{{tower_1..3}}Name, price, rolePea Shooter, 25, single target
{{start_money}} / {{reward}}Economy100 / 5
{{lives}} / {{waves}}Lose and win conditions10 / 12
{{palette}}Visual styleflat bright greens and browns

Master prompt

Make a one-screen 2D tower defense game set in a {{theme}}.
PATH: {{enemy}} walk a fixed path through {{waypoints}} to {{base}}. Draw the path clearly. Enemies move from waypoint to waypoint and never leave the path.
BUILDING: The player clicks or taps an empty build tile beside the path to open a small menu of towers:
- {{tower_1}}
- {{tower_2}}
- {{tower_3}}
Greyed-out buttons when unaffordable. Tapping a built tower shows its range circle and a Sell button (refund 50%).
ECONOMY: Start with {{start_money}} coins. Each enemy defeated gives {{reward}} coins with a floating "+{{reward}}".
WIN/LOSE: {{base}} has {{lives}} lives; each enemy that reaches it costs 1. Survive {{waves}} waves to win.
WAVES: Waves start with a Start Wave button. Use a wave list: each wave adds enemies and +10% enemy health; every 4th wave adds a faster enemy type; the last wave has a boss with a health bar.
FEEDBACK: Enemies flash white when hit, pop into particles when defeated, and the screen shakes briefly when a life is lost.
HUD: coins, lives and wave number at the top; Start Wave and Pause buttons.
STYLE: {{palette}}, simple shapes drawn in code, no external images.
CONSTRAINTS: one HTML file, works with mouse and touch, all movement based on elapsed time, Restart button on the win and lose screens.

Worked example

Make a one-screen 2D tower defense game set in a backyard garden. PATH: slugs walk a fixed path through 6 waypoints snaking from the left edge to the garden gate on the right… Towers: Sprinkler, 10 coins, slows enemies 40% in range; Pea Shooter, 25 coins, single target; Bee Hive, 40 coins, small area damage. Start with 100 coins, 5 per slug. 10 lives, 12 waves. Flat bright greens and browns…

After the first generation, check: enemies stay on the path; towers only fire within the drawn range; selling refunds the right amount; the boss appears on the last wave.

Strong follow-ups

  • "Add a 2x speed button. Don't change anything else."
  • "Add upgrades: tap a tower to upgrade to level 2 (+50% damage) for 1.5x its price."
T13 · Classroom quiz engine template (template)

Use it for: any subject quiz you'll reuse with new questions every week.

Variables

VariableExample
{{subject}}Year 6 science: forces
{{questions}}your list, pasted in the format below
{{timer}}20 seconds, or "no timer"
{{teams}}2 to 4 teams, or "single player"
{{reward}}a star burst and a "Great thinking!" message

Master prompt

Make a quiz game for {{subject}}.
DATA: put all questions in an editable array at the very top of the code, clearly labelled QUESTIONS. Each item: question, four answers, index of the correct answer, optional explanation. Use exactly these questions:
{{questions}}
FLOW: shuffle questions and answer order; never repeat within a game. One question at a time with four large buttons (keys 1-4 also work).
TIMER: {{timer}}.
TEAMS: {{teams}}. If teams: show whose turn it is; correct = +10 to that team; turns rotate each question.
FEEDBACK: correct: {{reward}}. Wrong or timeout: chosen answer red, correct answer green, explanation shown for 3 seconds.
END: scoreboard, list of missed questions with correct answers, Play Again.
DESIGN: high contrast, at least 28 px answer text, readable on a projector and a phone.
CONSTRAINTS: one HTML file, works offline, no external fonts or images.

Question format to paste

Q: What force pulls objects toward Earth? | Friction | Gravity* | Magnetism | Air resistance | Gravity pulls everything with mass toward the Earth's centre.

(An asterisk marks the correct answer; the last field is the explanation.)

Check: the asterisk is removed from displayed text; explanations show for wrong answers only; teams rotate correctly after a timeout.

Ship a tower defense in 6 prompts · Step 1 of 6 (recipe-step)
Make a one-screen 2D tower defense game. Cartoon beetles walk a fixed path of 6 waypoints from the left edge to a tree stump on the right. The player clicks or taps a grass tile to place a Leaf Turret for 25 coins; it shoots the nearest beetle within 120 px once per second. Start with 100 coins; each beetle gives 5 coins. The stump has 10 lives; each beetle reaching it costs 1. A Start Wave button sends 8 beetles. Show coins, lives and wave at the top. Shapes drawn in code, flat greens and browns. Restart button on game over.

Check after:

  • Beetles follow the path exactly and never cut corners through grass.
  • Turrets can't be placed on the path or on top of each other.
  • Coins rise on each defeat; lives drop when a beetle reaches the stump.

If it breaks:

  • *Beetles leave the path:* "Move enemies from waypoint to waypoint in a straight line at constant speed; when within 2 px of a waypoint, snap to it and target the next one. Don't change anything else."
  • *Towers placed on the path:* "Mark path tiles as unbuildable using a grid; highlight buildable tiles on hover in green and unbuildable in red."
A cozy farm in 8 prompts · Step 1 of 8 (recipe-step)
Make a cozy farming game with a 6x4 grid of soil plots. Tap a plot to cycle: till, plant, water. Seeds: Turnip (2 coins, 2 days), Carrot (5, 3 days), Pumpkin (12, 5 days), chosen from a seed bar. A Sleep button advances the day. Watered plots grow one stage per day (3 visible stages); unwatered plots don't grow. Tap a ripe plant to harvest into a basket. Start with 20 coins. Show coins and day.

Check: crops only grow when watered; watering resets each morning.

Checklist · Core loop (checklist)
  • [ ] I can describe the game in one sentence: the player does X to achieve Y while avoiding Z.
  • [ ] The main action is fun on its own for 30 seconds, before any upgrades or levels.
  • [ ] Every action gives an immediate visible result.
  • [ ] There's a reason to do the action again (score, progress, story, collection).
  • [ ] The game has a clear end state for a session (game over, level complete, day end) or a natural stopping point for idle/cozy games.
  • [ ] I removed features that don't support the core loop.
Fix prompt: "Remove [feature]. It doesn't support the core loop. Don't change anything else."
Checklist · Mobile and touch (checklist)
  • [ ] The game works with touch only, without hover.
  • [ ] Touch targets are at least 48-64 px, with space between them.
  • [ ] Multi-touch works (move and jump at once).
  • [ ] The page doesn't scroll, zoom or pull-to-refresh during play.
  • [ ] The game fits portrait and landscape, or clearly asks to rotate.
  • [ ] HUD stays clear of notches and rounded corners.
  • [ ] Audio starts after the first tap.