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.

Howdy, Stranger!

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