# Build: No Man's Sky-style exploration slice (Three.js), self-evaluating loop

You are building a small space-exploration demo: fly a ship from space down to a procedurally-generated alien planet, land, walk the surface, scan alien flora, mine a few resources, take off, and visit a second planet that looks COMPLETELY different. Gameplay is intentionally tiny — the point is the procgen variety, the atmosphere, and the landing moment. Work in an autonomous loop: build → screenshot → judge against the rubric → fix the lowest → repeat. Do not stop until the stopping condition fires.

Original IP — name the game AND procedurally name the planets/flora (NMS-style generated names like "Yemurra-Tau" / "Bladderwort Helix" are half the charm).

## Stack and rules
- Vite + latest three from npm. Modules: ship.js, planet.js, surface.js, flora.js, scanner.js, space.js, post.js, main.js.
- No downloaded models or textures. Everything procedural: seed-driven noise terrain, canvas-generated maps where needed, kit-bashed flora from primitives, shader atmospheres.
- Target 60fps mid-range GPU. Optimize before deleting the look.
- Keep PROGRESS.md with rubric scores per iteration. Commit every iteration — any pause must ship a working build.
- Expose window.__game = { phase, mode (space|entry|surface), planet, units, scans, resources, land(), takeoff(), teleportPlanet(i) } kept live.

## The demo (do not expand this scope)
- **Space mode**: cockpit-view ship flight — mouse steers (pitch/yaw), W thrust, hold SHIFT for boost with speed-line VFX. A small star system: sun, starfield, 2-3 planets as spheres with shader atmosphere rims, each visibly different from orbit (palette, cloud bands, ring on one if you like).
- **Landing**: fly toward a planet; inside an approach threshold show "press E to land" → atmospheric-entry sequence (heat shimmer/speed lines/rumble, sky color blending in) → touch down on terrain near the ship. Does NOT need true seamless streaming — it needs to READ as descending onto the planet. A planet-name banner slides in on arrival ("WELCOME TO <procgen name> — <procgen biome tag>").
- **Surface mode**: exit ship (E), first-person WASD walk on noise-heightfield terrain with the ship parked behind you. Low gravity jump. The surface must sell ALIEN: procgen flora kit-bashed from primitives (tube-trees, balloon plants, coral fans, crystal clusters — 4-6 archetypes whose proportions/colors derive from the planet seed), scattered mineable crystals, drifting spore particles, the system's other planets visible in the sky.
- **Scanner**: hold/tap C → pulse wave expands, nearby flora/minerals get highlight outlines + nameplates with procgen names; each first-scan awards units and logs to a discoveries tally.
- **Mining**: hold LMB → mining beam (glowing line + impact sparks) on crystals → they shatter satisfyingly → resource counter ticks up.
- **The goal arc (tiny)**: "REPAIR DRIVE: scan 5 species · mine 40 crystallite" → doing both = drive repaired → take off (E in ship) → land on the SECOND planet → arrival banner → win screen: "SYSTEM CHARTED" with stats (planets visited, species scanned, units earned).
- HUD: NMS-flavored minimal — mode indicator, resource/units counters, goal checklist, scanner hint. Clean sci-fi font, hexagon-ish accents fine.

## The look (this is the actual goal)
Stylized-vivid — the No Man's Sky neighborhood: saturated alien palettes, atmospheric haze, big skies. Clean shapes fine; flat lifeless rendering is not.
- Each planet gets ONE cohesive seed-derived palette (e.g. coral-pink grass / teal sky / purple flora vs. ochre desert / green sky / black crystal) — the two landed planets must look like different WORLDS in a side-by-side screenshot.
- Lighting: strong directional sun + sky-tinted ambient; warm/cool contrast; emissive crystals; rim-light atmosphere shells on planets seen from space.
- Post: ACES tonemap, bloom for emissives + sun, light fog/haze that tints with the planet palette, vignette + subtle grain.
- Surface depth: distance haze eating the horizon, parallax hills, drifting particles — the vista shot must feel DEEP.

## Self-evaluation loop
Each iteration: build, serve, playwright-screenshot fixed vantages — (1) space view with a planet + atmosphere rim, (2) atmospheric entry moment, (3) surface vista with flora + parked ship, (4) scanner pulse with nameplates, (5) second planet surface for contrast. READ the screenshots and score 1-10: space view / landing moment / surface vista depth / flora alienness + variety / cross-planet contrast. Log scores in PROGRESS.md, fix the lowest first. Score honestly — a shot that wouldn't make a stranger say "whoa" is a 6, not an 8.

## Stopping condition
All five rubric items 8+ on fresh screenshots AND build green AND 60fps budget — or the 55-turn hard cap, whichever fires first. At the cap, ship the best green build with final scores logged.

## Out of scope (do not build)
Combat, fauna/creature AI (one passive drifting jellyfish-thing is allowed as a stretch flourish), inventory/crafting beyond the two counters, base building, space stations, warp/hyperspace to other systems, multiplayer, save system.
