Tune it, copy it, paste it into Claude.
Pick a screen shape, a game type and a look. The prompt below rewrites itself to match: the format, the level plan, the controls and the art direction all change with your choices.
Make a small, complete game I can play right here: one self-contained HTML file with a <canvas> and inline JavaScript, shown as an artifact I can play in the chat. It must work on a phone with touch and on a computer with a keyboard. Format: Responsive: fill the whole screen at any size and orientation (phone upright or sideways, tablet, desktop) with no letterbox bars. Scale the world so the shorter side of the screen always shows 540 world units and the longer side shows more of the world, so nothing ever stretches. Keep the core play area inside a central safe zone that is visible at every aspect ratio, anchor the HUD and touch buttons to the screen edges, respect safe-area insets, and recalculate the layout on resize and rotation. Game: An endless runner. Bolt runs on its own across sunset hilltops, collecting glowing gears and jumping over rocks. Hitting an obstacle costs one of three lives. Hero and look: Bolt, a small round robot with a blinking eye, a bouncing roll and an expressive antenna. Draw everything with canvas shapes as polished, smooth vector art: clean gradients, soft shadows and consistent colors. Levels: Between levels, show a short "Level 2" card, and carry the score across levels. Lives carry over between levels, and finishing a level gives back one lost life. Losing all lives is game over, with a choice to retry the current level. * Level 1, Warm-up: Goal: run 500 m. Slow speed and small, well-spaced rocks to teach the jump. * Level 2, Gaps: Goal: run 1000 m. Adds gaps in the ground that need a well-timed jump. * Level 3, Final run: Goal: survive a 30-second chase. Outrun a giant rock golem chasing from behind, then a win screen. Controls: * Tap anywhere, or press Space or the up arrow, to jump. Hold for a higher jump. * A start screen with the game title and "Tap to start", a pause button, and a game-over screen with the score, the best score and a "Play again" button. * Keep touch targets at least 44 px, stop the page from scrolling or zooming while you play (touch-action: none), and keep working when the window is resized or rotated. Sound: * Synthesize all sound in code with the Web Audio API (oscillators, filtered noise, envelopes). No audio files or libraries. * Short sound effects for jump, pickup chime, hit thud, level-up jingle and game over. * Sound effects only, with no background music. * Start audio on the first tap or key press, since browsers block sound before that, and add a mute button. Game feel: * Run the game loop with requestAnimationFrame and delta time, capped for slow frames, so it plays at the same speed on 60 Hz and 120 Hz screens. * Add game feel: particles on pickups, a small screen shake on hits, squash and stretch on moving characters, and eased menu transitions. * Difficulty: normal. Keep it fair: a gentle start, a steady ramp, and hitboxes slightly smaller than the drawings. * Show the score and lives, plus the level number, in a clean HUD, and save the best score in localStorage, wrapped in try/catch so the game still works where storage is blocked. * No external assets, libraries, fonts or network requests: draw and synthesize everything in code. * Size the canvas by devicePixelRatio so it looks sharp on high-resolution screens. Build and check: * Call the game "Bolt Run" and show the title on the start screen. * Before you reply, read through the code once: every level can be reached and finished, game over and restart work, and nothing throws an error. Keep token use low: * Write compact code built from small reusable helpers (shapes, entities, collisions, sound envelopes) instead of hand-coding every detail. * To fix something, edit only the lines that need it. Do not rewrite the whole game. * Do not explain the code in the chat. Reply with the playable game and one or two lines on how to play.
From prompt to playable game in four moves
-
Open a new chat
Start a fresh conversation with Claude so nothing from an earlier chat bleeds into the brief.
-
Paste and send
Send the prompt as one message. Claude writes the whole game, art and sound included, as a single HTML file.
-
Play it in the chat
The game opens as an artifact next to the conversation. Tap to start; on a phone, open it full screen for the best feel.
-
Tweak and share
Ask for one round of changes, like "make level 1 easier" or "add a boss". To share it, publish the artifact and send the link.
Three levels, each adding one new twist
The level plan is the heart of the prompt. Each level has a goal and adds exactly one new idea, so the game teaches itself as you play and builds to a finale. It follows the game type and level count you pick above.
Anatomy of the prompt
Each block answers a question Claude would otherwise have to guess at. Keep the structure when you write your own and the games stay reliable.
Names the deliverable: one self-contained HTML file, shown as an artifact you can play in the chat, with both touch and keyboard controls.
Sets the screen shape: either responsive, filling any screen while keeping the core play area in a safe zone, or a fixed shape that scales with letterboxing so it plays the same everywhere.
A short pitch with the core loop: what you do, what you collect and what hurts you. One mechanic, clearly stated.
A hero with specific traits and one art direction, so every sprite, pickup and background matches.
A level plan where each level adds exactly one twist and the last is a finale. This is what turns a toy into a game with pacing.
Spells out touch and keyboard input, plus the start, pause and game-over screens every game needs.
Synthesized with the Web Audio API and started on the first tap, because browsers block sound until you interact with the page.
The polish checklist: a delta-time loop, particles and screen shake, fair hitboxes, a saved best score and no outside assets.
An optional "a game by" line on the start and end screens, kept small so your name is seen without getting in the way of play.
One read-through for errors before replying, compact reusable helpers, small targeted fixes and a short reply.
Remix the game, keep the structure
Swap the creative blocks and leave the technical requirements alone. Those are what keep the game smooth, fair and playable on every screen.
Make a small, complete game I can play right here: one self-contained HTML file with a <canvas> and inline JavaScript, shown as an artifact I can play in the chat. It must work on a phone with touch and on a computer with a keyboard. Format: [Responsive: fill the whole screen at any size and orientation with no letterbox bars; the shorter side always shows 540 world units, the longer side shows more of the world, and the core play area stays in a central safe zone. / 9:16 portrait, 16:9 landscape or 1:1 square: use a fixed 540×960, 960×540 or 720×720 game world and scale it to fit, letterboxed and never stretched.] Game: [Type of game.] [What the hero does, where.] [What you collect and what hurts you.] [How you lose.] Hero and look: [Name], [a short description with 2–3 traits]. Draw everything with canvas shapes as polished, smooth vector art: clean gradients, soft shadows and consistent colors. Levels: Between levels, show a short "Level 2" card, and carry the score across levels. [What happens to lives between levels, and what losing them all does.] * Level 1, [name]: Goal: [goal]. [a slow, forgiving start that teaches the core mechanic]. * Level 2, [name]: Goal: [goal]. [one new twist]. * Level 3, [name]: Goal: [goal]. [a finale or boss], then a win screen. Controls: * [Touch controls: tap, drag or on-screen buttons.] [Keyboard keys.] * A start screen with the game title and "Tap to start", a pause button, and a game-over screen with the score, the best score and a "Play again" button. * Keep touch targets at least 44 px, stop the page from scrolling or zooming while you play (touch-action: none), and keep working when the window is resized or rotated. Sound: * Synthesize all sound in code with the Web Audio API (oscillators, filtered noise, envelopes). No audio files or libraries. * Short sound effects for [jump, pickup, hit, level-up and game over]. * Start audio on the first tap or key press, since browsers block sound before that, and add a mute button. Game feel: * Run the game loop with requestAnimationFrame and delta time, capped for slow frames, so it plays at the same speed on 60 Hz and 120 Hz screens. * Add game feel: particles on pickups, a small screen shake on hits, squash and stretch on moving characters, and eased menu transitions. * Difficulty: [chill / normal / hard]. [How fast it starts and ramps up, how forgiving the hitboxes are.] * Show the score in a clean HUD, and save the best score in localStorage, wrapped in try/catch so the game still works where storage is blocked. * No external assets, libraries, fonts or network requests: draw and synthesize everything in code. Credits: (optional, delete this section to leave it out) * On the start screen, show "a game by [your name]" in small, subtle text under the title. * On the win and game-over screens, show "Made by [your name]" in small text below the buttons. * Set the page title to "[title] by [your name]". Build and check: * Call the game "[title]" and show the title on the start screen. * Before you reply, read through the code once: every level can be reached and finished, game over and restart work, and nothing throws an error. Keep token use low: * Write compact code built from small reusable helpers (shapes, entities, collisions, sound envelopes) instead of hand-coding every detail. * To fix something, edit only the lines that need it. Do not rewrite the whole game. * Do not explain the code in the chat. Reply with the playable game and one or two lines on how to play.
If something's off, send one follow-up
Claude keeps the whole game in context, so a single follow-up message usually fixes it. Here are the ones that come up most.
Claude showed code instead of a game I can play
Artifacts are probably off, or the reply was cut short. Check that Artifacts are turned on in Claude's settings, then send this.
Touch controls don't work on my phone
The page scrolls or zooms while I play
There's no sound
Check that your phone isn't on silent, then tap the game once: browsers only allow sound after you interact with the page. If it's still silent, send this.
It's too hard, or too easy
It runs too fast, or stutters
I hit my usage limit before the game was done
Fewer levels and fewer fix-up rounds use the fewest tokens. Start with three levels, and make all your changes in one follow-up message instead of several.
How do I share it, or play it full screen?
Open the artifact and use its Publish or Share option to get a link anyone can open and play. On a phone, open the artifact full screen before you play so the chat doesn't scroll under your thumb.