Skip to content

Endless runner

Endless Runner With Procedural Difficulty Ramp

Tested with Google AI Studio · produced Cyber Dash

The Prompt

Create a complete one-button endless runner in a single self-contained HTML file (inline CSS/JS, no libraries, no external assets).

Core spec:
- The player character auto-runs; a single input (tap / click / spacebar / up arrow) makes it jump. Double jump allowed once per airtime.
- Obstacles spawn off-screen right and scroll left with increasing speed. Mix low obstacles (jump over) and gaps/holes (jump across).
- Score increases with distance; show best score of the session.
- Difficulty curve: speed increases ~8% every 10 seconds, capped at a sane maximum; obstacle density ramps with speed but never creates impossible patterns. Guarantee a fair minimum gap between obstacles.
- Ground collisions use simple AABB checks. One hit = game over overlay with score + restart on tap.
- Visual style: [describe, e.g. "a dark synthwave desert with parallax mountains"].
- Must run at 960x540 internal resolution, responsive and letterboxed; must work with touch on mobile.

After the code, briefly explain your difficulty-ramping rules so a designer could tweak the numbers.

Fixed tuning numbers: 240 px/s base speed, 320px guaranteed minimum gap between obstacles, double jump at 85% of full jump impulse.

What This Prompt Produces

The explicit "never impossible" constraint is what makes this prompt work — it forces the AI to reason about fairness, not just spawning. Cyber Dash was generated this way, and Gemini 3 in Google AI Studio (our current bench as of October 2026) follows the ramp rules even more cleanly.

Modification Tips

  • Numbers like "8% every 10 seconds" are respected well; leaving them out gives you a flat or brutal game.
  • Ask for parallax background layers in a follow-up prompt — it makes the run feel much richer for free.
  • For mobile, follow up with: "Make the tap target the whole lower half of the screen."
  • Pin the physics as fixed numbers like the ones above — Gemini 3 respects exact values, and follow-up tweaks become one-line changes.

The Game This Prompt Produced

Want to try it? Open Google AI Studio, paste the prompt, and you'll have a playable game in minutes. When you're happy with the result, submit it to Daily AI Games.