4 ms·
'Perfect pathfinding' sucks with swarms. The first unit gets to the choke point; the rest about-face and start marching off the long way around the forest (beca
by JoeAltmaier 9y ago
'Perfect pathfinding' sucks with swarms. The first unit gets to the choke point; the rest about-face and start marching off the long way around the forest (because that's now the shortest path with the primary path blocked). Happened all the time in Warcraft I, and was astonishingly annoying.
- Quenty 9y agoYes, pathfinding is different than path following. That is, finding an optimal path is one problem, and having units follow that path in a dynamic world while reacting accordingly is something else entirely.
- Splines 9y agoIt seems like a harder problem than that as well - you might want some of the units in the back of the swarm to go the long way because they'd wait a long time at the choke. But maybe you don't want to do that - those units in the back are squishy and need to stick with the units at the front of the choke. But maybe that's ok - the alternative path isn't too far away and it's not a risky move to make. Maybe that's too complicated. Probably best to make the swarm operate as if other moving units don't exist (to make pathing predictable) and let the player micromanage via waypoints/grouping.
- AstralStorm 9y agoTypically in RTS it is better to keep formation. If the user spots that units are choking they will order them elsewhere. The moving units are often easily handled via local avoidance as needed.
- AstralStorm 9y agoFlow algorithms tend to handle this case (and other perfect cases too) more reasonably as they see a choke as a path with low carrying capacity and avoid it ahead of time. (If you're smart and the required carrying capacity is related to size of unit ball.) The trouble is how to dynamically adjust weights. That is path following and reaction part which is quite outside the purview of path finding algorithms other than that they have to work in an online manner.