Advertisement

Type of ai to use???

Started by June 04, 2003 08:06 AM
0 comments, last by kaysik 21 years, 5 months ago
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]
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

inlovewithGod.com

This topic is closed to new replies.

Advertisement