At any given moment a object has a position (x,y) and a velocity (vx,vy). Using a formula like rate*time=distance, you can guess what an object's position in the future will be: (x+vx*t, y+vy*t), where t is the number of seconds in the future. If the object's velocity does not change then the guess will be 100% correct.
So checking in the future just means to move the objects to where they will be, check for overlaps, and then move them back.
For formations each object has it's own goal, which is pretty straightforward.
Collision response is what will allow units to not walk over each other or not walk over the walls.
For units this is done by finding the distance between each pair of units and just move each away from each other if they are two close.
For units against walls you find the distance to each side of the wall and use the closest side to push away from. This distance calculation is the distance from a line to a point, which is different from the distance from a point to a point.
https://dl.dropboxusercontent.com/u/542 ... find2.capx
Thank you so much for all your help. I ultimately decided I will go with pathfinding. Since setting rotation to very high number got rid of that annoying delay, I wander if your technique of units not stepping in to each other would work with pathfinding too?