RTS Movement + Navigation + Destination

Posted by Oliver Jones on Game Development See other posts from Game Development or by Oliver Jones
Published on 2014-05-21T14:38:06Z Indexed on 2014/08/19 22:35 UTC
Read the original article Hit count: 507

Filed under:
|

I'm looking into building my own simple RTS game, and I'm trying to get my head around the movement of single, and multi selected units. (Developing in Unity)

After much research, I now know that its a bigger task than I thought. So I need to break it down. I already have an A* navigation system with static obstacles taken into account.

I don't want to worry about dynamic local avoidance right now. So I guess my first break down question would be:

How would I go about moving mutli units to the same location. Right now - my units move to the location, but because they're all told to go to the same location, they start to 'fight' over one another to get there.

I think theres two paths to go down:

1) Give each individual unit a separate destination point that is close to the 'master' destination point - and get the units to move to that.

2) Group my selected units in a flock formation, and move that entire flock group towards the destination point.

Question about each path:

1a) How can I go about finding a suitable destination point that is close to the master destination? What happens if there isn't a suitable destination point?

1b) Would this be more CPU heavy? As it has to compute a path for each unit? (40 unit count).

2a) Is this a good idea? Not giving the units themselves a destination, but instead the flock (which holds the units within). The units within the flock could then maintain a formation (local avoidance) - though, again local avoidance is not an issue at this current time.

2b) Not sure what results I would get if I have a flock of 5 units, or a flock of 40 units, as the radius would be greater - which might mess up my A* navigation system. In other words: A flock of 2 units will be able to move down an alleyway, but a flock of 40 wont. But my nav system won't take that into account.

I would appreciate any feedback. Kind regards,

Ollie Jones

© Game Development or respective owner

Related posts about movement

Related posts about rts