Alex Rivera | Logout

C# XNA: AI Engine?

Asked 2010-03-25T22:26:15.017
9

I'm developing a game with zombie running around in a swamp. I want AIs to have functionality like "chase this target" or "run away". A major stumbling block is pathfinding. Is there a good pathfinding/AI engine in XNA, or should I roll my own?

Does anyone have any experience with this: http://www.codeplex.com/simpleAI?

Edit
Report

3 Answers

4

you may want to look for A-Star algorithms... here is an article that talks about it in the context of a winform, but mentions XNA.

answered 2010-03-25T22:32:38.563
3

Roll your own! Seriously.

I take it you're making this game as much for the enjoyment of coding, as you are hoping for fame and riches? Pathfinding is one of the staples of AI, and is a well studied and documented topic. It is an excellent introduction to a field you'll need knowledge of in future game endeavours.

The A* Algorithm (as mentioned by others) is the standard solution to this problem - but try other approaches: line-of-sight, scripted movement, flocking... often you can derive interesting behaviour from combining a few techniques.

For a book on the subject, try AI For Game Developers - not the best in the field, but certainly an accessible introduction for the lay-coder.

Have fun mucking about with the zombies!

answered 2010-03-26T15:14:32.717

Your Answer