rearrange skill tree view #7

Closed
opened 2026-08-10 20:53:03 +00:00 by metaheavens · 1 comment
Owner

the first skill to unlock should be bottom, the more dependency a skill has, the higher it should be on the tree

the first skill to unlock should be bottom, the more dependency a skill has, the higher it should be on the tree
Author
Owner

Done. The tree now grows upwards: the first thing you can research sits at the bottom, and every further prerequisite climbs a row.

Rather than hardcoding new positions, the vertical position is now derived from how many prerequisites deep a node is, so "the more dependency a skill has, the higher it is" is enforced by construction rather than by me remembering to move things. The data now only carries a horizontal position; height comes from skill_depth(), which walks the requires chain (with a guard so a cycle in the data cannot hang it).

That matters for the Ship Lab in #5: adding nodes cannot put the layout out of step with the dependencies, because there is no stored layout to get out of step.

Current shape, bottom to top: Shipyards -> Logistics / Coordination -> Wing Doctrine -> Squadron Doctrine -> Armada Doctrine.

While rendering it I also fixed a contrast bug that made the tree read backwards: locked nodes were coming out the brightest things on screen. NeonDraw tops every shape with a near-white core stroke, which at this size completely overwhelmed the dim locked colour, so unreachable nodes looked like highlighted ones. Locked nodes now get a dark core and a reduced glow, so the ordering reads correctly: green researched, violet reachable, dim locked, gold selection ring.

Files: GameState.gd (skill_depth, max_skill_depth, dropped stored y), SkillTreeView.gd (depth-driven layout, locked contrast).

Verified: rendered the menu and checked the ordering by eye. Full suite 38/38.

Done. The tree now grows upwards: the first thing you can research sits at the bottom, and every further prerequisite climbs a row. Rather than hardcoding new positions, the vertical position is now **derived** from how many prerequisites deep a node is, so "the more dependency a skill has, the higher it is" is enforced by construction rather than by me remembering to move things. The data now only carries a horizontal position; height comes from `skill_depth()`, which walks the `requires` chain (with a guard so a cycle in the data cannot hang it). That matters for the Ship Lab in #5: adding nodes cannot put the layout out of step with the dependencies, because there is no stored layout to get out of step. Current shape, bottom to top: `Shipyards` -> `Logistics` / `Coordination` -> `Wing Doctrine` -> `Squadron Doctrine` -> `Armada Doctrine`. While rendering it I also fixed a contrast bug that made the tree read backwards: locked nodes were coming out the *brightest* things on screen. NeonDraw tops every shape with a near-white core stroke, which at this size completely overwhelmed the dim locked colour, so unreachable nodes looked like highlighted ones. Locked nodes now get a dark core and a reduced glow, so the ordering reads correctly: green researched, violet reachable, dim locked, gold selection ring. **Files:** `GameState.gd` (`skill_depth`, `max_skill_depth`, dropped stored y), `SkillTreeView.gd` (depth-driven layout, locked contrast). **Verified:** rendered the menu and checked the ordering by eye. Full suite 38/38.
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#7
No description provided.