2
\$\begingroup\$

I'm working on a 3D game in Xna in which there is my jet which I am controlling. I want to add other jets as enemies. For that I need their AI so that I could have them able to target my jet. I've searched Google but couldn't find good resources. I hope professionals here can help me with my project.

\$\endgroup\$
1
\$\begingroup\$

Likely the simplest way to achieve this is to give your enemy jets some steering behavior. Particularly the a pursuit steering algorithm, with some avoidance Autonomous and follow behaviors tied in. There's an excellent paper on Steering Behaviors For Autonomous Characters. With it you'll be able to glean the information needed to implement steering in your own game. I recommend starting with basic pursuit steering and evolving it from there. Using an offset pursuit algorithm will ensure you don't have enemy airplanes kamikaze-ing into you. Something like this:

enter image description here

Where your plane is the center of the white circle.

You can see a live example of a similar behavior here. Also giving a enemy jet the flee behavior when they're targeted will make it a little more challenging to hit. (Have them flee from the firing cylinder that represents the kill zone in front of your plane)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.