Table of Contents

Delegate MovementValidator

Namespace
Core.Systems
Assembly
Core.dll

ENGINE LAYER: Pathfinding system for multi-province unit movement

Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps.

Features:

  • IMovementCostCalculator for terrain/ownership-based costs
  • PathOptions for forbidden zones and avoid preferences
  • LRU path caching for repeated requests
  • Burst path when using uniform costs (fast)
  • Managed path with custom costs (flexible)

Performance:

  • Burst: O(E log V) with binary heap, ~0.1ms typical
  • Pre-allocated collections, zero gameplay allocations
  • LRU cache reduces redundant searches
public delegate bool MovementValidator(ushort provinceID, ushort unitOwnerCountryID, ushort unitTypeID)

Parameters

provinceID ushort
ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches
unitOwnerCountryID ushort
ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches
unitTypeID ushort
ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches

Returns

bool
ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches