3 ms·
Pretty decent, alternative approach is to form virtual "formations" when units near each other and move as blocs. This removes multiple problems like units bump
by AstralStorm 9y ago
Pretty decent, alternative approach is to form virtual "formations" when units near each other and move as blocs. This removes multiple problems like units bumping into each other on the way and is kind of the behaviour a strategy player would expect. On obstruction, make neighbours slow down and indeed use obstruction avoidance (local pathfinding) to "squish" the formations. Return to these later when possible.
Marching squares indeed produces a similar result of "squishing". However as it is ran per unit you will have more collisions.
- quadcore 9y agoPretty decent, alternative approach is to form virtual "formations" when units near each other and move as blocs. This removes multiple problems like units bumping into each other on the way and is kind of the behaviour a strategy player would expect. On obstruction, make neighbours slow down and indeed use obstruction avoidance (local pathfinding) to "squish" the formations. Return to these later when possible. Yes definitely. That is orthogonal to the main pathfinder. Moving units doesnt count as "walls" and so they can just push each other using a physic/collision engine and move all together like one body as well using that engine which is a sort of "local pathfinder" in some ways (it can be tweak so that units tend to avoid each other and all).