Best approach for unit enemy "awareness" in RTS?

Posted by Phil on Game Development See other posts from Game Development or by Phil
Published on 2010-12-28T19:41:56Z Indexed on 2010/12/28 19:59 UTC
Read the original article Hit count: 478

Filed under:
|
|

I'm using Unity3d to develop an RTS/TD hybrid prototype game. What is the best approach to have "awareness" between units and their enemies? Is it sane to have every unit check the distance to every enemy and engage if within range?

The approach I'm going for right now is to have a trigger sphere on every unit. If an enemy enters the trigger, the unit becomes aware of the enemy and starts distance checking. I'm imagining that this would save some unnecessary checks? What's the best practice here (if there's such a thing)?

Thanks for reading.

© Game Development or respective owner

Related posts about ai

Related posts about unity