BahamutoD / BDArmory

Gun turrets and other weapon systems for KSP
38 stars 112 forks source link

Ai smarts #25

Closed ferram4 closed 8 years ago

ferram4 commented 8 years ago

Lots of changes to the AI to try and make it fight better, though it's probably not finished and requires testing. Includes:

Also, bugfix for the gun ripple code not allowing full RoF, instead limiting based on framerate.

ferram4 commented 8 years ago

I added some extra code to ensure that AI that are attacking an opponent and simply can't follow it through a turn due to too much speed simply extend. I also added a "target suitability" selection for the standard GetAirToAirTarget method that tries to rate targets based on how close they are and the plane's orientation; this combined with extending allows AI to simply decide to go after another target after passing the one they were engaging.

The only thing I want to try adding next is something to dynamically adjust the extension range based on enemies around the AI. I had a situation where an AI mortally wounded a target, overshot and extended and should have immediately engaged and head-on attacked another target that was 400 m away, but instead extended past it and allowed it to sit on its 6. Then I believe it will be good to be merged.