v0.3.0 — WORLD MAP: world generation + jump (#5) #12

Merged
kamilkrzywda merged 8 commits from world-map-jump into master 2026-09-28 23:43:08 +02:00
Owner

Closes #5. Foundation issue: game save, DB schema, turn counter, event writing, and a functional WORLD MAP tab.

  • DB: saves (single-player, one row ever), solar_systems, jump_routes (both directions stored), events — Drizzle/sql.js
  • World gen: pure seeded functions in lib/game/world.ts (mulberry32) — starting system + ring of 6 neighbours; jumping into an undiscovered system grows the chart by a new ring, always with a route back. Entire world reproducible from the save seed
  • API: GET /api/world (auto-inits on empty DB), POST /api/jump {systemId} — adjacency validation (409 non-adjacent/already current), turn increment, event writes; OpenAPI spec updated in code
  • UI: WORLD MAP tab renders live state into NodeGraph + JUMP ROUTES button panel per adjacent system; placeholder map data removed for this tab only
  • Tests: unit 7→20 (generation shape/determinism/expansion, save lifecycle incl. persistence across reopen), e2e 5→7 (fresh-stack map render, jump updates current+turn, jumped state survives the mid-run container restart in state.spec)

Local verification: tsc ✓, vitest 20/20 ✓, playwright --list ✓, next build clean (7 tab triggers present).

Closes #5. Foundation issue: game save, DB schema, turn counter, event writing, and a functional WORLD MAP tab. - **DB:** `saves` (single-player, one row ever), `solar_systems`, `jump_routes` (both directions stored), `events` — Drizzle/sql.js - **World gen:** pure seeded functions in lib/game/world.ts (mulberry32) — starting system + ring of 6 neighbours; jumping into an undiscovered system grows the chart by a new ring, always with a route back. Entire world reproducible from the save seed - **API:** `GET /api/world` (auto-inits on empty DB), `POST /api/jump {systemId}` — adjacency validation (409 non-adjacent/already current), turn increment, event writes; OpenAPI spec updated in code - **UI:** WORLD MAP tab renders live state into NodeGraph + JUMP ROUTES button panel per adjacent system; placeholder map data removed for this tab only - **Tests:** unit 7→20 (generation shape/determinism/expansion, save lifecycle incl. persistence across reopen), e2e 5→7 (fresh-stack map render, jump updates current+turn, jumped state survives the mid-run container restart in state.spec) Local verification: tsc ✓, vitest 20/20 ✓, playwright --list ✓, next build clean (7 tab triggers present).
kamilkrzywda added 8 commits 2026-09-28 23:39:42 +02:00
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-28 23:43:07 +02:00
kamilkrzywda merged commit b79b77131f into master 2026-09-28 23:43:08 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/SpaceWanderer#12