About Flow Field Pathfinding
While there are many types of path finding, flow field pathfinding works really well if you have lots of units that all need to move towards a single location. For example RTS games, or even some first person shooter games where large waves of units all move towards the players location. The following videos show you how to setup then improve flow field pathfinding.
In part 1 red units are created that follow the arrows to move towards the mouse and around the blue walls. Overall it works pretty good because it allows the red units to move to their destination regardless of where they start off.
Part 2 builds on the previous code by improving the way units separate, to limit how much they can overlap and make them flow a lot better. However this creates a problem where they start to vibrate like crazy, but thankfully there’s a simple way to fix it. I also discuss some ideas on more ways to further improve.
Watch Videos...