collision detection / collision avoidance for RTS games

Started by
2 comments, last by jhoward 15 years, 8 months ago
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
---Current project: Warring States, an RTS gamehttp://warring-states.blogspot.com/
Advertisement
James I'm facing the same problem as you.
If you find any reliable solution I would be interested :-)
Gamasutra link.
Thanks for the link, I'm reading it now
---Current project: Warring States, an RTS gamehttp://warring-states.blogspot.com/

This topic is closed to new replies.

Advertisement