|
-
cheers guys! I thought you lot might like it!
I've updated it for isometric. check
http://www.pointsinspace.com/pathfin...grid-astar.swf
http://www.pointsinspace.com/pathfin...grid-astar.fla
in answer to some questions :-
why does it pick a diagonal?
it doesnt! It picks a random square from the 3 available to it. Just click on generate path a few times and sometimes it will go straight or left or right! I need to put some sort of direction weighting there.
Why does it recalculate the path?
Well this is very useful especially if you are using something like this with a multiuser system <grin>. So an avatar could re check its path if some other avatar jumped in front of it.
The algorithm is very very clunky and I hope to get it faster so if anyone is good at optimizing code i would love to hear from you.
bada bing!
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
|