Spark Skipper
An endless pixel-art sky runner starring Claude Code's little orange mascot: hop and double-jump across floating islands, chain sparks into combos, dodge crawling bugs and glide from day into starry night. Best score and last 10 runs are saved in the browser.
Made in Claude Code (Claude subscription) with claude-opus-5.5. The agent wrote code, looked at the preview and fixed it over several iterations. This is not a single-shot result: comparisons on this site show models in one attempt.
Starting prompt
Build "Spark Skipper": a small, polished endless side-scroller in pixel art, starring the little orange pixel creature from Claude Code's welcome screen. It must be genuinely fun, look alive from the first frame without any input, and run inside a sandboxed iframe. Single self-contained HTML file; draw everything in code (no external images, audio or libraries); a pixel font from Google Fonts is fine for UI text.
The hero:
- A chunky, wide, rectangular creature in terracotta orange (#D97757), about 20 px wide and 13 px tall on the low-res grid, lighter on top, darker underneath, with a dark 1 px outline. It is the star: always vivid, never dimmed or tinted by the day cycle, and large on screen. Two small square black eyes set into the upper half of the body, a little in from each side; a small stubby nub on each side at mid-height, like tiny arms; four short legs underneath in two pairs. (In the terminal it is drawn with block characters as ▐▛███▜▌ / ▝▜█████▛▘ / ▘▘ ▝▝.)
- Lovable and expressive: squash and stretch on take-off and landing, a four-frame leg shuffle while running, blinking, happy ^ ^ eyes and a little bounce when it collects something, dizzy X eyes and circling stars when it fails, nubs that flap like wings while gliding, with speed streaks trailing behind it.
The game (an original design):
- The hero runs on its own across floating grassy islands. One input jumps: tap, click, Space or Up. Holding jumps higher; a second press in the air double-jumps.
- Collect glowing sparks. Sparks taken in quick succession build a combo that multiplies their value (x2, x3… with a draining bar). Sparks sit in rows on the ground, in arcs that trace a real jump over gaps and bugs, and in high clusters that need a double jump.
- Avoid "bugs": small pixel beetles crawling back and forth on the islands (a gentle pun on fixing bugs). Touching one or falling into a gap ends the run.
- Speed, gap widths and bug density ramp up gently. Now and then a bubble holding a little wing floats above an island: it grants a few seconds of gliding, where holding the input slows the fall and the side nubs flap like wings.
- Fair and responsive: coyote time, jump buffering, generous hitboxes for sparks, forgiving ones for bugs, and a generator that never produces an impossible jump.
The world:
- A pixel-art sky with deep parallax, at least seven layers: distant snowy mountains rising from a sea of clouds, horizon clouds, big pale floating isles, drifting cumulus, nearer floating isles with tiny trees and waterfalls, a cloud sea below, the playable islands (grass tops, layered earth, hanging roots, flowers, mushrooms, grass blades in front of the hero) and dark foreground islets that rush past.
- A slow day > sunset > starry night > dawn cycle (about two minutes) that recolours every layer: a setting sun, a rising moon, twinkling stars, fireflies at night, birds and pollen by day.
- Particles: dust puffs while running and landing, a ring on double jumps, sparkle bursts and score popups, confetti for a new best. Screen shake on failure.
Attract mode (required): before the first input an autopilot plays well. It plans each jump by simulating the same physics, times it near the edge, collects sparks and power-ups, and has the odd near-miss. A bobbing title, a pulsing "TAP / SPACE TO PLAY" and the best score sit over it. It must look lively from the very first frame; if the autopilot fails, it restarts on its own.
Screens and interface:
- In game: score, combo and best; a glide timer; a small speaker icon (and the M key) to mute.
- Game over: a card with the score, best, a "NEW BEST!" celebration, games played, total sparks and a table of the last 10 runs (score and date). The same single input restarts; after a while with no input the game returns to attract mode.
- Sound: tiny WebAudio chiptune blips (jump, double jump, spark with rising pitch, power-up, fail, new best), created only after the first user gesture.
Persistence: keep the best score, games played, total sparks, the last 10 runs (score + date) and the mute setting in window.localStorage under one key ("sparkskipper.v1", JSON under 20 KB). Read once at start; write after each run and on a mute toggle. Wrap every access in try/catch with an in-memory fallback, because inside a sandboxed iframe localStorage throws. No cookies or IndexedDB.
The look:
- Render into a low-resolution canvas (about 215 px on the short axis, or about 420 px on the long axis of a tall phone, with an integer number of device pixels per game pixel; slow the run a little when the screen shows less than about 1.8 s ahead) scaled up nearest-neighbour (imageSmoothingEnabled = false, CSS image-rendering: pixelated), so pixels stay crisp at any size and DPR. Fill the whole frame on wide desktops and tall phones by adapting the view; never letterbox.
- One consistent pixel-art style on one pixel grid, text included, with a rich, harmonious palette. No smooth vector or high-resolution elements, no people.
Controls and environment: Space, Up, W, a click or a tap jumps; default key actions are prevented; touches on the canvas never scroll or zoom the page. It runs in <iframe sandbox="allow-scripts">: storage throws, and there is no alert/confirm/prompt, navigation, pointer lock or fullscreen. It works on a phone (390×844) and on desktop.
Engineering rules (the page must work on the first load, with no fixes):
- Drive it by wall-clock time (performance.now) with a fixed 1/120 s simulation step, an accumulator and render interpolation, so the game runs at the same speed at 30, 60 and 120 Hz; clamp long frames.
- Use object pools and pre-rendered sprites; no allocations per frame in the main loop.
- Declare each identifier once; guard every animated value against NaN.
- Answer with the complete file exactly once, in a single ```html code block: no drafts, partial snippets or notes.
Keep planning brief and write the code. Aim for roughly 1,100 to 1,500 lines, well structured.