Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

penetrator

AI in flight simulation

This topic is 6172 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

Hi, i''ve managed to build a flight simulator which allow to fly several aircrafts (each one with its own flight model) on a quite large terrain. I''d like to build a one-to-one gun only mission, where i have to fly against a CPU enemy. The enemy goal would be to use aircraft controls and try to get at my six o''clock position to fire, but i don''t have a clue on how to start to transform my ideas into a sequence of C++ instructions. Could you give me some hints ? glHorizon_Project

www.web-discovery.net

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by penetrator
Hi, i''ve managed to build a flight simulator which allow to fly several aircrafts (each one with its own flight model) on a quite large terrain. I''d like to build a one-to-one gun only mission, where i have to fly against a CPU enemy. The enemy goal would be to use aircraft controls and try to get at my six o''clock position to fire, but i don''t have a clue on how to start to transform my ideas into a sequence of C++ instructions. Could you give me some hints ?




While this is not the C++ code you are asking for, it is a great hint.

Visit http://www.red3d.com/cwr/steer/ and study up on the Pursuit and Evade
behaviors. This will give you some high level ideas for behavior. There is actually
demo code (in java and C++) around the web for these behaviors (use google to
find them) that should help you better understand the implementation details.

This is only a start in a direction....

Good luck,

Eric

Share this post


Link to post
Share on other sites
quote:
Original post by Geta

While this is not the C++ code you are asking for, it is a great hint.

Visit http://www.red3d.com/cwr/steer/ and study up on the Pursuit and Evade
behaviors. This will give you some high level ideas for behavior. There is actually
demo code (in java and C++) around the web for these behaviors (use google to
find them) that should help you better understand the implementation details.

This is only a start in a direction....



To expand on what Geta said a bit, this is really only a start. It might help you build the AIs to fly in formations, and/or to have your (the human''s) AI wingmates behave fairly rationally. Combat per se will need to be handled differently in all likelihood.

One thing not very obvious from many games it that (good ones) often have more than one AI if truth be told. There''s a "search" AI, a "combat" AI, a "production" AI, etc. Your flight game will probably be the same.




Ferretman

ferretman@gameai.com
www.gameai.com

From the High Mountains of Colorado

Share this post


Link to post
Share on other sites
thanks for your help ! just for a start i managed to build the algorithm which let the CPU aircraft chase constantly the human aircraft, according to its position/orientation/speed. The algorithm works fine, now i have to introduce the flight model into the CPU aircraft, so that it behaves realistically (now it is just rotating about its 3 axis aiming its nose to the human aircraft, with no phisycs rules applied). After that i guess i''ll be at a good point, at least a good start point, but i understand A.I. is much much more, and there will be many many adjustments and improvements to study and experiment.

thanks again !

glHorizon_Project



www.web-discovery.net


Share this post


Link to post
Share on other sites

  • 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!