> > >
# Forums You may post here on any subjects related to this site or the software therein. (Most everything on this site is tied into the forums so that you may leave or post comments about it.)
## RE:Pathfinder2d: Where is the shortest path saved? `From: Lewis A. Sellers` `Date: November 10 2003 1:10 PM` |
A good question. (Tries to remember.) As I recall, what I did was that since I had to reference the map data anyway, I stored final movement for that method in routes. The heap/nodes are only used when computing the path. (Thinking back.) The routes are stored (I believe for that method) in reverse order, ie from end to start (a by product how how the routes are generated). So to use them you have to compute the beginning point then flip directions around 180. There actually is go in there that already does that as a final operation before the pathfinding ends. Don't have access to the code at the moment, but it should be about the last function in the AStarHeapInteger class (I think). Help at all? (Note: I've been gearing up to take the Java certificate exams so I was seriously thinking about ripping that same alg out and porting a simple, clear version to Java for the experience.) --min
`Copyright © 1997-2006 by Lewis A. Sellers.` Login