adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Re: Pathfinding


From: Frederico Cerveira
Subject: [Adonthell-devel] Re: Pathfinding
Date: Mon, 23 Feb 2009 22:28:25 +0000

I had the chance to think about the pathfinding a little bit more and
there's something else that will be important to have: an event to
notify us when the goal is reached (or the path turns out blocked)

I'll try to do that.

Get it from CVS and see it in action in test/path_test.

The test has 3 pre-defined positions to find, so everytime you run the test it should  show a different path.

The code uses the well know A* algorithm, and divides the world in 40x40 grids.
For those who know a little about A*, the open list is implemented as a priority queue, and there is a hash map that stores all the used nodes (either in the open or closed list).
It only supports searches where the character and the target position are in the same z axis.

-Frederico Cerveira
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]