|
-
Senior Member
it finds all paths and stores them in somoe sort of array, and then at runtime it just looks them up in the array?
Yes, thats right.
do u need to calculate the path before each movement
No, you need to calculate the path only once. As soon as you finish designing the map, you can calculate it once and no one ever has to calculate it again.
u only needed to look into it? that is if the map doesent change...
That's how it works. Go ahead and get to the final step. Lay down a start and end position, find the path. Then click on the start or end position and move it (just click on it to make it go away, click again to set it down somewhere else) you can do that all day long without recalculating. That's the whole point 
This is a cleaned up version of the same tool I used to solve the attached map. In the Flash IDE, it took only 10 milliseconds to walk the entire path. Have fun!
Edit: Doh! It didn't save the attachment, here it is...
Last edited by webgeek; 01-25-2004 at 04:55 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|