Jump to content
  • Advertisement

Archived

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

Aph3x

AI Vehicle control

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

Not really AI, more a design question: How do people here implement the control of AI vehicles to stay within the bounds of the vehicle''s manouevreability parameters (e.g. turn rate, simulated inertia/turn rate delta), for example the turning of a boat? I''ve tried two approaches: a) Fake it basically: calc heading change from current hdg and target position. Cons: Rather complex to keep within the manouevreability bounds! b) Send an input message through the same code path as user input (e.g. fake left cursor input). Cons: Hard to stop the vehicle overshooting the correct target heading, esp with large inertia!

Share this post


Link to post
Share on other sites
Advertisement
Normally I *try* to go for option 2 wherever possible - it yields a more "fair" game if the AI is using the same vehicles the player uses. The math usually isn''t TOO icky with inertia - you can probably fake the calculus close enough with approximations so you can ignore integrals.

Another thing that CAN work if you are careful is a hybrid of the two approaches. This works best if the player can''t strictly compare the performance of his (identical) vehicle with the AI''s. Let the AI get as close to the desired results as possible through standard inputs, but apply a small "fudge" factor to keep it within a desired window of behavior. That can make up for small deficiencies in the AI, but don''t use it to cover over gross errors.

Share this post


Link to post
Share on other sites
Hmm yes - I'm thinking (b) will be easier so far.
Tweakage required as usual

[edited by - aph3x on May 11, 2004 7:18:48 AM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!