Claude Prompt Library

30 Claude Prompts That Build Playable Games

30 copy-paste prompts

Describe a game and Claude returns the whole thing as one self-contained HTML file you can play in the artifact preview right away. Prompts for arcade classics, puzzles, word and quiz games, typing trainers, and board games. No assets, no setup, no "give me the code and I'll figure it out."

In short: This page contains 30 copy-paste ready prompts, organized into 6 categories with a description and pro tip for each. The first 15 prompts are free instantly โ€” no signup needed. Hand-curated and tested by the AI Academy team.

By Louis Corneloup ยท Founder, Techpresso
Last updated ยทHand-curated & tested by the AI Academy team

Classic Arcade

5 prompts

Snake With Score and Speed Ramp

1/30

You are a game developer who ships tight, bug-free HTML5 canvas games. <context> Build a complete Snake game as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, so it runs and is playable instantly in the artifact preview with no assets or setup. </context> <inputs> - Grid size: [E.G. 20x20 CELLS] - Starting speed and how it ramps: [E.G. SPEEDS UP EVERY 5 FOODS] - Color theme: [E.G. NEON ON DARK] - Controls: [ARROW KEYS / WASD / BOTH] - Game-over behavior: [SHOW SCORE AND RESTART KEY] </inputs> <task> Build a playable Snake game: a snake that grows when it eats food, dies on wall or self collision, a live score, a persistent high score via localStorage, a speed that increases as the score climbs, and a clean game-over overlay with the final score and a press-to-restart prompt. Add a short on-screen controls hint. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries or external assets. - Use requestAnimationFrame with a fixed time-step so speed is frame-rate independent. - Stop the snake reversing directly into itself; keep input responsive with no missed key presses. </constraints> <format> Return the full HTML as an artifact, then explain how the speed ramp is tuned and one thing I could change to make it harder. </format>

Builds a complete, playable Snake game with score, high score, and a speed ramp as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a wrap-around mode toggle so the snake exits one wall and reappears on the opposite side for a different feel.

Pong With AI Paddle

2/30

You are a game developer who builds clean two-player and single-player canvas games. <context> Build a complete Pong game as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Mode: [PLAYER VS AI / TWO PLAYERS LOCAL] - AI difficulty: [EASY / MEDIUM / HARD] - Win condition: [FIRST TO 11 / FIRST TO 21] - Controls: [W/S FOR LEFT, ARROWS FOR RIGHT] - Style: [RETRO BLACK AND WHITE / NEON] </inputs> <task> Build a playable Pong game: two paddles, a ball that bounces off paddles and top/bottom walls, a score for each side displayed at the top, a centered net line, ball speed that increases slightly with each rally, and a win screen when a side reaches the target with a press-to-restart prompt. If single-player, write a paddle AI that tracks the ball but is beatable at the chosen difficulty. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Ball bounce angle should depend on where it hits the paddle, not just reflect straight. - Smooth paddle movement with requestAnimationFrame; AI must miss occasionally on lower difficulties. </constraints> <format> Return the full HTML as an artifact, then explain how you tuned the AI to stay beatable and how to make two-player mode the default. </format>

Builds a playable Pong game with a beatable paddle AI and scoring as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to add a subtle screen-shake or a beep tone via the Web Audio API on each paddle hit to make rallies feel punchy.

Breakout / Brick Breaker

3/30

You are a game developer who builds satisfying arcade games on HTML5 canvas. <context> Build a complete Breakout (brick breaker) game as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Brick layout: [E.G. 6 ROWS x 10 COLUMNS, COLORED BY ROW] - Lives: [E.G. 3] - Paddle control: [MOUSE / ARROW KEYS / BOTH] - Color theme: [DESCRIBE] - Extra: [POWER-UP THAT WIDENS PADDLE / MULTI-BALL / NONE] </inputs> <task> Build a playable Breakout game: a paddle the player moves, a ball that bounces off walls, paddle, and bricks, bricks that disappear when hit and award points, a lives counter, a live score, a you-win screen when all bricks are cleared, and a game-over screen when lives run out, both with a press-to-restart prompt. Include the chosen extra if any. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Ball reflection off the paddle should vary by hit position so the player can aim. - Detect brick collisions accurately with no tunneling through bricks at speed. </constraints> <format> Return the full HTML as an artifact, then explain the collision approach and how to add a second level with a new brick pattern. </format>

Builds a playable brick-breaker game with lives, scoring, and win/lose states as a previewable artifact.

๐Ÿ’ก

Pro tip: Have Claude add a falling power-up that drops from a destroyed brick occasionally; it makes runs feel less repetitive.

Space Shooter / Asteroids-style

4/30

You are a game developer who builds responsive twitch-action canvas games. <context> Build a complete top-down space shooter as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Player ship control: [ARROWS TO MOVE, SPACE TO SHOOT / MOUSE AIM] - Enemies: [ASTEROIDS THAT SPLIT / WAVES OF SHIPS] - Lives or health: [E.G. 3 LIVES] - Difficulty curve: [E.G. MORE ENEMIES OVER TIME] - Style: [RETRO VECTOR / NEON] </inputs> <task> Build a playable space shooter: a controllable ship, bullets the player fires, enemies that spawn and move toward the player or drift across, collision that destroys bullets and enemies and costs the player a life on contact, a live score, a wave or time-based difficulty ramp, and a game-over screen with the final score and restart prompt. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries or sprite assets (draw shapes with canvas). - Limit bullet fire rate so holding the key does not spam; cap on-screen objects for performance. - Use requestAnimationFrame and keep movement frame-rate independent. </constraints> <format> Return the full HTML as an artifact, then explain the spawn logic and how to add a boss that appears at a score threshold. </format>

Builds a playable space shooter with enemy waves, scoring, and lives as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a brief muzzle-flash and a small particle burst when an enemy explodes so hits feel rewarding.

Flappy-style One-Button Game

5/30

You are a game developer who builds simple, addictive one-button games. <context> Build a complete one-button flapping game (Flappy Bird style) as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Character: [BIRD / ROCKET / FISH, DRAWN WITH SHAPES] - Obstacle: [PIPES / GAPS, AND THE GAP SIZE] - Tap action: [CLICK, SPACE, OR BOTH] - Difficulty: [GAP SHRINKS OVER TIME / CONSTANT] - Theme: [DESCRIBE COLORS] </inputs> <task> Build a playable one-button game: gravity pulls the character down, a tap gives an upward impulse, obstacles scroll from the right with a gap to fly through, the player scores a point per obstacle cleared, collision with an obstacle or the ground ends the run, plus a live score, a high score in localStorage, and a tap-to-restart game-over screen. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries or image assets. - Tune gravity and impulse so the game is hard but fair; obstacle gaps must always be passable. - Frame-rate-independent physics via requestAnimationFrame with a fixed time-step. </constraints> <format> Return the full HTML as an artifact, then explain how you balanced gravity versus tap strength and one tweak to make it easier for beginners. </format>

Builds a playable one-button flapping game with scrolling obstacles and a high score as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to add a tiny rotation on the character based on its velocity; it makes the movement read as intentional, not floaty.

XML tags are just the start. Learn the full Claude workflow.

A growing library of 300+ hands-on AI tutorials covering Claude, ChatGPT, and 50+ tools. New tutorials added every week.

Start 7-Day Free Trial

Puzzle Games

5 prompts

2048 Sliding Tile Puzzle

6/30

You are a game developer who builds polished grid-based puzzle games. <context> Build a complete 2048 game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Use a CSS grid of tiles, not a canvas. </context> <inputs> - Grid size: [4x4 STANDARD / OTHER] - Controls: [ARROW KEYS, AND SWIPE IF YOU CAN] - Color scheme for tiles: [DESCRIBE OR USE CLASSIC] - Win tile: [REACH 2048 / KEEP PLAYING AFTER] </inputs> <task> Build a playable 2048: arrow keys slide all tiles, equal adjacent tiles merge once per move, a new 2 or 4 spawns after each valid move, the score increases by merged values, a live score and best score in localStorage, a you-win message at 2048 with a keep-going option, and a game-over message when no moves remain, with a new-game button. Animate or visually distinguish tile values clearly by color. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Merge logic must be correct: a tile merges at most once per move, and a move only spawns a tile if something actually changed. - Accessible: readable tile contrast and a visible focus or instructions hint. </constraints> <format> Return the full HTML as an artifact, then explain how you prevent double-merges and how to add smooth slide animations. </format>

Builds a fully playable 2048 with correct merge logic, scoring, and win/lose states as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add an undo-last-move button backed by a one-step history stack; it changes the whole risk-taking feel.

Memory Match (Concentration)

7/30

You are a game developer who builds clean card-matching games for any age. <context> Build a complete memory match game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Use HTML/CSS cards, not a canvas. </context> <inputs> - Grid size: [E.G. 4x4 = 8 PAIRS] - Card faces: [EMOJI SET / COLORS / NUMBERS] - Track: [MOVES, TIMER, OR BOTH] - Theme and colors: [DESCRIBE] </inputs> <task> Build a playable memory game: a shuffled grid of face-down cards, click to flip up to two, matching pairs stay revealed and mismatches flip back after a short delay, a moves counter and a timer, a win screen when all pairs are found showing moves and time with a best-score saved in localStorage, and a restart button that reshuffles. Use emoji or CSS shapes as card faces so no images are needed. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries or image files. - Lock input while two non-matching cards are showing so a third can't be flipped early. - Shuffle must be a real Fisher-Yates shuffle; cards must be keyboard-focusable and flippable. </constraints> <format> Return the full HTML as an artifact, then explain the flip-lock logic and how to add a hard mode with a larger grid. </format>

Builds a playable memory match game with moves, timer, and best score as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to add a brief CSS flip animation on each card so reveals feel tactile instead of instant swaps.

Minesweeper

8/30

You are a game developer who builds faithful classic puzzle games. <context> Build a complete Minesweeper game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Use an HTML/CSS grid. </context> <inputs> - Board size and mine count: [E.G. 10x10 WITH 15 MINES, OR BEGINNER/INTERMEDIATE/EXPERT] - Flagging control: [RIGHT-CLICK / LONG-PRESS / BOTH] - Style: [CLASSIC GRAY / MODERN FLAT] - First-click safety: [GUARANTEE FIRST CLICK IS NOT A MINE] </inputs> <task> Build a playable Minesweeper: a grid where left-click reveals a cell, revealing a numbered cell shows adjacent mine count, revealing an empty cell flood-fills all connected empty cells, right-click toggles a flag, hitting a mine ends the game and reveals all mines, and clearing every safe cell wins. Add a mine counter, a timer, a face or restart button, and a clear win/lose state. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Flood-fill must reveal connected zero-cells and their numbered borders correctly. - Disable the browser context menu on the board so right-click flags cleanly. </constraints> <format> Return the full HTML as an artifact, then explain the flood-fill algorithm and how the first-click safety is enforced. </format>

Builds a faithful, playable Minesweeper with flood-fill, flags, and a timer as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a chord click (clicking a satisfied number reveals its neighbors) for the authentic expert-player feel.

Sliding Number Puzzle (15-Puzzle)

9/30

You are a game developer who builds clean logic puzzles. <context> Build a complete sliding tile puzzle (the 15-puzzle) as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Size: [4x4 = 15 TILES / 3x3 = 8 TILES] - Tile content: [NUMBERS / A SLICED IMAGE FEEL VIA NUMBERED COLOR BLOCKS] - Controls: [CLICK A TILE NEXT TO THE GAP / ARROW KEYS] - Track: [MOVES AND TIMER] </inputs> <task> Build a playable 15-puzzle: tiles numbered 1..N with one empty space, clicking a tile adjacent to the gap slides it in, a shuffle that produces a solvable arrangement, a moves counter and timer, detection of the solved state with a win message, and a shuffle/restart button. Show a subtle highlight on tiles that can move. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - The shuffle MUST only generate solvable boards (use legal random moves or a solvability check). - Smooth slide transitions; the puzzle must be solvable from every shuffle. </constraints> <format> Return the full HTML as an artifact, then explain how you guarantee solvability and how to swap numbers for a numbered-image grid. </format>

Builds a playable, always-solvable 15-puzzle with move and time tracking as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to shuffle by applying hundreds of random legal moves instead of random permutation; it sidesteps unsolvable boards entirely.

Falling-Block Stacker (Tetris-style)

10/30

You are a game developer who builds precise falling-block puzzle games. <context> Build a complete falling-block stacking game (Tetris-style) as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Board size: [E.G. 10 WIDE x 20 TALL] - Controls: [ARROWS TO MOVE/ROTATE, DOWN TO SOFT-DROP, SPACE TO HARD-DROP] - Level/speed ramp: [SPEEDS UP EVERY 10 LINES] - Color theme per piece: [DESCRIBE OR CLASSIC] - Show next piece: [YES / NO] </inputs> <task> Build a playable stacker: the seven standard tetromino shapes spawn at the top and fall, the player moves and rotates them, completed rows clear and award points, the stack rising to the top ends the game, plus a level that increases fall speed, a live score and lines counter, an optional next-piece preview, and a game-over screen with restart. Rotation must respect the board edges. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Collision, rotation, and line-clearing logic must be correct with no overlapping or stuck pieces. - Use requestAnimationFrame with a gravity timer; input should feel responsive, not laggy. </constraints> <format> Return the full HTML as an artifact, then explain your rotation and wall-handling approach and how to add a hold-piece feature. </format>

Builds a playable falling-block puzzle with rotation, line clears, and levels as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add ghost-piece outlining at the drop position; it removes most misdrops and makes the game feel modern.

Word & Letter Games

5 prompts

Wordle Clone With Daily Word

11/30

You are a game developer who builds clean word games with great keyboard UX. <context> Build a complete Wordle-style word game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets or network calls. </context> <inputs> - Word length: [5 LETTERS STANDARD] - Number of guesses: [6] - Word source: [EMBED A SMALL ARRAY OF VALID ANSWER WORDS IN THE JS] - Word selection: [RANDOM EACH LOAD / SAME WORD PER DAY VIA DATE SEED] - Theme: [LIGHT / DARK] </inputs> <task> Build a playable Wordle clone: a grid of guess rows, an on-screen keyboard plus physical keyboard input, per-letter feedback coloring each tile correct (right letter right spot), present (right letter wrong spot), or absent, with the on-screen keyboard keys colored to match. Reject guesses that are not full-length words from the embedded list, show a win message with guess count and a lose message revealing the answer, and a play-again button. </task> <constraints> - One self-contained HTML file; vanilla JS only, no API calls or external word lists. - The present/absent coloring MUST handle duplicate letters correctly (the classic edge case). - Accessible: keyboard usable, sufficient color contrast, and a non-color cue is a plus. </constraints> <format> Return the full HTML as an artifact, then explain how you handled duplicate-letter coloring and how to expand the word list. </format>

Builds a playable Wordle clone with on-screen keyboard and correct duplicate-letter logic as a previewable artifact.

๐Ÿ’ก

Pro tip: Hand Claude your own themed word list (e.g. cooking or coding terms) and ask it to seed the daily word from the date so everyone gets the same puzzle.

Hangman With Categories

12/30

You are a game developer who builds friendly word-guessing games. <context> Build a complete Hangman game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Word categories: [E.G. ANIMALS, MOVIES, COUNTRIES, WITH WORDS EMBEDDED IN JS] - Allowed wrong guesses: [E.G. 6] - Input method: [ON-SCREEN LETTER BUTTONS, PHYSICAL KEYBOARD, OR BOTH] - Style: [PLAYFUL / CLASSIC] </inputs> <task> Build a playable Hangman: pick a random word from a chosen category, show blanks for each letter and a category hint, let the player guess letters, reveal correct letters in place, count wrong guesses and draw the hangman progressively with canvas or CSS, end in a win when the word is revealed or a loss when guesses run out (revealing the word), and offer a new-game button. Disable letters already guessed. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Already-guessed letters must visibly disable and not count twice. - Handle words with spaces or hyphens by auto-revealing those characters. </constraints> <format> Return the full HTML as an artifact, then explain how the hangman drawing advances and how to add a difficulty setting via word length. </format>

Builds a playable Hangman with categories, a hint, and a drawn figure as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a category picker on the start screen so the same file works as a party game across themes.

Word Search Generator + Player

13/30

You are a game developer who builds grid word puzzles. <context> Build a complete word search puzzle, both generated and playable, as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Word list: [8-15 WORDS, EMBEDDED OR TYPED INTO A FIELD] - Grid size: [E.G. 12x12] - Directions allowed: [HORIZONTAL, VERTICAL, DIAGONAL, AND/OR REVERSED] - Theme and colors: [DESCRIBE] </inputs> <task> Build a playable word search: generate a grid that places every word in an allowed direction without conflicts and fills the rest with random letters, show the words-to-find list, let the player click-and-drag (or click start then end) to select a line of letters, mark a found word when the selection matches one and cross it off the list, and show a completion message when all words are found with a regenerate button. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - The generator must place every word legally; if a word can't fit after retries, regenerate the board. - Selection must work by mouse drag and be forgiving on touch; highlight the active drag path. </constraints> <format> Return the full HTML as an artifact, then explain the placement algorithm and how to make the grid printable. </format>

Builds a word search that generates a valid grid and lets the player find words as a previewable artifact.

๐Ÿ’ก

Pro tip: Give Claude a themed word list and ask for a printable mode that hides the answer highlights so you can hand out paper copies.

Anagram / Word Unscramble Game

14/30

You are a game developer who builds fast-paced word puzzles. <context> Build a complete anagram unscramble game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Word pool: [EMBED A LIST OF WORDS IN JS, OPTIONALLY BY DIFFICULTY] - Round timer: [E.G. 60 SECONDS PER GAME / PER WORD] - Scoring: [POINTS BY WORD LENGTH OR SPEED] - Hint system: [REVEAL ONE LETTER / NONE] - Theme: [DESCRIBE] </inputs> <task> Build a playable unscramble game: show a scrambled version of a word, let the player type or click letter tiles to form the answer, accept the correct unscramble and award points (longer or faster = more), advance to the next word, run on a countdown timer, allow a skip and an optional one-letter hint, and show a final score with the words solved and a play-again button. Keep a best score in localStorage. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Never display a 'scramble' that accidentally equals the original word; reshuffle if it does. - Input check should be case-insensitive and trim whitespace; show clear right/wrong feedback. </constraints> <format> Return the full HTML as an artifact, then explain the scoring formula and how to add difficulty tiers by word length. </format>

Builds a timed word-unscramble game with scoring, hints, and a best score as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to escalate word length as the score rises so the game gets harder the better you do.

Typing Speed Game (WPM Trainer)

15/30

You are a game developer who builds typing trainers with accurate metrics. <context> Build a complete typing-speed game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Text source: [EMBED A SET OF SENTENCES OR PARAGRAPHS IN JS] - Test mode: [FIXED TIME E.G. 30/60s / FIXED WORD COUNT] - Metrics to show: [WPM, ACCURACY, ERRORS] - Theme: [LIGHT / DARK / MONO] </inputs> <task> Build a playable typing test: display a passage, highlight the current character, color each typed character green when correct and red when wrong as the user types, run a timer (or word target), and compute live WPM and accuracy. At the end, show a results card with WPM, accuracy, error count, and characters typed, plus a best-WPM saved in localStorage and a restart button that loads a new passage. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - WPM must use the standard (characters / 5) / minutes formula and accuracy = correct / total typed. - Capture keystrokes cleanly (handle backspace), keep focus on the input, and prevent text selection from breaking the flow. </constraints> <format> Return the full HTML as an artifact, then explain how WPM and accuracy are calculated and how to add a code-snippet typing mode. </format>

Builds a typing-speed game with live WPM, accuracy, and a best score as a previewable artifact.

๐Ÿ’ก

Pro tip: Paste in your own paragraphs (or code snippets) so the trainer drills exactly the text you want to get faster at.

Quiz & Trivia

5 prompts

Multiple-Choice Quiz Game

16/30

You are a game developer who builds clean, scored quiz apps. <context> Build a complete multiple-choice quiz game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Embed the questions in the JS as a data array. </context> <inputs> - Topic and questions: [10-15 QUESTIONS, EACH WITH 4 OPTIONS AND THE CORRECT ANSWER] - Per-question timer: [E.G. 15 SECONDS / NONE] - Feedback: [SHOW CORRECT ANSWER IMMEDIATELY / ONLY AT THE END] - Style and colors: [DESCRIBE] </inputs> <task> Build a playable quiz: a start screen, then one question at a time with four clickable options, scoring for correct answers, optional immediate right/wrong feedback that highlights the correct option, a progress indicator (question X of N), an optional countdown per question, and a results screen showing the score, a percentage, a short performance message, and a restart button. Shuffle question order and option order each play. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Lock answer buttons once an option is chosen so a question can't be double-scored. - Keep the question data in one clearly commented array so it is trivial to edit. </constraints> <format> Return the full HTML as an artifact, then show the question-object format and explain how to drop in my own questions. </format>

Builds a playable multiple-choice quiz with scoring, feedback, and results as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to keep all questions in one well-commented array at the top so you can swap in your own topic in minutes.

Trivia Game With Categories & Lifelines

17/30

You are a game developer who builds game-show-style trivia experiences. <context> Build a complete trivia game with categories and lifelines as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Embed questions in the JS. </context> <inputs> - Categories and questions: [3-5 CATEGORIES, EACH WITH SEVERAL QUESTIONS, OPTIONS, AND ANSWERS] - Difficulty/point tiers: [E.G. EASY 100, MEDIUM 200, HARD 300] - Lifelines: [50/50, SKIP, EXTRA TIME โ€” PICK 1-2] - Style: [GAME-SHOW BOLD / CLEAN] </inputs> <task> Build a playable trivia game: a category-select board where the player picks a category and tier, scored questions worth more at higher difficulty, one or two lifelines (e.g. 50/50 removes two wrong options, skip moves on), a running total score, a question counter, and an end screen when all questions are used showing the final score and a play-again button. Track which questions are answered so none repeat. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Each lifeline is usable a limited number of times and visibly disables once spent. - Mark answered tiles as used; questions and answers live in one editable data structure. </constraints> <format> Return the full HTML as an artifact, then explain the data structure and how the 50/50 lifeline picks which wrong options to remove. </format>

Builds a category-based trivia game with point tiers and lifelines as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a host-style message after each answer; it makes a solo file feel like a real game show.

True / False Rapid-Fire

18/30

You are a game developer who builds fast reflex-and-knowledge games. <context> Build a complete true-or-false rapid-fire game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Embed statements in the JS. </context> <inputs> - Statements: [A LIST OF STATEMENTS EACH FLAGGED TRUE OR FALSE] - Time pressure: [GLOBAL TIMER / PER-STATEMENT TIMER] - Controls: [TRUE/FALSE BUTTONS, PLUS LEFT/RIGHT OR T/F KEYS] - Streak bonus: [YES / NO] - Theme: [DESCRIBE] </inputs> <task> Build a playable true/false game: show one statement at a time with True and False buttons (and keyboard shortcuts), score correct answers, run on a countdown so the goal is to answer as many as possible before time runs out, optionally reward streaks with bonus points, flash quick correct/wrong feedback, and end with a final score, accuracy, and a best score in localStorage plus a restart. Reshuffle statements each game. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Feedback and the next statement must appear fast enough to keep the rapid-fire pace. - Statement data lives in one editable array with a clear true/false flag. </constraints> <format> Return the full HTML as an artifact, then explain the streak-bonus math and how to make it harder by shortening the timer. </format>

Builds a timed true/false rapid-fire game with streaks and a best score as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a combo multiplier that resets on a wrong answer so a clean streak is worth chasing.

Higher-or-Lower Guessing Game

19/30

You are a game developer who builds simple, sticky comparison games. <context> Build a complete higher-or-lower game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Embed the comparison data in the JS. </context> <inputs> - Comparison items: [A LIST OF ITEMS EACH WITH A LABEL AND A NUMERIC VALUE, E.G. POPULATIONS, PRICES, SEARCH VOLUMES] - Reveal style: [SHOW THE VALUE AFTER THE GUESS] - Lives: [ONE WRONG ENDS IT / 3 LIVES] - Theme: [DESCRIBE] </inputs> <task> Build a playable higher-or-lower game: show two items side by side with the first item's value visible and the second hidden, ask the player to guess whether the second's value is higher or lower, reveal the value and score a point if correct, then slide the second item into the first slot and bring in a new challenger, continuing until a wrong guess (or lives run out). Track the score and a best streak in localStorage, and offer a restart. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Handle ties sensibly (count as correct or skip) and never compare an item against itself. - The data array is clearly editable so I can plug in my own metric and items. </constraints> <format> Return the full HTML as an artifact, then explain how the next item is chosen and how to swap in my own dataset. </format>

Builds a higher-or-lower guessing game with streaks and your own dataset as a previewable artifact.

๐Ÿ’ก

Pro tip: Feed Claude a list tied to your niche (tool prices, city populations) so the game doubles as branded content.

Flashcard Study Game With Spaced Recall

20/30

You are a game developer and learning-science nerd who builds study games. <context> Build a complete flashcard study game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. Embed the cards in the JS. </context> <inputs> - Cards: [A LIST OF FRONT/BACK PAIRS, E.G. TERM AND DEFINITION] - Modes: [FLIP-AND-SELF-RATE / MULTIPLE CHOICE] - Recall logic: [REVIEW MISSED CARDS MORE OFTEN] - Theme: [DESCRIBE] </inputs> <task> Build a playable flashcard game: show the front of a card, let the player flip it to see the back, self-rate as 'got it' or 'missed', queue missed cards to reappear sooner (a light spaced-recall loop), track progress through the deck, show a session summary with how many were learned versus still shaky, and let the player restart or focus only on the missed pile. Save progress per deck in localStorage so a session can resume. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - The recall logic must actually resurface missed cards before easy ones, not just reshuffle randomly. - Cards live in one editable array; add a clean flip animation and keyboard shortcuts for rating. </constraints> <format> Return the full HTML as an artifact, then explain the resurfacing logic and how to paste in my own deck. </format>

Builds a flashcard study game with a light spaced-recall loop and saved progress as a previewable artifact.

๐Ÿ’ก

Pro tip: Paste your real study terms and ask Claude to weight the resurfacing harder so cards you keep missing dominate the session.

Board & Logic Games

5 prompts

Tic-Tac-Toe With Unbeatable AI

21/30

You are a game developer who implements perfect-play board AIs. <context> Build a complete Tic-Tac-Toe game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Mode: [PLAYER VS UNBEATABLE AI / TWO PLAYERS LOCAL] - AI strength if vs AI: [UNBEATABLE / EASY-RANDOM / TOGGLE] - Who goes first: [PLAYER / AI / ALTERNATE] - Style: [MINIMAL / PLAYFUL] </inputs> <task> Build a playable Tic-Tac-Toe: a 3x3 board, click to place a mark, win detection across rows, columns, and diagonals, draw detection, a scoreboard tracking wins/losses/draws, and a reset. If vs AI, implement the move logic with minimax so the unbeatable setting truly never loses; offer an easy mode that plays randomly. Highlight the winning line. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - The unbeatable AI must use minimax (or equivalent) and provably never lose. - Prevent clicks on taken cells or after the game ends; keep the board keyboard-accessible. </constraints> <format> Return the full HTML as an artifact, then explain the minimax logic and how to add a difficulty slider that makes the AI imperfect. </format>

Builds a playable Tic-Tac-Toe with a true minimax unbeatable AI and a scoreboard as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude for a difficulty slider that randomly skips the optimal move some percent of the time so beginners can still win.

Connect Four vs AI

22/30

You are a game developer who builds turn-based board games with a thinking AI. <context> Build a complete Connect Four game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Board size: [7 COLUMNS x 6 ROWS STANDARD] - Mode: [VS AI / TWO PLAYERS LOCAL] - AI depth/strength: [EASY / MEDIUM / HARD] - Disc colors and theme: [DESCRIBE] </inputs> <task> Build a playable Connect Four: click a column to drop a disc that falls to the lowest empty slot, alternate turns, detect four-in-a-row horizontally, vertically, and diagonally, declare a winner and highlight the connecting discs, detect a full-board draw, and offer a new game. If vs AI, implement a minimax with a depth limit and a simple board heuristic so it plays a credible game at the chosen difficulty. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Win detection must cover all four directions including both diagonals. - The AI must block obvious player threats and take its own winning move when available. </constraints> <format> Return the full HTML as an artifact, then explain the heuristic the AI uses and how to raise its search depth for a harder game. </format>

Builds a playable Connect Four with gravity drops and a minimax AI as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to add a falling-disc drop animation; it makes each move feel weighty instead of instantly snapping into place.

Checkers (Draughts)

23/30

You are a game developer who builds classic two-player board games. <context> Build a complete Checkers game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Board: [8x8 STANDARD] - Mode: [TWO PLAYERS LOCAL / VS SIMPLE AI] - Rules: [FORCED CAPTURES YES/NO, KINGS, MULTI-JUMPS] - Colors and theme: [DESCRIBE] </inputs> <task> Build a playable Checkers game: standard starting layout, click a piece to see legal moves highlighted, move diagonally, capture by jumping an opponent piece, support multi-jumps, promote to king at the back row with kings moving both directions, enforce turn order, detect a win when a side has no pieces or no moves, and offer a reset. If forced captures are on, only allow capture moves when one is available. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Legal-move generation must be correct including kings, chained jumps, and forced-capture rules. - Highlight legal destinations for the selected piece; block illegal clicks. </constraints> <format> Return the full HTML as an artifact, then explain how multi-jumps are detected and how to add a basic capture-greedy AI. </format>

Builds a playable two-player Checkers with kings and multi-jumps as a previewable artifact.

๐Ÿ’ก

Pro tip: Start with two-player mode to verify the rules feel right, then ask Claude to bolt on a greedy AI that always takes the longest capture chain.

Reaction-Time Whack-a-Mole

24/30

You are a game developer who builds quick reflex games. <context> Build a complete whack-a-mole reaction game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Grid size: [E.G. 3x3 HOLES] - Round length: [E.G. 30 SECONDS] - Difficulty ramp: [MOLES APPEAR FASTER OVER TIME] - Bonus/penalty: [BOMB TILES THAT COST POINTS / NONE] - Theme: [DESCRIBE, USE EMOJI OR CSS SHAPES] </inputs> <task> Build a playable whack-a-mole: a grid of holes where moles pop up at random for a short window, clicking a mole in time scores a point and it disappears, missing it scores nothing, the spawn rate increases as the round goes on, an optional bomb tile costs points if clicked, a countdown timer, and an end screen with the score and a best score in localStorage plus a restart. Use emoji or shapes so no images are needed. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Each mole has a fair visible window; clearing the timeout on a hit prevents double scoring. - Keep tap targets large and responsive for both mouse and touch. </constraints> <format> Return the full HTML as an artifact, then explain how spawn timing scales and how to add a combo for fast consecutive hits. </format>

Builds a playable whack-a-mole reaction game with a difficulty ramp and best score as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a golden mole worth bonus points that appears rarely so there's a reason to stay alert every second.

Simon Says Memory Sequence

25/30

You are a game developer who builds rhythm-and-memory games. <context> Build a complete Simon Says color-sequence memory game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Number of pads: [4 CLASSIC] - Pad colors and tones: [DESCRIBE, OR USE WEB AUDIO BEEPS] - Speed: [GETS FASTER AS THE SEQUENCE GROWS] - Strict mode: [ONE MISTAKE RESETS / 3 LIVES] - Theme: [DESCRIBE] </inputs> <task> Build a playable Simon game: four colored pads, the game flashes a growing sequence (with an optional tone per pad via the Web Audio API), the player repeats it by clicking pads in order, a correct full repeat adds one step and speeds up slightly, a wrong click ends the round (or costs a life), and the screen shows the current level/round. Save the best level in localStorage and offer a start/restart button. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries or sound files (synthesize tones with Web Audio). - Lock input while the sequence is playing back so early clicks don't register. - The flash-and-tone for each pad must be clearly perceivable and consistent. </constraints> <format> Return the full HTML as an artifact, then explain how playback timing and input-locking work and how to add a strict-mode toggle. </format>

Builds a playable Simon Says memory-sequence game with tones and levels as a previewable artifact.

๐Ÿ’ก

Pro tip: Have Claude synthesize a distinct pitch per pad with the Web Audio API; the audio cue makes longer sequences far easier to memorize.

Most people use 10% of Claude. Tutorials unlock the rest.

AI Academy: 300+ hands-on tutorials on Claude, ChatGPT, Midjourney, and 50+ AI tools. New tutorials added every week.

Start Your Free Trial

Idle, Platformer & Casual

5 prompts

Idle / Clicker Game With Upgrades

26/30

You are a game developer who builds compulsive incremental games. <context> Build a complete idle/clicker game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Theme: [E.G. COOKIE BAKERY, COIN MINE, GARDEN] - Click reward: [POINTS PER CLICK] - Upgrades: [3-5 BUYABLE GENERATORS/MULTIPLIERS WITH COSTS] - Auto-income: [GENERATORS PRODUCE PASSIVE INCOME PER SECOND] - Theme colors: [DESCRIBE] </inputs> <task> Build a playable idle game: a big clickable element that adds currency per click, a shop of upgrades that cost currency, scale in price as you buy more, and either boost click value or add passive income per second, a running total and a per-second rate display, a game loop that ticks passive income continuously, and progress saved to localStorage so it resumes (including offline-ish gains since last visit). Format big numbers readably. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Upgrade costs must scale (e.g. geometric) so progression stays interesting and never trivially cheap. - Use a setInterval or rAF tick for passive income; numbers should never display as ugly long floats. </constraints> <format> Return the full HTML as an artifact, then explain the cost-scaling formula and how to add a prestige/reset-for-bonus layer. </format>

Builds a playable idle clicker with scaling upgrades, passive income, and saved progress as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to add a prestige reset that trades your progress for a permanent multiplier; it's what gives idle games long legs.

Side-Scrolling Platformer Level

27/30

You are a game developer who builds tight 2D platformers on canvas. <context> Build a complete single-level side-scrolling platformer as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Character control: [LEFT/RIGHT TO MOVE, UP OR SPACE TO JUMP] - Level elements: [PLATFORMS, GAPS, COINS, ONE OR TWO ENEMIES, A GOAL FLAG] - Physics feel: [GRAVITY, JUMP HEIGHT, MOVE SPEED] - Theme colors: [DESCRIBE] </inputs> <task> Build a playable platformer level: a character with gravity and jumping that lands on platforms, a camera that scrolls with the player, collectible coins that raise a score, at least one enemy that ends the run on contact (or can be jumped on), falling into a gap that costs a life or restarts, and a goal flag that triggers a level-complete screen. Show score and lives, and offer a restart. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries or sprite assets (draw with shapes). - Platform collision must be solid with no sinking through or sticking to edges; jump should feel responsive. - Use requestAnimationFrame with frame-rate-independent movement. </constraints> <format> Return the full HTML as an artifact, then explain the collision and camera approach and how I can edit the level layout array. </format>

Builds a playable side-scrolling platformer level with coins, enemies, and a goal as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to expose the level as a simple tile or coordinate array so you can redesign the layout without touching the engine.

Endless Runner

28/30

You are a game developer who builds smooth, score-chasing endless runners. <context> Build a complete endless runner as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Character and action: [E.G. A RUNNER THAT JUMPS, OR JUMPS AND DUCKS] - Obstacles: [GROUND HAZARDS / OVERHEAD HAZARDS] - Speed ramp: [GETS FASTER OVER TIME] - Controls: [SPACE/UP TO JUMP, DOWN TO DUCK] - Theme: [DESCRIBE] </inputs> <task> Build a playable endless runner: the world scrolls left automatically and speeds up over time, the character auto-runs and can jump (and duck if overhead hazards exist) to dodge obstacles that spawn from the right, the score is distance or time survived, hitting an obstacle ends the run, and there's a high score in localStorage plus a press-to-restart game-over screen. Include a subtle parallax or ground detail for depth. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries or image assets. - Obstacle spacing must always leave a reachable gap given the current speed and jump arc. - Frame-rate-independent physics; cap difficulty scaling so it stays playable, not impossible. </constraints> <format> Return the full HTML as an artifact, then explain how obstacle spacing stays fair as speed rises and how to add a double-jump. </format>

Builds a playable endless runner with a speed ramp, obstacles, and high score as a previewable artifact.

๐Ÿ’ก

Pro tip: Tell Claude to tie obstacle spacing to the current speed so the game never spawns an impossible gap as it accelerates.

Maze Generator + Solver Game

29/30

You are a game developer and algorithms enthusiast who builds maze games. <context> Build a complete maze game that generates a random maze and lets the player navigate it, as one self-contained HTML file with inline CSS and vanilla JavaScript on a <canvas>, playable instantly in the artifact preview with no assets. </context> <inputs> - Maze size: [E.G. 15x15 / SMALL/MEDIUM/LARGE] - Generation: [PERFECT MAZE VIA DFS OR PRIM'S] - Controls: [ARROWS/WASD TO MOVE FROM START TO EXIT] - Extras: [TIMER, MOVE COUNTER, SHOW-SOLUTION BUTTON] - Theme: [DESCRIBE] </inputs> <task> Build a playable maze game: generate a random solvable maze (a perfect maze with exactly one path between any two cells), draw it, place the player at the start and a clearly marked exit, let the player move with the keyboard while respecting walls, run a timer and move counter, declare a win on reaching the exit, offer a new-maze button, and include a show-solution toggle that highlights the path from start to finish. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - The generated maze must always be fully solvable; the solver path must be the actual shortest/only route. - Movement must respect walls precisely; the player can never clip through a wall. </constraints> <format> Return the full HTML as an artifact, then explain the generation and solving algorithms and how to scale the maze size. </format>

Builds a maze game that generates a solvable maze and tracks time, with a show-solution toggle, as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude to animate the maze generation or the solver path step by step; it turns the game into a neat algorithm demo too.

Rock-Paper-Scissors With Streaks

30/30

You are a game developer who builds polished casual mini-games. <context> Build a complete Rock-Paper-Scissors game as one self-contained HTML file with inline CSS and vanilla JavaScript, playable instantly in the artifact preview with no assets. </context> <inputs> - Variant: [CLASSIC / ROCK-PAPER-SCISSORS-LIZARD-SPOCK] - Match format: [SINGLE ROUNDS / FIRST TO 5] - Opponent: [RANDOM / A LIGHT PATTERN-BIASED AI] - Style and animations: [DESCRIBE] </inputs> <task> Build a playable RPS game: three (or five) choice buttons, a computer pick, clear round resolution showing both picks and who won, a running player/computer score and a current streak, a short reveal animation or countdown, an optional first-to-N match end screen, and a reset. If the AI is pattern-biased, have it slightly favor the counter to the player's most-used move while staying beatable. </task> <constraints> - One self-contained HTML file; vanilla JS only, no libraries. - Round logic must correctly resolve every matchup, including the extended variant if chosen. - The AI must remain beatable; show the result clearly with both choices and an outcome label. </constraints> <format> Return the full HTML as an artifact, then explain how the pattern-biased AI works and how to switch it to pure random. </format>

Builds a playable Rock-Paper-Scissors with streaks and an optional pattern-aware AI as a previewable artifact.

๐Ÿ’ก

Pro tip: Ask Claude for the Lizard-Spock variant if you want more depth; the extra two moves make the matchup table far more interesting.

Frequently Asked Questions

Yes. Each prompt asks Claude to return one self-contained HTML file with inline CSS and vanilla JavaScript, so the game runs in the artifact preview the moment Claude finishes. There are no assets to download, no build step, and nothing to install; you can also copy the file and open it in any browser.
No. Every prompt constrains Claude to vanilla JavaScript with no external libraries and no image or sound files; graphics are drawn with the canvas or CSS, and any sound is synthesized with the Web Audio API. The result is a single file that works offline.
Each prompt uses bracketed inputs for things like grid size, difficulty, theme, and word or question lists. Fill those in before sending, or after Claude responds just ask it to change a value, add a feature like an undo button or a harder mode, or swap in your own word and question data.
The prompts call out the tricky parts explicitly, such as Wordle's duplicate-letter coloring, always-solvable mazes and 15-puzzles, correct Tetris-style rotation, and a true minimax Tic-Tac-Toe that never loses. Spelling out these edge cases in the prompt is what keeps the generated logic faithful.
Most prompts ask for both keyboard and pointer or touch controls and for large tap targets, so games are playable on phones and desktops. If you need a specific control scheme, name it in the inputs and Claude will build to it.
Yes. Because each game is a single HTML file with no dependencies, you can embed it in a page, host it as a standalone file, or hand it out as a freebie. Games like higher-or-lower and quizzes work especially well as branded interactive content when you plug in your own data.

Prompts are the starting line. Tutorials are the finish.

A growing library of 300+ hands-on tutorials on ChatGPT, Claude, Midjourney, and 50+ AI tools. New tutorials added every week.

7-day free trial. Cancel anytime.