What is pathfinding?
Pathfinding is figuring out how to get from point A to point B.
Pathfinding is an essential part of video game development.
Example: When you click your mouse to move. Behind the scenes the game needs to figure out an appropriate path to follow to get you from where you stand to where you clicked.
You might have heard of A* pathfinding. A* (Astar) is the most common type of pathfinding for game development as of 2019 and has been for years.
The two pathfinding methods in a nutshell:
Calculating a flow field is slow, roughly 3x slower than A*.
But, multiple units can use the same flow field.
Optimizing a Flow Field Pathfinder
Combining the two pathfinding methods creates a system that is performance minded.
Imagine looking down on a game level.
Running A* pathfinding before calculating a flow field identifies the sectors needed for the path. In this example it reduced the flow field calculations by 85%. Optimizations like this will drastically boost a video game’s performance.
A flow field provides fluid movement for large groups.