Jump to content
  • Advertisement
Sign in to follow this  
walle

Enemy AI

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

Hello. I'm currently trying to get some insight in AI, I'm making a pac-manish game to learn AI. I tought about making the enemies use the A* pathfind algorithm. Becuse I've seen this demo clicky but it feels a little like overkill. What do you think? //walle

Share this post


Link to post
Share on other sites
Advertisement
A* is a good pathplanning algo, but it can become expensive if you have many agents using it on a large map. I'd see how it works within your game, if its not too slow or cumbersome, go for it. But you could probably get away with a cheaper algorithm

Share this post


Link to post
Share on other sites
A* is very very very fast.

if you manaage it properly (witha amanager, using non-complete paths, ect) you can pathfind for large amounts of units (100 thousand?) units simultaniously. (quickly too)

Its also pretty simple to understand.

From,
Nice coder

Share this post


Link to post
Share on other sites
Ok...can anyone give some examples of other algorithms, names is enough...can google for it then =)

Feels like A* now...but we'll see.

Share this post


Link to post
Share on other sites
One PacMan AI that I've seen which was actually very impressive in its simplicity and effectiveness was to move toward the player X% of the time and in a random direction (100-X)% of the time. Each ghost had a slightly different fraction of moving toward the player, and X became closer to 100% as you moved up the levels.

-Kirk

Share this post


Link to post
Share on other sites
Quote:
Original post by walle
Ok...can anyone give some examples of other algorithms, names is enough...can google for it then =)


Of course.. A (the parent of A*), bi-directional A and A*, breadth-first, bi-directional breadth-first, Dijkstra’s algorithm, depth-first and iterative-deepening depth-first just to name a few. There are of course many many others and obviously a numerous number of variants for any of them (normally you would adapt them to your needs - for speed and efficiency).

Share this post


Link to post
Share on other sites
Sign in to follow this  

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