Systems and Tools
Available in the Gaming Circle and Industries Circle
Systems
The following systems are required to run FlowFields (listed in the same order as they are in SystemSetup
)
FlowFieldPathfinderSystem_Requests
: single thread system. Adds new destinations toFlowFieldControllers
when requested byFlowFieldPathfinder
.FlowFieldMapSystem_UpdateMap
: multi threaded system. Recalculates dirty controllers. A controller is dirty when the cost or portal has changed and when new destinations were added byFlowFieldPathfinderSystem_Requests
.FlowFieldPathfinderSystem_RequestPath
: multi threaded system. Calculates the identifier (used for path caching) for a requested path (combination of start position and destination) and registers the request toFlowFieldMap
. When two pathfinders requests paths with the same identifier, in the same frame, the position and destination of pathfinder with the lowest entity index is used for the first step of the navigation (A*).FlowFieldMapSystem_FindPaths
: multi threaded system. Calculates paths requested byFlowFieldPathfinderSystem_RequestPath
and adds them to the path cache.FlowFieldPathfinderSystem_CopyPaths
: single threaded system. Copies paths calculated byFlowFieldMapSystem_FindPaths
toFlowFieldPathfinder
.FlowFieldPathfinderSystem_SmoothPath
: multi threaded system. Calculates the next smooth corner for each pathfinder who has new a destination or already arrived to its current smooth corner.FlowFieldPathfinderSystem_Removes
: single threaded system. Removes the destination requests fromFlowFieldControllers
added byFlowFieldPathfinderSystem_Requests
.FlowFieldMapSystem_ClearCache
: single threaded system. Clears cached paths when their count gets too high. The cache can't get too big because late join/reconnect snapshots might get too big.FlowFieldPathfinderSystem
: signals only system. Initializes and deinitializes `FlowFieldPathfinder*.
Tools
FlowFieldMapDebug
Tool which shows the A* graph used for navigation between controllers.
FlowFieldControllerDebug
Debug view of the FlowFieldController
.
Can show the following data:
- Cost Original - cost of the tiles without dynamic modifiers;
- Cost - cost of the tiles with dynamic modifiers applied;
- Integration - tiles integration (only contains data of the last calculated flow, one array is used for the entire Controller);
- Flow - tiles directions towards the specified Destination or Portal;
- Controller Location - tile location within the Controller;
- Map Location - tile location within the Map;