• Advertisement
Sign in to follow this  

Simple pathfinding system

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

I would like to implement pathfinding AI for an FPS game. As of now, my monsters simply walk directly toward the player. If they hit an obstacle, they simply keep walking, banging their head on the wall! What I am really looking for is a means of determining the best direction to go in order to reach the destination without hitting a wall. Given: Player's position, list of all obstacles with dimensions, monster's position. Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
When I read the title I was going to suggest something really simple.

But after reading your post, I think that A* is your only solution, or at least the only feasible one.

Check the articles of this site about pathfinding

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
A* isn't really absolutely necessary for pathfinding. A more fundamental problem for a fps type game might be building a map for the AI to use. Picking nodes, finding paths between nodes, and then moving from one place to another is simply a matter or going to a node and following the paths from node to node to get to the destination. To find a path from a starting node to an ending node, A* can be used, or a simpler algorithm like depth first search.

Share this post


Link to post
Share on other sites
There are a few ways to pathfind from "A to B".

You should do a Google search on Pathfinding.

If you want in depth coverage of graphs / pathfinding methods, you might want to read Artificial Intelligence: A Modern Approach

To get some fun to read book with complete examples on how to use pathfinding and path following techniques that take care of dynamic obstacles, I highly suggest you to pick up Mat Buckland's excellent Programming Game AI by Example

Hope this helps

Eric

Share this post


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

  • Advertisement