All MicroEvals
<role> You are a Senior Creative Technologist, Game Designer...
Create MicroEval

<role> You are a Senior Creative Technologist, Game Designer...

Prompt

<role> You are a Senior Creative Technologist, Game Designer, and Frontend Graphics Engineer expert in p5.js, generative art, and browser simulation. Build a finished game, not a demo. Make sound decisions; plan/validate internally without revealing private chain-of-thought. </role> <mission> Build **NEBULA RUN**, a complete endless pseudo-3D sci-fi flight game in one p5.js HTML. A spacecraft flies through an alien plasma storm. Pointer velocity (mouse/finger/stylus) drives actual physics, progression, danger, rewards, and audiovisuals. Deliver polished, playable gameplay. </mission> <priorities> Prioritize real gameplay, coherent identity, responsiveness, correct simulation/collisions, performance, desktop/mobile parity, and polish. Never replace mechanics with decoration. </priorities> <fixed_decisions> Fixed choices: pseudo-3D (x,y,z), perspective and far-plane spawns; screen-space ship, projected entities; bounded velocity-based whiplash camera easing to neutral (no position-follow); shared transforms for rendering/collisions/forces; swept hazard collision and forgiving pickup depth window; seeded safe lane anchored to spawn distance; states START/PLAYING/PAUSED/GAME_OVER with OVERDRIVE inside PLAYING; Pointer Events (release decays, never pauses); one inline CSS/JS HTML, p5 CDN allowed. </fixed_decisions> \<1\_input\_velocity\> Pointer Events unify mouse/touch/stylus. Track one pointer, capture when suitable, ignore extras, handle down/move/up/cancel, leave/re-entry, blur, visibility, resize; use getCoalescedEvents() if supported. Use high-resolution timestamped samples: displacement/elapsed time -\> instantaneous velocity -\> rolling path-length/time speed -\> smoothing -\> normalization. Do not rely on frame distance or first-to-last displacement: accumulated path length preserves speed through reversals. Track direction separately via smoothed displacement and optionally turn rate. Use time-aware exponential smoothing (fast attack, smooth release), natural decay, clamping, and no re-entry spikes. Reset on down/re-entry. Normalize by viewport diagonal (initial \~1.6x; calibrate mobile). Bands: CALM \<.10; CRUISE .10–.38; FAST .38–.72; EXTREME \>.72. Smoothed speed drives ship acceleration, travel speed, trails, particles/density, star streaks, plasma stretch, hazard frequency/aggression, anomaly intensity, camera, distortion, score, OVERDRIVE, and audio. Direction drives target movement, banking, and directional effects. Turn rate may add instability but is not the core speed signal. \</1\_input\_velocity\> \<2\_ship\_camera\> Draw a procedural rear-view delta craft: dark metallic hull/wings, cockpit glow, cyan/teal engines/plume, optional shield, tapering plasma trail. No external art. Map pointer to clamped screen target. Spring/damper inertia; never teleport. Speed increases acceleration/controlled overshoot; cap velocity, damp edge bounce, allow bounded wind/gravity. Near-critical damping at calm, lower at extreme (\~.55); STABILIZER restores it. Bank laterally; subtle pitch vertically. Camera reacts to ship velocity, not position; bound offset (\~±24 world units), ease to neutral, respond faster at intensity. Keep ship screen-anchored; align transforms for projection/collisions. Subtle world roll (\~.03 rad max); preserve pointer precision. \</2\_ship\_camera\> \<3\_pseudo3d\> Perspective: screenX=centerX+(worldX-cameraX)\*focal/depth (same for Y); focal scales to viewport. Spawn far away and advance toward player; apparent size grows as depth decreases. Guard near/zero depth; cull behind/offscreen objects; bound storage; use delta time. Render and collision coordinates must match. \</3\_pseudo3d\> \<4\_world\_generation\> Use seeded PRNG (mulberry32/LCG) and lazy endless biome segments with palette, length, spawn weights, fog, wind, particle/cloud density, audio, difficulty. Crossfade smoothly. Biomes: CALM PLASMA FIELD (open, sparse, recovery); DENSE PARTICLE STORM (directional dust, low visibility, crosswind); GRAVITY ANOMALY (lensing, bounded pull, lethal core); ASTEROID CORRIDOR (moving rocks, shards, mines, gaps); ENERGY VEIN (ribbons/fragments); CHAOTIC OVERDRIVE ZONE (rare, progression-gated, intense). Create a smooth seeded safe lane (layered sine/noise over distance). Anchor entity lane coordinates to spawn distance so objects and guide align. Use it for hazard placement and energy veins. Narrow safety margin with difficulty but preserve a navigable route. Spawn by distance, then apply bounded biome/difficulty/speed/OVERDRIVE modifiers. Keep density fair at different speeds while high speed adds danger. Initial target \~1.2–3 hazards/sec at representative speed. Avoid unavoidable clusters, preserve reaction time, skip invalid spawns; place fragments near or off-lane. Plasma storms are warned distance events with ramp/peak/fade; affect fog, visibility, particles, crosswind, energy drain, wall frequency, and audio. \</4\_world\_generation\> \<5\_entities\> Implement interactive hazards: ASTEROIDS (rotating/drifting); SHARDS (small/fast); MINES (pulsing, mild bounded homing); GATES/PLASMA WALLS (wide barriers with gap); GRAVITY CORES (dangerous anomaly centers). Use linear, sinusoidal, rotating, or limited homing motion. Walls span the play area around a visible vertical/horizontal slit. Gap drifts, narrows with difficulty, and collision exactly matches its rendering. Use turbulent streaks, bright edges, depth-dependent intensity. Anomalies have dark core, accretion rim, rotating arcs/spirals, lensing rings, and bent nearby stars/particles. Pull ship toward projected position with bounded falloff (no inverse-square singularity). Core collision damages/pushes back. Distinct fragments restore energy, add score/combo, spawn flare/particles/shockwave and optional sound, then recycle. Rare timed powerups with unique visuals/activation/expiry: SHIELD (limited damage absorption), MAGNET (attract fragments), SURGE (\~2x score), STABILIZER (damp overshoot; optionally reduce hazards). \</5\_entities\> \<6\_collision\_and\_economy\> Swept hazard collision: save previous depth, update, detect player-plane crossing, calculate fraction, interpolate entity (and ship where practical), project through shared camera, test screen-space shape/distance. This reduces tunneling, but is not infallible. Prevent repeat damage; reward each near-miss once. Pickups use forgiving depth window + projected distance; near-miss radius exceeds collision radius. Energy: speed drains, OVERDRIVE drains more, calm slowly regenerates, fragments restore (\~5 units initial), hazards damage by type, shield absorbs, zero ends game. Centralize values. Unshielded hit damages, drops combo, exits OVERDRIVE, grants brief invulnerability, and triggers impact/debris/camera/audio. Score = distance × multiplier from speed/combo/OVERDRIVE/SURGE. Pickups/near-misses build combo; it decays without rewards and drops on hit. Track score/best/distance/time/max speed/max combo/near-misses/OVERDRIVE time; format distance e.g. 12.84 KM. Guard localStorage. Difficulty increases gradually with distance/time; affects hazard density/motion, gap width, environment. Gentle target: \~2.6x after \~80 sec. \</6\_collision\_and\_economy\> \<7\_overdrive\> Charge through sustained EXTREME movement; activate at threshold, sustain while fast, drain faster when speed falls, exit smoothly with brief persistence (\~11 sec sustained motion as tuning reference). OVERDRIVE increases travel speed, scoring, energy drain, hazard pressure, plasma instability, particle density, trail length/brightness, camera response, distortion, and audio. Transform the whole environment, not just HUD. Signal enter/exit; damage cancels it. \</7\_overdrive\> \<8\_visual\_direction\> Art: deep-space darkness, atmospheric depth, cyan/teal/turquoise/violet with restrained magenta; soft plasma clouds, parallax stars, glowing dust, directional particles, plasma streams, ribbons, lensing, ship trails, impacts, shockwaves. Avoid generic neon clutter; each effect conveys speed, energy, danger, depth, or action. Increasing speed lengthens/brightens trails, directs star streaks, accelerates particles, stretches plasma, intensifies camera/world motion and distortion. All react to gameplay values. Pre-render/cache clouds, glows, rings, stars at init; use a few hues (cyan/teal/magenta/amber) and additive blending. Avoid per-frame cloud noise, repeated tint regeneration, full-canvas pixel loops/get/loadPixels. Fake lensing by displacing selected objects/particles and drawing rings/arcs. Optional low-res zoom-feedback affects world only, at high speed/adequate FPS; prevent accumulation, resize safely, disable when slow. Render order: background, feedback, clouds/fog, stars, vein, anomalies, hazards, items, particles, ship trail/ship, streaks, capture world excluding HUD, glitches/overlays, vignette/damage, HUD. Restore canvas state. Use time easing, camera inertia, purposeful shake, impact/near-miss/pickup/powerup/biome feedback, and brief key-event time dilation. \</8\_visual\_direction\> \<9\_ui\> HUD: SPEED, ENERGY, SCORE, COMBO, DISTANCE, OVERDRIVE, biome/warnings. Layout: score/distance upper-left, combo upper-right, energy lower-left, speed lower-right, OVERDRIVE bottom, biome banner top. Readable system sans/monospace, contrast, responsive/safe areas; never obscure hazards. SPEED = filtered pointer speed. START: animated title/subtitle; 3 tutorial cues (slow=safe, fast=risk/reward, extreme=OVERDRIVE); live gauge, ENGAGE, best score, mute. Show calm living world; no hazards, drain, normal scoring. PAUSED: explicit RESUME. GAME\_OVER: SIGNAL LOST sequence (debris, shockwave, brief slowmo); final score/best/distance/max speed/combo/near-misses/OVERDRIVE time; RE-ENGAGE. Canvas UI with hit-testing and pressed/hover feedback. Touch targets \>=48 CSS px; keyboard optional. \</9\_ui\> \<10\_states\_lifecycle\> States: START, PLAYING, PAUSED, GAME\_OVER; OVERDRIVE nested in PLAYING. START demonstrates pointer control/live speed with hazards/scoring/drain disabled. PLAYING runs full simulation. PAUSED freezes gameplay. GAME\_OVER stops normal spawning but permits brief residual effects. Pause on visibilitychange/window blur, never on pointerup/release. Explicit action resumes. Restart without reload; reset input, world/run state, pools, timers, effects, ship/camera, energy/score/combo, powerups, OVERDRIVE. \</10\_states\_lifecycle\> \<11\_audio\> Native Web Audio only; optional and never blocks play. Start/resume AudioContext after user gesture; include mute. Use master gain/optional compressor, ambient drone, speed-reactive engine/filter, biome ambience, and pickup/hit/near-miss/powerup/OVERDRIVE/game-over cues. Calm subtle; high speed stronger; OVERDRIVE intense. Use gain ramps, throttle updates (\~20 Hz), clean finished nodes, cap nodes; handle blocked/suspended/unsupported audio. \</11\_audio\> \<12\_mobile\> Mobile first-class: same one-finger control; portrait/landscape; responsive canvas/HUD; resize/orientation/safe areas; \>=48px buttons; no keyboard. Set touch-action:none and prevent scrolling only on game surface. Optional ship-above-finger offset/link must not affect measured velocity. Adapt pixel density/quality. \</12\_mobile\> \<13\_performance\> All physics/timers/spawning/scoring/collisions use delta time; clamp large dt; swept collisions. Avoid loop allocations. Pool/recycle particles, hazards, items, powerups, rings, popups, effects; hard-cap collections. Initial ceilings (adapt): 600–700 particles desktop / 250–300 mobile; \~220 stars; \<=70 hazards; \<=50 items; \<=22 clouds; \<=3 anomalies. Quality manager: smoothed FPS + hysteresis; lower tier after sustained drops, recover after sustained improvement. Start mobile conservatively. Reduce visual cost before gameplay/collision fidelity. Tiers adjust particle/cloud/glow/blur/pixel-density/distortion; change density rarely and recreate buffers safely. Cache assets; avoid frame noise, rebuilt arrays, unnecessary sorting, pixel reads/writes, per-frame audio nodes, unbounded feedback/entities. \</13\_performance\> \<14\_implementation\> Single inline CSS/JS HTML; no separate files/build/unneeded dependencies; p5 CDN. Modules: config/PRNG; init/resize; input/velocity; player/camera/projection; world/biomes/lane/spawning; hazards/items/anomalies; collision/near-miss; economy/OVERDRIVE; particles/render; HUD/states; audio/quality; main loop. Descriptive functions, central tuning, explicit state, comments for non-obvious math. Avoid giant draw() and overengineering. \</14\_implementation\> \<15\_execution\_evaluation\> Build in order: HTML/resize; input/velocity; ship/camera; pseudo-3D; biomes/lane; pools/entities; collisions/economy; OVERDRIVE; visuals/UI/states; audio/quality; integration review. Resolve dependencies; retain fixed decisions. Few-shot behavior examples: - Barely moving -\> calm ship, short trail, sparse particles/hazards, quiet ambience, possible energy recovery. - Sustained quick movement -\> acceleration, faster world, directional trails, greater danger/score potential, stronger engine. - Sustained extreme movement -\> charge then OVERDRIVE, major world transition, denser hazards, drain/distortion, greater rewards. - Rapid reversals -\> path-length speed remains meaningful while direction changes separately; controlled inertia, no false zero. Examples describe behavior, not hardcoded values. Review idle through extreme speed; stops/turns/release/cancel/leave/re-entry; mouse/touch/stylus; orientations/resizing; low FPS/high particles; swept crossing/gap edges/pickup depth/anomaly core; long sessions; pause/resume/restart; unavailable storage/audio. Acceptance: full state/restart loop; timestamped speed drives simulation; speed bands distinct; projection/camera/render/collision align; fair readable hazards; coherent risk/reward; smooth biomes; one-finger mobile; bounded resources/graceful quality; no decorative-only/TODO features. Never claim browser tests/profiling/execution unless performed. Without browser tools, perform static review and make no unsupported claims. Do not omit difficult features silently; implement robust working behavior. \</15\_execution\_evaluation\> <deliverable> Return complete runnable HTML (`<!DOCTYPE html>` through `</html>`), all CSS/JS inline, p5 CDN. Output code only. No pseudocode/placeholders/TODOs/omitted systems/separate files/unfinished instructions. Prefer integrated function over effects. Multiple blocks, if needed, must concatenate exactly. </deliverable> <final_goal> Make pointer speed visibly and mechanically change the ship, world, danger, and rewards. Deliver a distinctive, coherent sci-fi arcade game. </final_goal>

A system prompt was added to support web rendering

Drag to resize
Drag to resize
Drag to resize
Drag to resize
Drag to resize