As of this post, I have no actually implemented A* in ActionScript. What I have done is to implement a mechanism to draw and manipulate a relatively straighforward graph. This graph has the edges layed out in a regular, rectangular, pattern.
Here is a SWF of what I have so far:
Click to block/unblock a node, and press space bar to alternate between different modes of selecting a node. Eventually, the blue square will be for the starting position, and the green square will be for the ending position. Once I finish implementing A*, the path between start and end will be drawn in red squares.
Most likely if you are reading about my implementation of A* in ActionScript, you are interested in seeing my code. At this point, the most interesting thing will be how I keep track of adjacency lists for each node.
I will make another post when I finish everything, but I like making things available as I work so I can view my own progress. Here is a .zip of all the files for my project so far. I ask that if you use them, please somewhere link to my blog and email me so I can get some satisfaction.
No comments:
Post a Comment