Skip to content

Platformer (jumping)

Vertical Platformer With Tuned Jump Physics

Tested with Claude · produced Pixel Jump

The Prompt

Create a single-file HTML5 vertical platformer (doodle-jump style) with physics that feel genuinely good. All code inline, no assets, no libraries.

Physics spec (tune around these):
- Internal resolution 960x540, letterboxed, 60fps with delta-time.
- Gravity, jump impulse and terminal velocity tuned so a full jump takes roughly 0.6-0.75 seconds and clears ~1.6 platform heights. Expose gravity and jump strength as named constants at the top of the script so they are easy to tweak.
- The player auto-bounces when landing on a platform; horizontal control via arrow keys AND touch (hold left/right half of the screen).
- Coyote time (jump allowed ~90ms after leaving a ledge) and buffered jumps (~120ms) are REQUIRED — implement them explicitly.
- Camera scrolls up as the player climbs; falling below the bottom of the screen = game over, with instant restart.
- Platforms: static, moving and fragile (break after one bounce) mixed; spawn density constant; score = height climbed.
- Player wrap-around horizontally when leaving one side (classic doodle rule).
- Game feel: squash-and-stretch on bounce, dust particles, platform fade-in from above.

After the code, print the physics constants block and explain in two sentences how to make the jump floatier vs snappier.

Fixed tuning numbers to start from: gravity 2400 px/s², jump impulse 800 px/s, terminal velocity 1000 px/s.

What This Prompt Produces

Naming the physics constants and demanding coyote time is what separates a real platformer from a tech demo. Pixel Jump was generated from this prompt — re-tested on Claude Opus 5.5 (October 2026), which nailed the constants on the first try as a playable artifact in the chat preview.

Modification Tips

  • If the jump feels floaty, tell the AI the exact numbers: "Increase gravity by 25%, increase jump impulse by 15%."
  • Follow up with: "Add a one-way moving platform that tests the buffered jump" to verify feel under pressure.
  • For kids-friendly versions, ask for slower scroll and denser platforms in one line.
  • If you restructure the prompt, XML-tag the sections (<physics>, <rules>, <feel>) — the structure Anthropic officially recommends for Claude prompts.

The Game This Prompt Produced

Want to try it? Open Claude, 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.