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

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

One HTML file. Save it and open it in any browser.Open full screen

Example: Brainy Bolt, a 60-second math sprint with three tiers.

Pick Spark, Volt or Thunder, either by tapping or by pressing 1–3. Then answer as many questions as you can before the bar runs out. Use the big keypad or type digits, and press ✓ or Enter to submit. Each right answer in a row adds streak bonus points, and a miss shows the correct answer. When time is up you get your score, accuracy, best streak and a bar for each operation. Try Thunder to see the division row.

Written by AI from this prompt. Your results will vary.

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 in Simple HTML Games