Guide for finding and modifying planets — planet types, surface types, gas giants, planet rendering, rings, moons, clouds, city lights, and planet generation in The Years Between the Stars. Use this skill whenever the user wants to change how planets look, add a new planet type or surface type, modify planet colors or textures, adjust gas giant bands, change ring systems, add atmosphere effects, or tweak how planets are procedurally generated. Trigger on "planet", "gas giant", "surface type", "rings", "moons", "atmosphere", "city lights", "ocean world", "rocky planet".
Rocky planet surface types (in engine/src/types.rs): Continental, Ocean, Barren, Desert, Ice, Volcanic, Jungle, Savanna, Tundra
Gas giant types: Jovian, Saturnian (has rings), Neptunian, Inferno, Chromatic
engine/src/types.rs — data structures:
PlanetData — the full planet record sent to the clientPlanetType — Rocky vs GasGiantSurfaceType — all rocky subtypesGasGiantType — all gas giant subtypesengine/src/system_generator.rs — procedural generation:
src/game/rendering/meshFactory.ts — the primary planet rendering file:
makePlanet() — procedural rocky planet with GLSL shadermakeGasGiant() — procedural gas giant with band shadermakeTexturedPlanet() — textured variant (uses planetSkins.ts)makeTexturedGasGiant() — textured gas giant variantmakeRingMesh() — Saturn-style ring systemsrc/game/rendering/effects.ts — planet enhancement effects:
addCityLights() — night-side city light layer (habitable worlds)addCloudLayer() — animated cloud sphereaddSunAtmosphere() — stellar atmosphere glowsrc/game/rendering/planetSkins.ts — texture catalog. Currently references CC0 Solar System Scope textures. Edit here to swap in real texture files or enable textured rendering.
src/game/rendering/textureCache.ts — texture loading and disposal. Edit here if adding texture streaming or memory management.
src/ui/SystemMap/SystemMap.tsx — orbital system map showing planets as colored circles with labels. Edit here to change how planets appear on the map (colors, orbit rings, labels).
src/game/GameState.ts — currentSystem.planets array holds the active system's planet data. Touch this when adding new fields to planet state.
src/game/Game.ts — manages the current system's planet objects. Touch when changing how planets are loaded or referenced during gameplay.
Change a planet's visual appearance:
src/game/rendering/meshFactory.ts — find makePlanet() or makeGasGiant() and edit the shader or color logicAdd a new surface type:
engine/src/types.rs — add variant to SurfaceTypeengine/src/system_generator.rs — add color palette and generation weightsrc/game/rendering/meshFactory.ts — handle the new type in makePlanet()src/ui/SystemMap/SystemMap.tsx — add color for map displaynpm run wasm:build (or cd engine && wasm-pack build --target web --out-dir pkg)Add/change ring systems:
engine/src/system_generator.rs — control which planet types get ringssrc/game/rendering/meshFactory.ts — find makeRingMesh() for visual changesChange cloud or atmosphere effects:
src/game/rendering/effects.ts — addCloudLayer() or addSunAtmosphere()Change city lights:
src/game/rendering/effects.ts — addCityLights()Change planet display on system map:
src/ui/SystemMap/SystemMap.tsx