Quote:Original post by templewulf
You could implement rudimentary boundary box collision detection. In which case, you could set the units a minimum distance apart from the point of the collision, but I can imagine this cascading into many other collisions. I think it would be kinda neat to see them sort themselves out, but I don't know how resource intensive you're allowed to be with this. It shouldn't be too bad with a simple AABB, though.
Could use some of the methods employed by the 'flocking' mechanisms. Having the units check their nearest neighbors (test the ones inside a box of a certain size) and have a sum of repulsion forces along the center to center line (higher repulsion the closer the neighbor...). Scale the repulsion to some small steps and add as a position adjustment each turn cycle. Emergent motion would slowly spread units (that are in too close proxomity) apart.