Step 16.9: plan amendments and regression
CI / check (push) Successful in 6m22s
Details
CI / check (push) Successful in 6m22s
Details
Applies CR-016's amendments to the implementation plan (eight locations, the deferred list, content, map art, goods, fuel and balance notes) and documents the belt and label planning. Phase 16 is complete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fb529a1ba4
commit
55c5e3c2c7
|
|
@ -1546,3 +1546,7 @@ Implementation decisions not spelled out in `memory-bank/implementation-plan.md`
|
|||
- **Io and Europa's angles** (100° and −160° from the outward direction) keep them off Jupiter's platform badge (screen −45°) and 100° apart, so their 18 px sprites never touch at the largest sprite scale.
|
||||
- **Haze strip 2048 × 256, repeated 8 times around the ring**: the 1024 × 64 strip wrapped once made specks into dashes when zoomed in on the belt.
|
||||
- **On a phone the Jupiter family's 64 px ring is large next to the zoomed-out map** and sits near Ceres; it stays legible, and is flagged for the user's review.
|
||||
|
||||
## Step 16.9
|
||||
|
||||
- **The game design document is the designer's** (CR-016 §11): its destinations table and map description are left for them to update.
|
||||
|
|
|
|||
|
|
@ -114,11 +114,12 @@ Vite + React 19 + Tailwind 4, React Router 8 (declarative routes). The game runs
|
|||
| `src/App.tsx` | Clock sync; loading / start screen / routed layout |
|
||||
| `src/layout/Layout.tsx` | Header (credits, game clock), screen outlet, bottom tab bar |
|
||||
| `src/routes.ts` | Screen list shared by router and navigation |
|
||||
| `src/map/art/manifest.json` | Map art manifest (CR-003): asset id → `{ kind, file }` in `public/assets/map/` (never edited); `null` file = missing, placeholder used |
|
||||
| `scripts/map-art.mjs` | Generates `public/assets/map-gen/` (`<id>@1x.png`, `<id>@2x.png`, `bg.webp`) from the manifest with sharp; output committed |
|
||||
| `src/map/art/manifest.json` | Map art manifest (CR-003): asset id → `{ kind, file }` in `public/assets/map/` (never edited); `null` file = missing, placeholder used | Kinds since CR-016: `rocks` (a sheet sliced into `pieces` sprites, `belt-rocks-<n>`) and `strip` (`belt-haze`).
|
||||
| `scripts/map-art.mjs` | Generates `public/assets/map-gen/` (`<id>@1x.png`, `<id>@2x.png`, `bg.webp`) from the manifest with sharp; output committed | `scripts/slice.mjs` (CR-016) cuts a sheet into one sprite per connected region (alpha ≥ 16).
|
||||
| `src/map/style.ts` | Map presentation config (CR-003): sprite sizes, zoom scale limits, child-body offsets, badges, tap size, parallax, colors; validated by `mapStyleSchema` |
|
||||
| `src/map/art/load.ts`, `art/visuals.ts` | Load the generated art as one PixiJS bundle (2x at DPR ≥ 2); texture-or-placeholder per scene item (decision 0.5.41) |
|
||||
| `src/map/layout.ts` | Pure screen layout: `backgroundRect`, `spriteScale`, `childOffset`, `layoutScene` (centres, sizes, tap targets; used by renderer and hit test), `decorate` (label and badge placement) |
|
||||
| `src/map/layout.ts` | Pure screen layout: `backgroundRect`, `spriteScale`, `childOffset`, `layoutScene` (centres, sizes, tap targets; used by renderer and hit test), `decorate` (label and badge placement) | CR-016: `labelBox`, `planLabels` (folds a crowded parent/child family into the parent's label with a "+N" marker; the Jupiter system below zoom 2.5) and `markerAt`.
|
||||
| `src/map/belt.ts` | The asteroid belt (CR-016, visual only): radii on the compressed scale, `ringGeometry` (the haze mesh, built once in map units), `hazeStripPixels`/`hazeSource` (generated haze unless `belt-haze.png` exists), `beltRocks` (220 seeded rocks) and `placeRocks` (screen placement, clear of Ceres) |
|
||||
| `src/map/overlays.ts` | Per-location state overlays (lock, desaturate/dim, HQ marker, idle badge), applied by the renderer |
|
||||
| `src/map/ticker.ts` | `runWhileVisible`: pause the map's ticker while the page is hidden; stop it on unmount |
|
||||
| `src/map/renderer.ts` | `MapRenderer`: all PixiJS drawing for the map, layer by layer; `MapCanvas` owns the app, input and loading state |
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ This plan covers the **base game only**: the core loop of taking contracts, disp
|
|||
|
||||
| Area | In base game |
|
||||
|---|---|
|
||||
| Locations | Earth, Moon, Mars, Ceres Station (belt), Jupiter Cloud Platform |
|
||||
| Locations | Earth, Moon, Mars, Ceres Station (belt), Jupiter Cloud Platform, Venus Cloud City, Io Sulfur Works, Europa Ice Station *(CR-016 added the last three)* |
|
||||
| Landing classes | Vacuum, Atmospheric (Hardened is deferred) |
|
||||
| Ships | 5 models: Courier, Lighter, Clipper, Freighter, Bulk Hauler *(CR-012 added the Lighter and Clipper; it was 3 archetypes)* |
|
||||
| Cargo types | Standard, Heavy, High-Value, Dangerous |
|
||||
|
|
@ -36,7 +36,7 @@ This plan covers the **base game only**: the core loop of taking contracts, disp
|
|||
|
||||
### 0.3 Explicitly deferred (do NOT build)
|
||||
|
||||
Random events, reputation, fuel price drift and depot shortages *(CR-015: fixed per-location prices are in, decision 0.5.96)*, fuel storage at HQ bays, throttle setting, multi-leg routes, recurring bay rent, pilot salaries over time, pilot poaching, automation/standing routes, interstellar, push notifications, Capacitor builds, Hardened landing class, Venus/Io, Fragile/Urgent/Fuel-efficiency skills, social features, monetization, account linking (email, Apple, Google sign-in) *(CR-011)*.
|
||||
Random events, reputation, fuel price drift and depot shortages *(CR-015: fixed per-location prices are in, decision 0.5.96)*, fuel storage at HQ bays, throttle setting, multi-leg routes, recurring bay rent, pilot salaries over time, pilot poaching, automation/standing routes, interstellar, push notifications, Capacitor builds, Hardened landing class, surface Io and Venus's surface *(CR-016 added Venus Cloud City and Io Sulfur Works, which need no Hardened ships)*, asteroid-belt hazards, mining claims and belt events *(CR-016's belt is visual only)*, Fragile/Urgent/Fuel-efficiency skills, social features, monetization, account linking (email, Apple, Google sign-in) *(CR-011)*.
|
||||
|
||||
### 0.4 Glossary
|
||||
|
||||
|
|
@ -231,6 +231,7 @@ The game has had no server since CR-014. When a later or unfinished change reque
|
|||
- **Amended by CR-007:** `produces`/`demands` list good ids (derived from the goods catalog); the old class lists are kept as `cargoClassMix`, and each location has `shippers` (Step 10G.1).
|
||||
|
||||
- **Amended by CR-015:** Locations sit at fixed positions (Earth 150M km/210°, Mars 228/270°, Ceres 414/285°, Jupiter 778/300°; the Moon 0.384M km out from Earth) and sell fuel at fixed prices, cheapest at Jupiter, dearest at Earth (Steps 15.1, 15.3).
|
||||
- **Amended by CR-016:** Eight locations: Venus Cloud City (108M km/110°), Io Sulfur Works and Europa Ice Station (0.42M and 0.67M km out from Jupiter) join, all undiscovered; the location-count test expects eight (Step 16.1).
|
||||
### Step 2.3 — Add the three ship models
|
||||
- Courier: fastest, smallest hold, short range, atmospheric, lowest price.
|
||||
- Freighter: balanced, atmospheric, mid price.
|
||||
|
|
@ -638,6 +639,8 @@ Steps 10B.1–10B.10 are specified in `memory-bank/change-requests/CR-002-open-m
|
|||
|
||||
Steps 10C.1–10C.10 are specified in `memory-bank/change-requests/CR-003-map-art.md` §5, with its §6 amendments to earlier steps. Done after Phase 10B and before Phase 11; stop for review at the end.
|
||||
|
||||
|
||||
**Amended by CR-016:** The manifest gains the Venus, Io and Europa sprites and the belt (`belt-rocks`, sliced from `belt-asteroids.png` into six sprites; `belt-haze`, optional); the map layers are background → orbit rings → belt haze → belt rocks → routes → bodies and labels → ships (Steps 16.5–16.7). Io and Europa use child-body screen offsets like the Moon (decision 0.5.39); crowded labels fold into a "+N" marker (decision 0.5.105).
|
||||
---
|
||||
|
||||
## Phase 10D — Pilot Duty and Rest (CR-004)
|
||||
|
|
@ -662,6 +665,8 @@ Steps 10F.1–10F.5 are specified in `memory-bank/change-requests/CR-006-boards-
|
|||
|
||||
Steps 10G.1–10G.11 are specified in `memory-bank/change-requests/CR-007-cargo-goods.md` §6 (written there as 10E.1–10E.11), with its §7 amendments to earlier steps. Done after Phase 10F and before Phase 11; stop for review at the end.
|
||||
|
||||
|
||||
**Amended by CR-016:** Cloud-Grown Botanicals, Atmospheric Data Cores, Refined Sulfur, Volcanic Isotopes and Subsurface Ocean Samples join the catalog, with new producers and destinations at Venus, Io and Europa (Step 16.2, decision 0.5.103).
|
||||
---
|
||||
|
||||
## Phase 10H — Boards That Feel Fresh (CR-008)
|
||||
|
|
@ -730,6 +735,7 @@ Steps 10M.1–10M.5 are specified in `memory-bank/change-requests/CR-013-veteran
|
|||
- Add a script in `packages/sim` that simulates a player making reasonable choices (always take the highest-paying eligible contract, buy the cheapest ship when affordable, lease Earth bay, then hire pilots) over a configurable span of real time, using only sim functions.
|
||||
- Output: real time to finish the tutorial, real time to own 3 ships, credits over time, and pilot levels over time.
|
||||
- **Test:** Running the script with a fixed seed produces identical output twice. With default content, tutorial completion falls between 45 and 120 real minutes of active play. (Adjust content values, not the test thresholds, if it fails; record changes in `DECISIONS.md`.)
|
||||
- **Amended by CR-016 (user decision):** the first Market purchase target widens from 45–75 to 45–95 minutes (Step 16.1); the other targets are unchanged and still hold with eight locations.
|
||||
- **Amended by CR-001:** Change the thresholds to: deal accepted under 10 real minutes; second ship bought between 30 and 45 minutes *(changed by CR-010; was: first pilot hired)*; first discovery under 90 minutes; and a new check that after the deal the player always either has a ship in flight or can afford fuel for at least one contract. The simulated player accepts the deal as soon as it is available, takes the highest credits-per-minute contract, and pays down the loan only through automatic repayment. Adjust content values, not thresholds.
|
||||
- **Amended by CR-002:** The simulated player picks up contracts at whatever location its ships are at, and only deadheads when no eligible contract exists there. Add a check: across the whole run, no ship is ever idle with no eligible contract **and** no reachable deadhead destination.
|
||||
- **Amended by CR-004:** The simulated player follows rest rules: it rests a pilot when no eligible contract exists at its location and deadheading isn't better. Re-check all CR-001 timing targets with rest in place; adjust content values, not thresholds. Add a check that no pilot is ever dispatched while resting.
|
||||
|
|
@ -796,6 +802,8 @@ Steps 14.0–14.12 are specified in `memory-bank/change-requests/CR-014-local-fi
|
|||
|
||||
Steps 15.1–15.9 are specified in `memory-bank/change-requests/CR-015-fixed-map-fuel-tanks.md` §7 (written there as 14.1–14.9), with its §8 amendments. Stop for review at the end.
|
||||
|
||||
|
||||
**Amended by CR-016:** The fuel-price ordering test covers eight places (Jupiter < Europa < Ceres < Io < Moon < Venus < Mars < Earth); the reach table gains CR-016 §3 and a Bulk Hauler full-tank reach of at least 900M km (Steps 16.1, 16.3).
|
||||
---
|
||||
|
||||
## Phase 16 — Venus, Io, Europa, and the Asteroid Belt (CR-016)
|
||||
|
|
|
|||
|
|
@ -401,4 +401,11 @@ Spec: `memory-bank/change-requests/CR-016-venus-io-europa-belt.md` (received as
|
|||
- [x] **Step 16.6 — Map: belt haze.** `src/map/belt.ts`: `beltMapRadii`/`beltScreenRadii` (the band between 314M and 494M km on the compressed radial scale), `ringGeometry` (quads around the ring; the strip's width wraps once around, its height runs inner → outer edge), `hazeStripPixels` (the strip drawn in code: a faint warm-grey band fading to transparent at top and bottom, seamless noise, thousands of one- or two-pixel specks; seeded so it is the same every time) and `hazeSource` (`belt-haze.png` when it loaded, else the generated strip). The renderer builds the haze mesh once in map units and only moves and scales it with the camera, at 35 % opacity, above the orbit rings and below routes, bodies and ships; it takes no input. Map style gains `belt` (radii, haze opacity, segments, strip size, seed). Tests (`apps/web/test/belt-haze.test.ts`): the ring's screen radii equal those of 314M and 494M km at five zooms; the mesh vertices lie exactly on the two radii with u wrapping 0 → 1 and v inner 0, outer 1; with no haze file the strip is generated without any warning, fades to under 5 % at its edges and has no visible seam; the strip is the same every time and a provided file wins. Screenshots: `docs/screenshots/16-6-belt-haze-desktop.png`, `…-phone.png` (taken from the test build after the deal with every place discovered; the crowded Jupiter-system labels are Step 16.8's).
|
||||
- [x] **Step 16.7 — Map: belt rocks.** `beltRocks` scatters 220 rocks (map style `belt.rocks`) with a seeded generator: positions in map units across the band, denser toward its middle (the mean of two uniform draws), sizes 3–14 px mostly small (cubed draw), any rotation, brightness 0.55–1, each one of the six sliced rock images. `placeRocks` puts them on screen at the sprite scale and leaves out any rock that would come within Ceres's drawn radius plus 6 px, at any zoom. The renderer creates one sprite per rock once, in a single non-interactive container above the haze, and only moves, sizes and shows them each frame (code-drawn dots if the rock art is missing); taps never consider rocks, so they reach the place or empty map beneath. Tests (`apps/web/test/belt-rocks.test.ts`): the same rocks every time; every rock in the band, over 60 % in its middle half; mostly small with some large, all six images used; no rock over Ceres at five zooms on desktop and phone sizes, sizes following the sprite scale; a tap on any rock finds empty map or a place whose tap target is there. Screenshots: `docs/screenshots/16-7-belt-rocks-desktop.png`, `…-phone.png`. **Phone performance check (CR-003 Step 10C.9): left for the user** (no phone here); listed in the Phase 16 review.
|
||||
- [x] **Step 16.8 — Map: new bodies and Jupiter-system layout.** Venus (30 px) sits at its fixed position; Io and Europa (18 px) at fixed screen offsets from Jupiter, 64 px out at 100° and −160° from the outward direction (clear of Jupiter and of the platform badge at the largest sprite scale), each with the small child ring the Moon has. Labels (decision 0.5.105): a child body's label first tries the side facing away from its parent; `planLabels` folds a family into its parent's label with a "+N" pill when their labels would overlap, or, for the Jupiter system, whenever zoom is below 2.5 (map style `labelDeclutter`); tapping "+N" (a 44 px target) opens the family, zooming in past 2.5 does too. Earth and the Moon only fold if their labels collide (they don't). The haze strip is now 2048 × 256 and repeats 8 times around the ring, so its specks don't streak when zoomed in. Tests (`apps/web/test/jupiter-system.test.ts`): Io and Europa exactly at their offsets from Jupiter at five zooms; at zoom 1 only Jupiter's label shows, with one "+2" marker right of it; at the threshold all three show without overlapping; tapping "+2" opens the family; Earth and the Moon both labelled; every place and marker tap target ≥ 44 px; Venus clear of every other body. The 12.5 browser test now waits for an Earth board offering a Mars first contact (since CR-016 a board may offer Venus instead), which made it flaky. Screenshots: `docs/screenshots/16-8-new-bodies-desktop.png`, `…-phone.png`, `…-jupiter-desktop.png`, `…-jupiter-phone.png` (zoom 4 on the Jupiter system).
|
||||
- [ ] Step 16.9 — Plan amendments and regression
|
||||
- [x] **Step 16.9 — Plan amendments and regression.** `implementation-plan.md`: §0.2 lists eight locations; §0.3 now defers surface Io, Venus's surface and the Hardened class, plus belt hazards, mining claims and belt events (Venus/Io as stops are in); Step 2.2, Step 12.1 (the user's 45–95 min first-purchase window) and Phases 10C (CR-003), 10G (CR-007) and 15 (CR-015) carry CR-016 notes; decisions 0.5.100–0.5.105 were added when the CR was recorded. `architecture.md` describes the belt module, the new art kinds and label planning. Regression: typecheck, lint, 1,277 unit tests (coverage 95.8 % of sim lines), 9 browser tests; balance medians with eight locations: deal 2.9 min, first Market purchase 92.3 (target 45–95), first discovery 48.9 (under 90), loan paid off 160.5, four ships 147 vs 156.
|
||||
|
||||
**Manual checks for the user:**
|
||||
1. **CR-016 §10 Step 15.9:** on a fresh company after the deal, take a first-contact contract to Venus with the Clipper (Jobs → Earth; if the first contact on the board is to Mars, wait for the next board or use Settings → Developer to move the clock 10 minutes). Then look at the belt and the Jupiter system on a phone: tap "+2" beside Jupiter, and zoom in.
|
||||
2. **CR-003 Step 10C.9 performance check (asked for again by Step 16.7):** on a mid-range phone, pan and pinch-zoom the map with the belt showing; it should stay smooth.
|
||||
3. **Map review:** the screenshots in `docs/screenshots/16-6-*`, `16-7-*` and `16-8-*` (desktop and phone; `16-8-new-bodies-jupiter-*` zoomed in on the Jupiter system).
|
||||
|
||||
**Phase 16 complete. Stopped for the user's review.**
|
||||
|
|
|
|||
Loading…
Reference in New Issue