PIXEL RUN is a fast-paced, browser-based endless runner and 2D platformer built with TypeScript, React, Vite, and HTML5 Canvas.
- Play in your browser: https://pixelrun.localplayer.dev/
- Legacy GitHub Pages URL: https://jimm144.github.io/pixel-run/
- Play on itch.io: https://jimm144.itch.io/pixel-run
The player runs automatically across procedural terrain. Jump, double jump, boost, and dive-slam through four distinct biomes: Neon Jungle, Scorched Desert, Frozen Tundra, and Neon City.
- Enemy Interactions: Stomp ground enemies from above or outmaneuver airborne flyers.
- Dive-Slam: Perform mid-air downward slams to crush rooted hazards and break ground traps.
- Score Multiplier & Combos: Chaining stomps, coins, gems, and power-up pickups builds a multiplier up to x10.
- Power-Ups:
- Shield: Absorbs one fatal hit or hazard.
- Jump Shoes: Supercharges jump height.
- Triple Jump: Grants a third mid-air leap.
- Propeller Hat: Provides extended floatation and air stall.
- Local Persistence: High scores, run statistics, volumes, and daily quest progression are saved automatically in
localStorage.
The sky dynamically transitions across a continuous day/night curve with celestial movements and subtle foreground ambient lighting:
- Daytime: The sun illuminates the landscape with biome-tailored atmospheric halos.
- Nighttime: Sky darkens into midnight gradients, stars twinkle in the upper atmosphere, and the moon rises.
- 5 Progressive Moon Phases:
- Full Moon (100% illuminated)
- Waning Gibbous (~75% illuminated)
- Half Moon (50% illuminated)
- Waning Crescent (~25% illuminated)
- Blood Eclipse: A cosmic crimson eclipse with fiery corona flares and deep eclipsed shadow.
Four procedurally generated biomes alternate with smooth crossfading transitions:
- Neon Jungle: Dense rainforest banyan canopies, palms, spore mushrooms, and tropical frogs.
- Scorched Desert: Saguaro cacti, desert ruins, ancient pyramids, and skittering scarabs.
- Frozen Tundra: Snow-capped pines, alpine firs, ice crystals, and frosty drones.
- Neon City: Cyberpunk skyscrapers, glowing interior window grids, and drone flyers.
- Jump:
SPACE,W,UP,Z, orK(Press twice for Double Jump, hold for higher leaps) - Dive-Slam:
S,DOWN, orJ(Mid-air slam) - Boost:
DorRIGHT - Pause:
PorESC
- Tap: Jump / Double Jump
- Hold: Higher Jump
- DIVE Button: Dive-Slam
- Pause Button: Pause / Resume
Four daily quests generate automatically based on the local calendar date:
- Tiers: Easy (40%), Medium (34%), Hard (20%), Special (5%), Impossible (1%)
- Objectives: Distance goals, score thresholds, combo milestones, power-up collections, enemy stomps, clean runs (zero kills/pickups), and eclipse survivals.
- Pure Canvas Rendering: 100% procedural pixel art drawn on a single HTML5 canvas with zero image assets.
- Web Audio API Synth: 4-channel chiptune synthesizer generating melodies, basslines, drums, and SFX in real time.
- Fast Single-File Load: One self-contained HTML build (~530 kB, ~147 kB gzipped). Multiplayer libraries (MQTT + PeerJS, ~180 kB) are fetched from a CDN only when a room is actually created/joined — multiplayer needs a network anyway, and the solo game stays fully offline.
-
High-Performance Game Loop:
- Pre-parsed
$O(1)$ integer RGB color caching (HEX_CACHE). -
$O(N)$ in-place linear two-pointer entity compaction. - Deterministic offscreen platform caching.
- Batched particle state updates and star matrix transforms.
- Pre-parsed
Requires Node.js.
npm install
npm run devnpm run buildGenerates a single self-contained dist/index.html file using vite-plugin-singlefile.
GPL-3.0. See LICENSE.