feat(m12): theme grown planets from a pre-baked palette library - #24
Closed
ksdisch wants to merge 1 commit into
Closed
Conversation
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
force-pushed
the
claude/project-status-review-p6ske4
branch
from
July 12, 2026 01:40
6174731 to
35c642b
Compare
ksdisch
force-pushed
the
claude/planet-generator-spike-handoff-p3bl0m
branch
from
July 12, 2026 01:40
09bf2dd to
13e7975
Compare
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
The gap it closes
A themed
PlanetConfigresolves its textures as<key>-<config.id>viaPlanet.tex(), andBootonly 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 texturesBootnever created (missing-texture boxes). That's exactly why the spike stayed themeless.Changes
src/game/planets/generatedThemes.ts— a small fixed palette library (GENERATED_THEMES): Aurora (cool teal,icepuzzles), Ember (warm, cyan sentry,default), Twilight (violet,nebula). Each entry carries aslug, aPlanetTheme, and a validPuzzleTheme.src/game/scenes/Boot.ts— pre-bakes<key>-planet-generated-<slug>for every library entry, via a sharedmakeThemeTextures()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.ts—generatePlanetdeterministically picks a library theme from the pair's seed and stamps the matching id (planet-generated-<slug>, sotex()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
src/shared/ phone / dependency changes.PuzzleThemevalues are reused as-is.Verification
npm run typecheck✓ ·npm run test168 passed ✓ ·npm run build✓?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 underplanet-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