Implement flow and potential field pathfinding. The flowfield should be created by using the potential field.
Analysis
Both:
Efficient multi agent pathfinding.
Robust in the sense that if a unit somehow gets pushed from the path it will find its way back without problems.
The naïve implementation that will calculate the field for the entire map will use up more cpu and memory than necessary. This could be made more efficient by only doing a high level hierarchical astar search to determine which parts of the map are needed. Caching fields will also be more complex as you could have a incomplete field. However this requires a lot more work as no such nodenetwork or algorithm has been implemented yet in pathfindax. For now stick to the simple implementation.
Can and should be cached based on the targetnode, clearance and agentsize (the startnode does not matter). This will reduce memory usage and increase performance.
PotentiaField:
Less performant than flowfields since the actual heading at a position has to be calculated by checking all neighbours and picking the one with the highest potential. Still this are just a couple of array lookups so its still quite fast. The difference might even be unnoticeable in many cases.
Dynamic pathfinding if agents can emit their own potential field that's added to the potential field values when figuring out the heading.
FlowField:
Highly performant once the field has been calculated. Getting the heading for a particular agent at a particular position is basically an array lookup.
if you constrain the directions to 248 different directions and 1 for the Vector.Zero then it will only take 1 byte per node to store a flowfield if you use a separate lookup array for these values.
Basically what you would get if you asked the heading of every node in a potential field and store this in an array.
Summary
Implement flow and potential field pathfinding. The flowfield should be created by using the potential field.
Analysis
Both:
PotentiaField:
FlowField: