the scanner should show the closest non-conqueered planet, even if the chunk was not visited and should show a point on the map and direction while flying #200

Closed
opened 2026-09-04 16:51:19 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Implemented in commit 10d19a3 on main.

Closest non-conquered planet, visited or not
GameState.scan_for_planet() now skips any planet already conquered, and the ring search no longer returns the first chunk-ring hit. Candidates are compared by their actual generated world position, and the search only stops once the nearest candidate is closer than anything the unsearched rings could still contain. The search runs over generated chunks rather than explored_chunks, so unvisited space is included; the hit's neighbourhood is then revealed on the persistent map.

Point on the map
The accepted target is kept in GameState.scanner_target (cleared on new game, and ignored once that planet is conquered). WorldMapContent draws it as a cyan reticle - arc plus four ticks - in its own pass, independent of the explored-chunk drawing, so the destination stays visible even when it lies beyond travelled space and is distinct from planet, building and fleet symbols.

Direction while flying
New ui/ScannerGuidance overlay in Main.tscn: an arrow that points from the fleet centroid toward the target, tinted with the planet definition's map colour, clamped to a safe screen margin when the target is off-screen, with a NAME - N.N SECTORS caption placed away from the screen edge. It hides during the intro and while any modal menu is open.

Verification

  • tests/test_planet_scanner.gd extended for the unconquered/nearest-by-world-position rules and target retention.
  • Map family: test_planet_map_assignment, test_map_building_markers, test_planet_prompt_map_interaction, test_planet_map_marker_matches_spawn, test_world_map_ui - 5/5 pass.
  • Two 720x1280 visual captures checked: the in-flight arrow with its caption, and the world map centred on the scanned target.
  • Full suite: 161/161 passed.

No web deployment was performed.

Implemented in commit `10d19a3` on `main`. **Closest non-conquered planet, visited or not** `GameState.scan_for_planet()` now skips any planet already conquered, and the ring search no longer returns the first chunk-ring hit. Candidates are compared by their actual generated world position, and the search only stops once the nearest candidate is closer than anything the unsearched rings could still contain. The search runs over generated chunks rather than `explored_chunks`, so unvisited space is included; the hit's neighbourhood is then revealed on the persistent map. **Point on the map** The accepted target is kept in `GameState.scanner_target` (cleared on new game, and ignored once that planet is conquered). `WorldMapContent` draws it as a cyan reticle - arc plus four ticks - in its own pass, independent of the explored-chunk drawing, so the destination stays visible even when it lies beyond travelled space and is distinct from planet, building and fleet symbols. **Direction while flying** New `ui/ScannerGuidance` overlay in `Main.tscn`: an arrow that points from the fleet centroid toward the target, tinted with the planet definition's map colour, clamped to a safe screen margin when the target is off-screen, with a `NAME - N.N SECTORS` caption placed away from the screen edge. It hides during the intro and while any modal menu is open. **Verification** - `tests/test_planet_scanner.gd` extended for the unconquered/nearest-by-world-position rules and target retention. - Map family: `test_planet_map_assignment`, `test_map_building_markers`, `test_planet_prompt_map_interaction`, `test_planet_map_marker_matches_spawn`, `test_world_map_ui` - 5/5 pass. - Two 720x1280 visual captures checked: the in-flight arrow with its caption, and the world map centred on the scanned target. - Full suite: **161/161 passed**. No web deployment was performed.
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#200
No description provided.