Thanks, tonyg. Although, taking out the *10 makes for a very...
"square-edged" path that ends up being a less-efficient path.
You can run it to see what I mean.
The Diagonal heuristic, however is very, very nice. It
consistently finds the more direct route compared to
Manhattan, AND it opens far less nodes in the process! This
AStar stuff is amazing.
FlameDuck: Yeah, I can see this working much better on a
dense bunch of nodes, BUT i've decided to trash the original
node-web system and use a grid.
It's a much better idea, because I can take the collision
mask of my level and create a grid on-the-fly for the A* to
use. Because my terrain is going to be generated at random,
and then heavily modified during gameplay, I can't really
see how my web system would work at all.
"square-edged" path that ends up being a less-efficient path.
You can run it to see what I mean.
The Diagonal heuristic, however is very, very nice. It
consistently finds the more direct route compared to
Manhattan, AND it opens far less nodes in the process! This
AStar stuff is amazing.
FlameDuck: Yeah, I can see this working much better on a
dense bunch of nodes, BUT i've decided to trash the original
node-web system and use a grid.
It's a much better idea, because I can take the collision
mask of my level and create a grid on-the-fly for the A* to
use. Because my terrain is going to be generated at random,
and then heavily modified during gameplay, I can't really
see how my web system would work at all.