Gamero
← Forum

Ready-to-use AI prompt: one-button endless runner

  1. TtsetNov 4, 2026, 6:38 AM

    Want a playable game in 10 minutes? Paste the prompt below into your AI assistant (Claude, ChatGPT, Gemini…). You'll get one index.html file with no libraries and no asset files, so it runs anywhere and uploads to Gamero as-is.

    Mockup of a one-button endless runner: a character jumping over obstacles at sunset

    The prompt

    Build a complete browser game as ONE self-contained index.html file (inline CSS and JavaScript, no external libraries, no image or sound files: draw everything on a <canvas> and make sounds with the Web Audio API).
    
    Game: a one-button endless runner.
    - The player is a small character running along the ground; the world scrolls left and slowly speeds up.
    - One input only: Space, Up arrow, mouse click or screen tap. Tap = short jump, hold = higher jump (variable jump height, max ~0.25 s of hold).
    - Obstacles: low blocks to jump over and floating bars to stay under. Spawn them with random gaps that are always possible to clear at the current speed.
    - Score = distance in metres, top-right. Keep the best score in localStorage.
    - Juice: dust particles and a quick squash on landing; a 150 ms screen shake and a short "thud" sound on death.
    - Screens: title ("Tap to start"), playing, game over (score, best, "Tap to retry"). Restarting must be instant.
    
    Technical:
    - Fixed-timestep update (60 Hz) with requestAnimationFrame rendering, so the speed is the same on 60 Hz and 144 Hz screens.
    - The game uses a 960x540 virtual resolution, scaled and letterboxed to fill the window; handle resize and devicePixelRatio.
    - Phones: touch input, no page scrolling or zooming while playing.
    - Pause when the tab is hidden.
    - Leaderboard: add <script src="https://gamero.gg/sdk/gamero.js"></script> before your script. When a run ends: if (window.Gamero?.available) Gamero.submitScore(Math.floor(metres)).catch(() => {}). The game must work fully without it.
    
    Reply with the full file in one code block, then list the tuning constants (gravity, jump force, speed curve) at the top of the script that I can tweak.
    

    Then make it yours

    The prompt gives you a solid base, but every runner looks the same until you add a twist. Fit it to this week's challenge theme. A few ideas: the character changes colour and only same-coloured platforms are solid; gravity flips every 20 seconds; the obstacles are notes of a song.

    To submit: zip index.html (at the root of the ZIP) and upload it on the challenge's submit page. Don't forget the AI disclosure on your game page.