There seemed to be a little disappointment that my A* demo wasn’t actually searching in 3D. Maybe I should have called it A* visualized in 3D. At any rate I’ve revamped things and now have a demo that does search in 3D.
It wasn’t much of a stretch to get things working in the third dimension. The only thing I found particularly tricky was making sure that the path didn’t cut through a solid corner — move diagonally adjacent to a non-walkable node. Besides that everything was pretty straight forward. I also took the time to make sure the code was clean and at least somewhat documented. I haven’t bothered to try to do any optimization and I certainly haven’t put much time into splitting the functionality into proper objects. Nonetheless, here’s the source.
Note that you’ll need to add to your class path Away3D as well as Zeh Fernando’s Tweener w/ Bezier support which powers the animation in 3D.
Enjoy!
July 3rd, 2007 at 10:13 pm
Well, what the hell? This is amazing and certainly blows any criticism the previous version had
It’s a great/easy block editor too, very well done.
Thanks for that (and you even provide the source). Terrific.
July 3rd, 2007 at 10:22 pm
I owe you a thanks. I probably wouldn’t have bothered working on this if it wasn’t for your comment.
July 4th, 2007 at 12:38 am
[…] Published July 4th, 2007 Actionscript 3.0 , Web developer , Flex , 3D , Flash Actionscript Architect released very nice implementation of A* path search algorithm for Actionscrip…. Example lets you create 3D maze and point to start and end node of path. Great work, as author […]
July 4th, 2007 at 2:10 am
[…] here, to check his post and download […]
July 4th, 2007 at 4:17 am
Bravo! That’s amazing.
That was already great yesterday by the way. We’re very demanding
Thank you.
July 4th, 2007 at 9:37 am
[…] in AS3 July 4th, 2007 — drawk The actionscript architect Paul Spitzer has posted two killer demos of pathfinding using A* in AS3/Flash 9 using the Away3D engine (derivative of Papervision3D that is taking off). These demos not only […]
July 4th, 2007 at 10:03 am
[…] ActionScript Architect came up with a pathfinding demo in 3D. It’s pretty insane and it uses AS3. You can grab the source and example files from the blog post. […]
July 4th, 2007 at 4:03 pm
[…] Link: A* in 3D Blog: ActionScript Architect […]
July 5th, 2007 at 6:34 am
[…] I’m looking forward to have some times to look at the source, btw I’m wondering if it is the shortest path taken or not? Also why doesn’t it follow exactly the cube structure, the path seems to take “air” sometimes. Anyway this is a great job. […]
July 6th, 2007 at 5:53 am
[…] actionscriptarchitect.com - A* 3D - No, really, it’s 3D/ […]
August 1st, 2007 at 4:49 am
Isn’t A* supposed to find the shortest path? I made a test that got a 10 step path from your algorithm. The shortest would have been 8 steps… could this be a bug or did I miss something?
August 1st, 2007 at 7:30 am
I’ve noticed that it doesn’t always find the shortest path as well. Likely an oversight in the implementation.
November 24th, 2007 at 9:09 am
[…] Actionscriptarchitect.com findet man eine A* Wegfindungsroutine - leider in ActionScript - welche hervorragend umgesetzt wurde aber durchaus auch in JavaScript […]
February 5th, 2008 at 12:13 am
very good 3d *A
February 21st, 2008 at 8:40 am
this is great! it would be even cooler though if you could make a version where the ball can move along the ground and tops of the boxes, and can only go up a certain number of squares to get over boxes in its way.
February 21st, 2008 at 9:01 am
Yeah, definitely, with physics even.