Drive planet space presentation from PlanetDefinition resources #32

Closed
opened 2026-08-14 11:53:08 +00:00 by metaheavens · 1 comment
Owner

Problem

Planet.gd, PlanetField.gd, WorldGen.gd, and PlanetAtmosphereController.gd pass string values such as rocky and gas_giant around, then switch on them to draw planets and select related behavior. This repeats the same type knowledge across generation, presentation, and transition code.

Direction

Add a PlanetDefinition resource/catalog entry that owns the planet identity and presentation data: space visual scene or renderer, surface-profile reference, naming pools, map style, and resource identity where applicable. World generation should select a definition, while PlanetField instantiates or configures its declared visual. Landing should pass the selected definition/profile rather than recreate meaning from strings.

This ticket complements the surface-composition ticket but remains focused on the space biome and transition data.

Acceptance criteria

  • Planet.gd has no gas_giant-specific drawing or process conditional.
  • WorldGen emits a stable planet-definition identifier/reference instead of parallel planet_type and resource_type strings.
  • PlanetField and PlanetAtmosphereController do not translate planet types through type-specific branches.
  • Adding a new planet presentation requires a definition and visual scene, without modifying existing planet render code.
  • Existing world-generation guarantees, including the nearby gas planet, remain covered by tests.
## Problem Planet.gd, PlanetField.gd, WorldGen.gd, and PlanetAtmosphereController.gd pass string values such as rocky and gas_giant around, then switch on them to draw planets and select related behavior. This repeats the same type knowledge across generation, presentation, and transition code. ## Direction Add a PlanetDefinition resource/catalog entry that owns the planet identity and presentation data: space visual scene or renderer, surface-profile reference, naming pools, map style, and resource identity where applicable. World generation should select a definition, while PlanetField instantiates or configures its declared visual. Landing should pass the selected definition/profile rather than recreate meaning from strings. This ticket complements the surface-composition ticket but remains focused on the space biome and transition data. ## Acceptance criteria - Planet.gd has no gas_giant-specific drawing or process conditional. - WorldGen emits a stable planet-definition identifier/reference instead of parallel planet_type and resource_type strings. - PlanetField and PlanetAtmosphereController do not translate planet types through type-specific branches. - Adding a new planet presentation requires a definition and visual scene, without modifying existing planet render code. - Existing world-generation guarantees, including the nearby gas planet, remain covered by tests.
Author
Owner

Implemented in commit 02643c7.

Changes:

  • Added PlanetDefinition resources for rocky and gas-giant metadata.
  • Planet is now a generic host; rocky and gas visuals are separate composed scenes.
  • WorldGen emits one definition_id instead of parallel planet_type/resource_type strings.
  • PlanetField and atmosphere transitions pass that definition ID through unchanged.
  • Surface profile, resource identity, names, and map color resolve from the shared definition.
  • Planet.gd contains no gas-specific drawing or process branch.

Verification:

  • test_gas_system.gd passes.
  • All 7 planet-focused tests pass, including atmosphere transition, identity persistence, extractor marker geometry, map marker agreement, landing, spawning, and prompt/map interaction.
Implemented in commit 02643c7. Changes: - Added PlanetDefinition resources for rocky and gas-giant metadata. - Planet is now a generic host; rocky and gas visuals are separate composed scenes. - WorldGen emits one definition_id instead of parallel planet_type/resource_type strings. - PlanetField and atmosphere transitions pass that definition ID through unchanged. - Surface profile, resource identity, names, and map color resolve from the shared definition. - Planet.gd contains no gas-specific drawing or process branch. Verification: - test_gas_system.gd passes. - All 7 planet-focused tests pass, including atmosphere transition, identity persistence, extractor marker geometry, map marker agreement, landing, spawning, and prompt/map interaction.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#32
No description provided.