Sign in to follow this  
jhoward

collision detection / collision avoidance for RTS games

Recommended Posts

I'm writing an RTS game for my university project, and I've got quite far in developing the game. You can click here to watch a youtube clip. I can think of two ways of implementing collision detection in an RTS game: 1) The 'old school' way (think Warcraft 1/2) Each unit occupies a single tile, and only one unit can occupy a tile. This basically restricts each of the units to a grid. The advantage of this is that it is very easy to implement and it is fairly stable. The disadvantage is that for modern games it looks horrible. The movement of your units become very mechanical as they stick to the grid pattern. 2) A more modern approach (think empires: dawn of the modern world, most 3-D RTS games) Every unit is free to walk around the game area and is not restricted to the grid based movement. The advantage is that it looks very fluid and natural. The disadvantage is that its much more difficult to implement. The approach I have currently implemented is the second one. Each unit is modeled as a sphere, and I use a simple collision detection technique. The problem is that I often get problems when large crowds of units are clumped together. As they all try to move, they end up pushing each other around etc. I have observed in "Empires: Dawn of the Modern World" that it seems to be using more of a 'collision avoidance' technique. Where each unit tries to walk away from surrounding units, although however in some cases they walk straight through each other. Can anyone advise me of the best way to implement collision detection/avoidance for this type of game, and how a collision avoidance tends to function? James

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this