This implements unit pushing each other when moving, instead of relying entirely on the short-range pathfinder for avoidance.
- Movement looks more natural in crowds.
- Fewer short path requests making the game faster in general (despite pushing taking some time to compute - I think it's an easy win overall).
- Less reliance on the short-pathfinder reducing the # of issues with it.
- Ideally be thread-able.
- Fundamentally makes it harder to avoid units "phasing" through each other.
- options including reducing turn lengths / running movement in sub-turns.
- Fundamentally introduces more movement in units, which might look odd sometimes.
- Still needs the short range pathfinder to exist to get around some types of obstacle.
Open design questions:
- How much to push?
- Should some units be unpushable? Should enemy units be un-pushable?
Open implementation questions:
- How to know when we can't "push through" and need to trigger an "obstructed" call. It looks weird when ordering many units to clump together.
- current answer: if there is still collision at the end of movement + pushing, the movement is cancelled.
- For now this greedily reconstructs a grid of moving units as needed. I'd need to test this on larger maps.