Compose planet surfaces from profile-defined feature scenes #31

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

Problem

PlanetSurface.tscn currently instantiates both RockField and GasVentField. RockField.gd and PlanetSurfaceController.gd then inspect GameState.planet_type to disable, hide, or configure nodes. A leaf resource producer therefore knows about an unrelated planet type, and every new surface type would add another central conditional.

Direction

Introduce a PlanetSurfaceProfile resource (or equivalent data object) selected by landing data. The surface host composes the feature scenes and visual theme declared by that profile.

Example composition:

  • Rocky profile instantiates a RockySurfaceFeatures scene containing RockField.
  • Gas profile instantiates a GasSurfaceFeatures scene containing GasVentField.
  • Each feature scene owns its behavior and has no knowledge of other profiles.
  • Background palette and captions come from the selected profile rather than type switches.

Keep this ticket focused on the landed surface. Space-map planet presentation is covered separately.

Acceptance criteria

  • RockField and GasVentField do not inspect GameState.planet_type.
  • PlanetSurfaceController has no rocky-versus-gas branch and does not hide one of two always-present producer nodes.
  • A gas surface scene tree contains no ore producer, and a rocky surface contains no gas producer.
  • Surface feature scenes and palette/theme are selected from profile data.
  • A third test profile can be added without editing existing feature scripts or adding another type conditional to PlanetSurfaceController.
  • Landing, gas collection, and surface rendering tests continue to pass, with a composition test covering the two profiles.
## Problem PlanetSurface.tscn currently instantiates both RockField and GasVentField. RockField.gd and PlanetSurfaceController.gd then inspect GameState.planet_type to disable, hide, or configure nodes. A leaf resource producer therefore knows about an unrelated planet type, and every new surface type would add another central conditional. ## Direction Introduce a PlanetSurfaceProfile resource (or equivalent data object) selected by landing data. The surface host composes the feature scenes and visual theme declared by that profile. Example composition: - Rocky profile instantiates a RockySurfaceFeatures scene containing RockField. - Gas profile instantiates a GasSurfaceFeatures scene containing GasVentField. - Each feature scene owns its behavior and has no knowledge of other profiles. - Background palette and captions come from the selected profile rather than type switches. Keep this ticket focused on the landed surface. Space-map planet presentation is covered separately. ## Acceptance criteria - RockField and GasVentField do not inspect GameState.planet_type. - PlanetSurfaceController has no rocky-versus-gas branch and does not hide one of two always-present producer nodes. - A gas surface scene tree contains no ore producer, and a rocky surface contains no gas producer. - Surface feature scenes and palette/theme are selected from profile data. - A third test profile can be added without editing existing feature scripts or adding another type conditional to PlanetSurfaceController. - Landing, gas collection, and surface rendering tests continue to pass, with a composition test covering the two profiles.
Author
Owner

Implemented in commit 2f68515.

Changes:

  • PlanetSurface now hosts one profile-selected feature scene.
  • Rocky and gas profiles instantiate mutually exclusive ore/gas providers.
  • RockField, GasVentField, and PlanetSurfaceController no longer inspect planet_type.
  • Surface palette and caption colors come from PlanetSurfaceProfile resources.
  • Landing data carries the selected surface profile.

Verification:

  • test_gas_system.gd passes for gas and rocky composition.
  • test_planet_atmosphere_transition.gd passes through the full scene handoff.
Implemented in commit 2f68515. Changes: - PlanetSurface now hosts one profile-selected feature scene. - Rocky and gas profiles instantiate mutually exclusive ore/gas providers. - RockField, GasVentField, and PlanetSurfaceController no longer inspect planet_type. - Surface palette and caption colors come from PlanetSurfaceProfile resources. - Landing data carries the selected surface profile. Verification: - test_gas_system.gd passes for gas and rocky composition. - test_planet_atmosphere_transition.gd passes through the full scene handoff.
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#31
No description provided.