Build a One-Button Fox Endless Runner Game in a Single HTML File

A ready-to-paste prompt that produces Ember Fox Dash, a polished one-button forest runner with coyote-time jumps, fair obstacle spacing, rising speed and synthesized sound.

You getone complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior front-end developer who builds polished browser games.

Build Ember Fox Dash, an original one-button endless runner: a fox sprints through an autumn forest at dusk, leaping logs, toadstools, stumps and narrow creeks while grabbing acorns.

1. Controls: Space, Up Arrow, click or tap to jump; hold for a higher leap, release early to cut it short. Add 100 ms coyote time and a 130 ms jump buffer. M mutes, P pauses.
2. Speed rises steadily to a cap. Keep spacing fair: every gap exceeds one full jump at current speed, double obstacles only appear later, hitboxes are slightly forgiving.
3. Score distance plus 10 per acorn, keep a session best in memory, and draw Ready, Paused and Game Over panels on the canvas.
4. Canvas art only: dusk sky, parallax hills and pines, leafy ground, in plum, ember orange and cream. Scale cleanly from 360 to 1280 px wide.
5. Under prefers-reduced-motion, freeze background layers and drop screen shake and particles; keep strong contrast and announce events in a live region.
6. Synthesize jump, pickup, landing and crash sounds with Web Audio on first input, at low volume, with a visible mute button.

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: Ember Fox Dash, a one-button forest runner at dusk.

Press Space, Up Arrow, click or tap to start, then jump over logs, toadstools, stumps and creeks. Hold for a high leap, tap for a short hop. Grab glowing acorns for +10. The pace climbs every second; watch the Pace meter. Try jumping just after the creek edge to feel the coyote time. P pauses, M or the button mutes.

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

Tips and common edits

Why this works

  • Coyote time, a jump buffer and variable jump height are named with exact values, so controls feel responsive instead of random.
  • Tying the minimum obstacle gap to jump airtime at current speed guarantees every pattern is clearable, even at top pace.
  • Reduced-motion, audio-on-first-input and mute rules are spelled out, so the file passes accessibility and browser autoplay rules first time.

Paste into ChatGPT, Claude or Gemini. Save the returned code as ember-fox-dash.html and open it in any browser, or run it in the chat's preview or canvas panel. No installs or internet needed.

Common edits

  • Swap the theme: make it a penguin on ice floes or a robot in a neon city by changing the names, palette and obstacle shapes.
  • Tune difficulty by changing the starting speed, the speed ramp per second, or the chance of creeks and double logs.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Simple HTML Games