   Keeping spaceships apart
  I'm making a space based RTS game (2D). There are bunch of space ships that the player controls, e.g. he selects them and orders to move to some new location.Now, when the spaceships arrive at the new location I want to put some space between them.It's OK that they overlap each other while traveling, but not when stopped.What's a simple way to accomplish this?(I have no physics system.)   
  Several options. When you group a set of units, assign one as a lead, and sort the rest. Then develop a method of simple formations.+++1+++++2+3+++4+5+6+7+8+9+10Or something similar.That, or pick a leader/head of the 'flock' and write a sorting method that will let the other ships find their own open slots around the leader. Each would find the closest open space near the leader.   ;Quote:Original post by TalrothSeveral options. When you group a set of units, assign one as a lead, and sort the rest. Then develop a method of simple formations.+++1+++++2+3+++4+5+6+7+8+9+10Or something similar.That, or pick a leader/head of the 'flock' and write a sorting method that will let the other ships find their own open slots around the leader. Each would find the closest open space near the leader.I'm not really looking for flocking.All spaceships move from A to B, in euclidean space, linearly, equally.Once a spaceship arrives at B, stops, then the game should ensure that overlapping spaceships are somehow kept apart.   ;Quote:Original post by appelOnce a spaceship arrives at B, stops, then the game should ensure that overlapping spaceships are somehow kept apart.That's exactly what Talroth solved for you. Have all your ships move linearly and equally from A to B, then have them stop. Assign all the ships an ID, sort based on the ID, and then use the ID to implement whatever formation you want.