@jimshad.dev
// New  A guide to making games with Claude

One prompt. Playable game. ▶ Even on mobile

Paste one message into Claude and get back a finished mini game you can play right in the chat: a hero, a handful of levels, a score to beat and sound effects, all drawn and synthesized in code. No engine, no downloads, no coding.

ScreenResponsive
Plays onPhone + desktop
EngineCanvas + JS
Levels3
SoundEffects only
ShareOne link
How to play
1×Prompt
0Coding
0Installs
PWR 1P·ARCADE
Play full screen
The prompt

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.

Customize

Screen shape
Game type
3levels

Each level adds one new twist, and the last one is a finale.

Difficulty

A gentle start that ramps up steadily. Lives carry over, and you win one back after each level.

Sound

Effects only, with no background music.

Theme:
0 / 1200

The idea follows your game type, hero name and theme. Edit it freely, or describe your own game.

Art style
Credits Off
Where it shows

Type your name to add a credit to the game.

prompt.txt · Responsive · 3 levels · Endless runner · Polished vector
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.
Works on claude.ai and in the Claude apps on phone and desktop: the game opens as an artifact right in the chat. If Claude only shows code, check that Artifacts are turned on in Claude's settings. In Claude Code, ask for the HTML file and open it in your browser.
How to use it

From prompt to playable game in four moves

  1. Open a new chat

    Start a fresh conversation with Claude so nothing from an earlier chat bleeds into the brief.

  2. Paste and send

    Send the prompt as one message. Claude writes the whole game, art and sound included, as a single HTML file.

  3. 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.

  4. 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.

Level plan · 3 levels

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.

Why it works

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.

Opening line

Names the deliverable: one self-contained HTML file, shown as an artifact you can play in the chat, with both touch and keyboard controls.

Format

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.

Game

A short pitch with the core loop: what you do, what you collect and what hurts you. One mechanic, clearly stated.

Hero and look

A hero with specific traits and one art direction, so every sprite, pickup and background matches.

Levels

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.

Controls

Spells out touch and keyboard input, plus the start, pause and game-over screens every game needs.

Sound

Synthesized with the Web Audio API and started on the first tap, because browsers block sound until you interact with the page.

Game feel

The polish checklist: a delta-time loop, particles and screen shake, fair hitboxes, a saved best score and no outside assets.

Credits

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.

Build, check, low tokens

One read-through for errors before replying, compact reusable helpers, small targeted fixes and a short reply.

Make it yours

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.

An endless runner
A one-button cave flyer: hold to rise, let go to sink
collecting glowing gears
rescuing lost baby turtles and carrying them home
Bolt, a small round robot
Ember, a tiny dragon who puffs little clouds of smoke
sunset hilltops
rainy city rooftops at night, neon signs below
a light chiptune loop
a slow lo-fi beat with a soft kick and vinyl crackle
template.txt · fill the brackets
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.
Troubleshooting

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.

Don't just show me the code. Put the whole game in one HTML artifact I can play right here in the chat.
Touch controls don't work on my phone
Touch controls don't work on my phone. Use pointer events on the canvas with touch-action: none, call preventDefault on touch input, and make every on-screen button at least 44 px. Make sure a tap starts the game.
The page scrolls or zooms while I play
Stop the page from scrolling, zooming or selecting text while I play: touch-action: none and user-select: none on the game, overscroll-behavior: none on the page, and preventDefault on touchmove.
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.

There's no sound. Create the AudioContext, or resume it, inside the first tap or key handler, and make sure the game starts unmuted.
It's too hard, or too easy
Make level 1 much easier: slower speed, more space between obstacles and bigger hitboxes on pickups. Then ramp up more gradually over the later levels.
It runs too fast, or stutters
Use requestAnimationFrame with delta time capped at 50 ms so the speed is the same on every screen, and pre-render the background and any glow once to offscreen canvases.
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.

Keep the current game. Change only what's needed for these fixes and reply with the updated game: [your fixes].
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.

Share it

Send it to your friends

Every game you make can become a link. Publish it once and anyone you send it to can open it and play, on a phone or a computer.

  1. Publish

    Open the game in the chat and choose Publish or Share.

  2. Copy the link

    One link works everywhere. Send it in any chat, post it, or turn it into a QR code.

  3. Challenge them

    The game remembers each player's best score, so dare your friends to beat yours.