I know I said I'd do this like 2 weeks ago.. but I did all the work to write
it then got lazy about posting.
http://www.bluecadaver.com/mud/track.c

The important part of this snippet is the find_path function.
The do_track included is just an example and pretty weak.  If you already
have the track snippet, you might be better off using your do_track and just
change the find_path to mine, which is obviously superior ;)

Jason got good returns (faster than the usual track snippet) tracking across
one of his uber giant wilderness areas.
I've seen a much larger (80-90%) improvement using it to track through stock
ROM style areas.

It also should give better paths, since it's not an in-order traversal of
the map like the other snippet, instead it looks at every room at each depth
until it finds the right one, assuring the shortest path.

Hopefully someone likes this and uses it :)

--Palrich.


Reply via email to