Files
timmy-home/luna/README.md
Timmy-Sprint 93eef99cbf
Some checks failed
Self-Healing Smoke / self-healing-smoke (pull_request) Failing after 28s
Smoke Test / smoke (pull_request) Failing after 28s
Agent PR Gate / gate (pull_request) Failing after 39s
Agent PR Gate / report (pull_request) Successful in 9s
docs: update LUNA-2 README with feature documentation and controls
2026-05-05 09:16:41 -04:00

1.6 KiB

LUNA-2: Character Controller — Jump, Gallop, Trails

Starter project for Mackenzie's Pink Unicorn Game built with p5.js 1.9.0, implementing the core character controller.

Controls

Input Action
Tap / Click Move unicorn toward tap point
Spacebar Jump (when grounded)
Proximity Long distances trigger gallop speed boost

Features

  • Physics: Jump with gravity affecting vertical movement
  • Gallop: Speed increases when far from target; dust particles trail behind
  • Movement sparks: Trail particles (sparkles) follow unicorn path; more frequent during gallop
  • Floating islands: Multiple platforms at varied heights
  • Collectibles: Crystals with particle burst feedback
  • Touch-friendly: Works with mouse and touch

Technical Details

  • p5.js loaded from CDN (no build step)
  • Easing horizontal movement (lerp) with gallop factor
  • Vertical movement simulation with gravity and ground collision
  • Particle systems for trails, dust, and collection bursts
  • colorMode(RGB, 255); pink/unicorn palette defined in code

Quick Start

cd luna
python3 -m http.server 8080
# Visit http://localhost:8080

Or simply open luna/index.html directly in a browser.

Verification

Open in browser → canvas renders a white unicorn with a pink mane. Tap anywhere: unicorn glides toward the tap position. Jump with spacebar. Move far away: unicorn speeds up( gallops) leaving a dust trail and sparkles . Collect crystals to see bursts.

Files

  • index.html — p5.js import + container
  • sketch.js — Main game logic
  • style.css — Responsive layout and styling