Speed, steering and the line through the corner. Short tracks, readable handling and an instant restart matter more than graphics.
Tips for racing games
Describe handling in numbers: top speed, how fast the car reaches it, and how much it slows off the track. 'Realistic physics' gets you an undrivable car.
Ask for a lap timer and a best-lap record from the first generation. A time to beat turns a demo into a game.
Keep AI opponents simple: cars that follow a list of checkpoints with small random speed changes are more reliable than 'smart' rivals.
starter
Top-down kart sprint
Make a top-down 2D racing game on one screen. The track is a loop drawn as a grey road with grass outside. Arrow keys or WASD: up accelerates, down brakes/reverses, left/right steer. On touch screens, show left/right buttons in the bottom-left and gas/brake on the bottom-right. Driving on grass halves top speed. 3 laps; show the current lap time, total time and best lap. Use 4 invisible checkpoints so laps can't be skipped. Win by finishing; the result screen shows total time and a Restart button. Bright cartoon colours, the car is a rounded rectangle with a stripe. Add tyre skid marks when steering hard.
Checkpoints and grass slowdown are the two details that make a lap count fairly.
Follow-up tweaks
Add 3 computer cars that follow the track's checkpoints at slightly different speeds.
Save the best total time in localStorage and show it on the start screen.
starter
Endless highway dodge
Make a vertical scrolling road game. The player's car is at the bottom of a 3-lane highway. Left and right arrows (or swipe left/right on touch) change lanes with a quick slide. Slower traffic cars appear in random lanes and scroll down. Speed increases by 5% every 10 seconds. Hitting a car ends the run. Score is distance in metres; show the high score. Coins appear sometimes in a lane: +50 points. Never spawn cars that block all 3 lanes at once. Night-time palette with glowing headlights and lane lines that scroll to show speed.
The 'never block all lanes' rule prevents unwinnable situations that make players quit.
Follow-up tweaks
Add a nitro button (Space or a tap button) that doubles speed for 3 seconds and recharges over 15 seconds.
Make it rain after 1000 m: darker colours and slightly slippery lane changes.
intermediate · tested ✓
Drift trial
Make a top-down drifting game. One track with 6 tight corners. The car has momentum: velocity follows the facing direction slowly, so steering at speed makes it slide. Holding Space (or a Drift button) reduces grip further. While sliding sideways faster than a threshold, a drift meter fills and points accumulate; ending the drift banks the points with a 'x1.5 combo' if the next drift begins within 2 seconds. Hitting a wall cancels the unbanked points. 90 second time limit; final score goes to a top-5 local leaderboard with initials. Show smoke particles from the rear wheels while drifting.
Defining drift as a measurable condition (sideways speed above a threshold) makes scoring work without guesswork.
Follow-up tweaks
Make grip lower on a wet section of the track shown in blue.
Add a ghost car that replays my best run.
intermediate
Pixel bike hill climb
Make a side-view bike game on rolling hills generated from smooth noise. Right arrow/gas button accelerates, left arrow/brake button brakes, and while in the air left/right tilt the bike. Landing with the wheels roughly level gives a speed boost; landing on the rider's head ends the run. Fuel drains slowly and fuel cans appear every 300 m. Score is distance; flips in the air give +100 each. Show distance, fuel bar and best distance. Simple pixel-art look drawn with rectangles, sky gradient, parallax hills behind.
The specific crash rule (head touches ground) avoids the AI inventing an unclear failure state.
Follow-up tweaks
Add a garage screen where coins collected buy better tyres (more grip) or a larger fuel tank.
Add a night stage after 2000 m with a headlight cone.
intermediate
Two players, one keyboard
Make a top-down two-player racing game for one keyboard. Player 1 uses WASD, player 2 uses the arrow keys. Both cars race on the same oval-with-a-chicane track, 5 laps. Cars bump each other with a simple bounce. A split-colour HUD shows each player's lap and position. The first to finish wins; show a winner screen with both total times and a Rematch button. Add a 3-2-1-GO countdown with large numbers. Use contrasting car colours (orange and teal).
Assigning exact keys to each player avoids overlapping controls that make local multiplayer unplayable.
Follow-up tweaks
Add a power-up box on the track that gives a 2-second speed boost to whoever drives through it.
Make the camera fixed and the track fit the screen at any window size.
starter
Paper boat river race
Make a gentle racing game where a paper boat floats down a river that scrolls upward. The player steers left and right with arrow keys, A/D, or by touching the left or right half of the screen. Rocks and logs slow the boat for a moment (no crash). Gold leaves give +10 points. Three checkpoints, each a floating flag; reaching the finish gate under 60 seconds earns 3 stars, under 75 s 2 stars, otherwise 1 star. Soft watercolour-like palette drawn with shapes, gentle ripple circles behind the boat.
A no-crash design and star ratings make a racing game work for younger or casual players.
Follow-up tweaks
Add whirlpools that pull the boat toward their centre.
Add 3 river levels selectable from a menu, each a bit longer.
advanced
Time-trial with ghost
Make a top-down time-trial racing game. Record the car's position and angle every frame during a lap. After the first completed lap, show a translucent ghost car replaying the best lap so far. Show a split-time comparison at 3 checkpoints (green if ahead, red if behind) for 2 seconds. Handling: acceleration 0 to top speed in about 2 seconds, gentle steering at low speed, tighter at mid speed. Walls stop the car and reduce speed to 30%. Store the best lap and its ghost data in localStorage so it persists. Minimal clean look: white track on dark grey, one accent colour.
Spelling out what to record and when to show it gets a working ghost without extra rounds.
Follow-up tweaks
Add a track editor where I click to place the track's centre points and the road is drawn around them.
Add a button to export the ghost as a code I can share.
advanced
Pseudo-3D road racer
Make a pseudo-3D road racing game drawn with horizontal road segments that curve and rise, like classic arcade racers (no 3D library). The player's car stays at the bottom centre; the road bends with curve values per segment. Up/down accelerate and brake, left/right steer; on touch, tilt is not needed: use on-screen buttons. Roadside objects (trees, signs) scale with distance and slow the car to a crawl if hit. A timer counts down from 60; passing checkpoints adds 20 seconds. Score is distance. Sunset sky gradient with simple mountains. Keep it in one HTML file under 700 lines.
Saying 'segments with curve values' points the AI to a well-known technique instead of attempting real 3D.
Follow-up tweaks
Add hills: segments with a height value so the road rises and dips.
Add rival cars that appear ahead and must be overtaken.
starter
Slot car track
Make a slot car racing game. Two cars run on fixed curved lanes of an oval track. The player only controls speed: hold Space or hold the screen to accelerate, release to slow down. If the car takes a curve faster than the safe speed for that curve, it flies off the track and loses 2 seconds before being placed back. The computer car drives at a steady safe speed. First to 5 laps wins. Show a speed gauge that turns red above the safe speed when near a curve. Bright toy track look with a checkered start line.
A one-button control with a clear failure rule makes the skill obvious and the code tiny.
Follow-up tweaks
Add a lane change button so cars can switch lanes on straights.
Let me choose easy, medium or hard opponent speed.
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
Variable
What to write
Example
{{theme}}
Setting in a few words
backyard garden
{{enemy}}
Who walks the path
slugs
{{base}}
What the player protects
the garden gate
{{waypoints}}
Path as a waypoint description
6 waypoints snaking left to right
{{tower_1..3}}
Name, price, role
Pea Shooter, 25, single target
{{start_money}} / {{reward}}
Economy
100 / 5
{{lives}} / {{waves}}
Lose and win conditions
10 / 12
{{palette}}
Visual style
flat 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
Variable
Example
{{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.