Jump to content
  • Advertisement


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


Type of ai to use???

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

Just imagine your a kid and your playing with your transformers on a table top - thats the game i'm writing. A flat terrain (so no line of sight stuff needed) where two players fight it out. This is from a top down perspective, and its not your standard fighting game - its more like bomber man actuall. Right now the AI opponet is hard coded, it just gets a vector to the other player and walks that way and if close enough trys to kill you :D Now that all the collision detection etc is working my crappy bot is proving to be damn stupid and I want to improve him (no girl would play this game hahaha) to at least provide a bit of a challenge. Any suggestions for what type of ai to use or how to go about it??? [edited by - kaysik on June 5, 2003 6:56:17 AM]

Share this post

Link to post
Share on other sites
finite state machines are pretty simple to implement and they can provide pretty realistic looking actions.

simple FSM:

state wander
choose random number from -5 to 5
rotate that angle.

if see other player, goto state attack

state attack
if player is to left, rotate to left
if player is to right, rotate to right
if player is close enough, shoot gun (or whatever)

if player is not in sight, goto state wander
if energy level gets too low, goto state evade

state evade
make a 180 degree turn
run away

if energy gets high enough, goto state wander

- jeremiah


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!