Jump to content
  • Advertisement
Sign in to follow this  
0xfefefefe

search fire of line algorithm

This topic is 4006 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I writing an RTS AI and have some problem with searching fire of line. Unit can shoot to target if it's in shooting range and there is the fire of line without any obstacles. If unit deciedes to attack target without fire of line, he should search it. To do that I send unit to target and stop him when fire of line appears but in this way distance to target may be too close. :( Designer wants unit not getting closer than it's necessary. I can't exactly say that in some point unit can shoot to target if he is in another point, but i can do it probably. :) How to find that optimal point to send unit there.

Share this post


Link to post
Share on other sites
Advertisement
You can do a normal graph search, but instead of the destination being a particular location, the destination is any location with a clear line of fire. The condition for the goal just needs to be changed to do a line of fire test.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!