AI do i have a clear shot function - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

AI do i have a clear shot function

I am currently working on a 2D 3rd person shooter in VB6. My computer players need to be able to check to see if the path to their target is free of obstacles and freindly players. my current method is to create an imaginary bullet and loop it through its course to see if it hits anything before it strikes its target. However, this results in a loop that can have a maximum of a about 2000 iterations. Obviously, this is not a very efficient way of doing this, especially when you consider that there could be a max of 10 computers with three guns apeice doing this sixty times a second. It's so bad that on my athlon 64, i average 11 fps at max load. Is there a faster way to do this?
Sign In or Register to comment.