Build a Timed Math Sprint Game with Difficulty Tiers in One HTML File
A ready-to-paste prompt for a 60-second arithmetic sprint with three tiers, a large touch number pad, streak scoring and a per-operation accuracy report at the end.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
You are a front-end game developer who builds polished, kid-friendly browser games. Build "Brainy Bolt", a 60-second mental math sprint with a storm-and-lightning theme, as one self-contained HTML file. The player picks a tier: Spark (addition and subtraction within 20), Volt (adds times tables to 10) or Thunder (adds division with whole-number answers and bigger numbers). The player then answers as many generated questions as possible before the timer runs out. Rules:
1. Input: a large 3x4 on-screen number pad (digits, backspace, check) sized for thumbs. Also support keyboard digits, Backspace and Enter, and let players pick a tier with 1, 2 or 3.
2. Never produce negative or fractional answers, and never repeat the same question twice in a row.
3. Scoring: tier base points plus a streak bonus capped at 10. A wrong answer resets the streak and briefly shows the correct answer.
4. Show a shrinking timer bar that turns red in the last 10 seconds, with score and streak always visible.
5. End screen: total score, accuracy, best streak, a per-operation accuracy breakdown with colored bars, and a tip naming the weakest operation.
6. Use a dark navy palette with a yellow accent and high contrast. The page must fit 360-1280px and drop the shake animation under prefers-reduced-motion. Add low-volume Web Audio beeps, with the AudioContext created on first input, plus a mute toggle.
Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.Example output
Tips and common edits
Why this works
- Naming exact number ranges per tier, plus the no-negatives and no-fractions rules, keeps the generated questions fair and solvable.
- Requiring both a thumb-sized keypad and keyboard input makes the game playable on phones and desktops without extra prompting.
- Asking for per-operation stats and a weakest-operation tip turns a plain quiz into useful practice feedback.
Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as brainy-bolt.html and open it in any browser, or run it in the chat's preview or canvas panel. Nothing needs to be installed.
Common edits
- Change the 60-second timer to 30 or 90 seconds, or shift the tier number ranges to suit younger kids or adults.
- Retheme the game, for example as a space or ocean sprint, by swapping the name, emoji and accent color in the prompt.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Build a Color Sequence Memory Game with Synth Tones in One HTML File
A ready-to-paste prompt that builds Echo Garden, a four-pad color-and-shape sequence memory game with Web Audio tones, a strict mode and rising speed.
Build a Daily Five-Letter Word Guessing Game with Colorblind Mode in One HTML File
A ready-to-paste prompt that produces Quillmark, an original daily five-letter word game with correct duplicate-letter coloring, an on-screen keyboard and a colorblind mode.
Build a Four-Lane Rhythm Tap Game with a Generated Beat in One HTML File
A ready-to-paste prompt that builds a complete four-lane rhythm tap game with a live Web Audio beat, Perfect/Good/Miss timing grades, combo scoring and a results screen.
Build a Garden Caterpillar Snake Game with Swipe and Wrap Mode in HTML
A prompt that produces Leafline, an original snake-style game where a caterpillar eats garden leaves, with swipe controls, buffered turns, wrap mode and a speed slider.
Build a Gnome-Popping Whack-a-Mole Game With Decoys in One HTML File
A ready-to-paste prompt that makes an AI build Gnome Pop Garden, a fast whack-a-mole style tapping game with speed that ramps up, hedgehog decoys that cost points, and number-key controls.
Build a Match-Three Tile Swapping Puzzle with Cascades and Combo Scoring
Generates a complete single-file match-three puzzle with swap validation, gravity refill, chain-reaction combo scoring and an automatic reshuffle when no moves remain.