Pawns and pathfinding

Add pathfinding to the pawns so that they can navigate the map. Pawn tasks will be covered in milestone 5; this milestone is specifically about setting up navigation. Some of the AC here will not represent in-game functionality, rather a debug proof-of-behaviour.

Revised after #80. The original plan proved navigation by letting the player select a pawn and right-click a destination. That was always scaffolding — directly instructing pawns to move is not a feature of the finished game — and it turned out to be expensive scaffolding, needing selection, input arbitration and unreachable feedback before a pawn took a step. #81 is closed in favour of #95, a debug-only scatter command that sends every idle pawn to a random reachable tile. It proves more of the real system (Pawns.move_to(), the real frame loop, generated terrain, several pawns at once) and builds nothing that has to be removed later.

The terrace question underneath all of this is settled: tools/probe_pawn_terrace.gd shows a pawn riding the steps rather than cutting through them, climbing and descending, with A* routing over a one-level riser.

AC:

  • A debug-only command sends idle pawns walking to reachable destinations, with several moving at once (#95)
  • Pawns have a configurable movement speed (#80, done)
  • Pawn state and cell follow the walk rather than updating only on arrival, and are visible in the debug panel (#95)
  • If the debug panel is open, draw the navigation paths of all pawns that are currently moving (#82)
  • Each terrain kind (sand, grass, snow etc) will have a different movement cost; navigating should balance terrain costs and time taken to reach the destination (#79)

Out of scope:

  • Any player-facing move order. The player will never command a pawn to a tile directly
  • Visual feedback for an unreachable destination. Pawns.move_to() returns false and the empty-path case has unit coverage; a real need for surfacing it is most likely to arrive with #83, and should be designed against that case
  • Pawn selection is no longer required to prove navigation. It moved to milestone #6 (Selection and inspection) as #78, which now covers pawns and buildings
  • Flying pawns that go above ground and ignore terrain costs
  • Swimming pawns - water is an impenetrable barrier for now
No due date
81% Completed