The source code is here: http://www.policyalmanac.org/games/aStarTutorial.htm

Can anybody help as to what code needs to be added to enable this pathfinding algorithm to work with a isometric 2d tile map which is based completely on this XNA tile map tutorial: http://www.xnaresources.com/default.asp?page=Tutorial:TileEngineSeries:4.


I just need a working pathfinding for isometric map that I can use, if you can help then that will be good. or you know any libraries available as AI isn't really my area

thank you

I do not know of one built into XNA. A great resource thour is the book Dante Treglia's Game Programming Gems 3. Section 3 part 6 is a greate article and code on Tactical Path-Finding with A*. A* is a generic search algorithim that is used with a cost function and a heuristic function to compute the shortest path. I like the article in this book because the cost is based on time (shortest path) AND threat level from enemies. Hence, it finds the short and safest path. In your game, you would have a move command and attack move command. Don't use the threat level for attack move so you do not ignore enemies, but straight movement commands should. Take a look.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.