How about building formations from 'row' types
A row would store a start & end position, and a unit count. Then simply assign your soldiers to the rows until the're full. Draw the soldiers evenly spaced out between row start & end.
If some of a rows soldiers were to get killed, you just space out the exisiting rows soldiers accordingly, and if they reach a low threshold count, then move some soldiers from another row to the one that needs bolstering e.t.c
Am I on the right track? :)
A row would store a start & end position, and a unit count. Then simply assign your soldiers to the rows until the're full. Draw the soldiers evenly spaced out between row start & end.
If some of a rows soldiers were to get killed, you just space out the exisiting rows soldiers accordingly, and if they reach a low threshold count, then move some soldiers from another row to the one that needs bolstering e.t.c
Am I on the right track? :)