Skip to content

feat(m12): theme grown planets from a pre-baked palette library - #24

Closed
ksdisch wants to merge 1 commit into
claude/project-status-review-p6ske4from
claude/planet-generator-spike-handoff-p3bl0m
Closed

feat(m12): theme grown planets from a pre-baked palette library#24
ksdisch wants to merge 1 commit into
claude/project-status-review-p6ske4from
claude/planet-generator-spike-handoff-p3bl0m

Conversation

@ksdisch

@ksdisch ksdisch commented Jul 9, 2026

Copy link
Copy Markdown
Owner

What & why

Follow-up to the generator spike (#23). The spike shipped themeless — a grown planet wore the default skin — and named theme selection as the first cut. This closes that: a grown planet now looks like a real planet, so two pairs grow visibly different-feeling worlds.

Stacked on #23. Base is claude/project-status-review-p6ske4, so this diff is only the theme work. Merge/retarget after #23 lands.

The gap it closes

A themed PlanetConfig resolves its textures as <key>-<config.id> via Planet.tex(), and Boot only bakes those by scanning the registry. But a grown planet is launched by scene-data and is never registered — so a theme on it would reference textures Boot never created (missing-texture boxes). That's exactly why the spike stayed themeless.

Changes

  • New src/game/planets/generatedThemes.ts — a small fixed palette library (GENERATED_THEMES): Aurora (cool teal, ice puzzles), Ember (warm, cyan sentry, default), Twilight (violet, nebula). Each entry carries a slug, a PlanetTheme, and a valid PuzzleTheme.
  • src/game/scenes/Boot.ts — pre-bakes <key>-planet-generated-<slug> for every library entry, via a shared makeThemeTextures() helper factored out of the existing registry loop (registered planets now use it too). This is the "known id" the generated planet's textures live under.
  • src/game/planets/generate.tsgeneratePlanet deterministically picks a library theme from the pair's seed and stamps the matching id (planet-generated-<slug>, so tex() resolves the pre-baked textures), theme, and puzzleTheme. Purely cosmetic — no reach-budget geometry depends on it.
  • src/game/planets/generate.test.ts — the 1000-config safety sweep now also asserts every config wears a valid library theme and a slug-carrying id; the two "themeless/default-id" assertions are updated to the themed contract.

Deliberate non-goals

  • Still one gate template (planet-3's) and a fixed palette (3 themes) — a template library and continuous/procedural theming remain open.
  • No protocol / relay / src/shared / phone / dependency changes. PuzzleTheme values are reused as-is.

Verification

  • npm run typecheck ✓ · npm run test 168 passed ✓ · npm run build
  • Headless full clear of a grown Ember planet (?solo=1&test=1): boots into Planet → Freeze the sentry → Phase Dash the curtain → Illuminate → reaches the goal. won=true, 0 respawns; themed textures render (cyan sentry, ember terrain + camera background) with no missing-texture warnings; completed/telemetry recorded under planet-generated-ember.

Does a grown planet feel like yours now that it's dressed? Still the human gate the vision doc names — this just makes the question fair to ask.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BJ7bYdzGbwXTu2tjhZXgUT


Generated by Claude Code

The generator spike shipped themeless: a themed PlanetConfig resolves its
textures as <key>-<config.id> via Planet.tex(), and Boot only bakes those
by scanning the registry — but a grown planet is launched by scene-data,
never registered, so a theme would reference textures Boot never created.

Close that gap with a small fixed palette library (generatedThemes.ts).
Boot pre-bakes <key>-planet-generated-<slug> for every entry (a shared
makeThemeTextures helper factored out of the registry loop). generatePlanet
deterministically picks one from the pair's seed and stamps the matching
id/theme/puzzleTheme, so a grown planet looks like a real planet — cyan-
sentry Ember, teal Aurora, violet Twilight — and two pairs grow visibly
different worlds. The theme is cosmetic: no reach-budget geometry depends
on it, so the 1000-config safety sweep is unaffected (and now also asserts
every config wears a valid library theme + a slug-carrying id).

Verified: typecheck, 168 tests, build all green; headless full clear of a
grown Ember planet (?solo=1&test=1) — freeze/phase/illuminate, won=true,
0 respawns, themed textures render with no missing-texture warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BJ7bYdzGbwXTu2tjhZXgUT
@ksdisch
ksdisch force-pushed the claude/project-status-review-p6ske4 branch from 6174731 to 35c642b Compare July 12, 2026 01:40
@ksdisch
ksdisch force-pushed the claude/planet-generator-spike-handoff-p3bl0m branch from 09bf2dd to 13e7975 Compare July 12, 2026 01:40
@ksdisch

ksdisch commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Closing per 2026-08-01 PR triage: stacked on #23, idle since 2026-07-12. The design is recorded in the PR body and survives closure; re-spiking on current main beats un-rotting the stack. The branch survives if this is ever picked back up.

@ksdisch ksdisch closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants