AI pathfinding nodes

I started writing an A* pathfinding system with branching nodes, each node is linked to it's closest eight nodes for more efficient path plotting. I wrote a script that would cycle through them and link them to their eight closest nodes who's paths don't intersect walls or obstacles. Above is the turn out when I got it right, below is the result when I accidentally required rather than disallowed raycasts intersect with walls and obstacles.

Two more examples, above just two links each, below is four which is probably the one I'll stick with for speed.

No comments:

Post a Comment