AI: Attack, Defend, Retreat, Guard and Search - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: AI: Attack, Defend, Retreat, Guard and Search (/thread-2793.html)
AI: Attack, Defend, Retreat, Guard and Search - ynda20 - Jan 31, 2008 03:12 AM
I'm stumbling into the AI area, I have a team game where my team members are "helping" the player against the baddies. Effectively they are using the same AI as the baddies themselves except selecting the baddies for attack while the baddies select the goodies for attack.
If it was all out war then it would be one level of AI but trying to simulate a range of behavior is not so easy...
What I have so far is:
*Random walk and walk to particular destination
*Collision detection against walls and other sprites
*Fleeing behavior if character is hit (and hurt not killed)
Then comes the more aspiration behavior:
*Guarding an area and watching out for the enemy (easy except I still want the baddies to wander around a little)
*Attack enemy (move and shoot) easy
*Defend area (none stand and shoot) easy
*Retreat to new defensive position (retreating but still giving some covering fire) - tricky
*Searching for resources like health packs
The latter two require some form of path finding algorithm and cooperation.
Has anyone done any work in this area and have any pointers?
AI: Attack, Defend, Retreat, Guard and Search - maximile - Jan 31, 2008 05:30 AM
I'd have a look here to start with: http://www.red3d.com/cwr/steer/
AI: Attack, Defend, Retreat, Guard and Search - ynda20 - Jan 31, 2008 06:30 AM
Maximile, thanks. Wow that is a lot to wade through. So does everyone use Opensteer? Anything simpler? :-)
I noticed that Windows downloads 11000, Linux downloads 1100, Mac downloads 888. Roughly similar number of Mac and Linux developers but yet 98% of developers are on PC? This either means:
a) Hey, we're doomed! or
b) There is a great opportunity here!
I'll go for b) for the time being.
AI: Attack, Defend, Retreat, Guard and Search - maximile - Jan 31, 2008 07:18 AM
I don't like the look of Opensteer myself. But there's a lot of relevant links from that page (though many are now dead), and the Java demos are totally awesome. The explanations that accompany each one might be enough to get you started.
AI: Attack, Defend, Retreat, Guard and Search - SethWillits - Jan 31, 2008 11:29 AM
OpenSteer might be a liiiiittle hefty. It's neat, but I don't think you need it. All of what you describe can be done with a state machine and some simple algorithms. A* on some predefined navigation meshes will do. At least that's how I'd try to tackle it; It's exactly the kinda thing I've wanted to actually sit down and write again for quite a while.
AI: Attack, Defend, Retreat, Guard and Search - ynda20 - Jan 31, 2008 01:18 PM
I've learnt about A* for the first time today from the links from Opensteer. That seems to be the norm. I've just come across this page (via google) http://www.gameai.com/ which seems to be pitched at my level! :-)