anyone know how to use the Andrew Pye A* lib??

Blitz3D Forums/Blitz3D Programming/anyone know how to use the Andrew Pye A* lib??

D_Town_Tony(Posted 2005) [#1]
I've been looking at the Andrew Pye path finding lib and am completely confused as to how to incorporate it into a game. I can't seem to figure out how to get a "bot" from their spot to another specific node. Anyone use these libs able to explain them, thanks in advance.


Nexus6(Posted 2005) [#2]
I am currently creating an editor for this lib which should be up and running within a couple of weeks. Unfortunately (like Andrews lib) it will not incorporate code which will move a "bot" from one node to another. The code was created to map out a level to enable A*Pathfinding to work, and its upto the coder to work out how to make his/her "bot" move to each node in turn.

You could place a pivot at the node and have your bot turn to face it (there's also code in the archives for turning an entity to point at xyz) whilst moving. When your "bot" reaches that node/pivot you then move the pivot to the next node along the path etc

By the way, the editor which I am creating, uses Andrew's A*Pathfinding lib to create a file which is then parsed into your main program via the fuctions provided, this will eliminate the need to include the A*Pathfinding lib (realtime A*Pathfinding can drastically slow a program, especially if you have lots of "bots")


D_Town_Tony(Posted 2005) [#3]
The problem I am having isn't getting the guy to move(I can work that out later), what I'm not understanding is how do you use the functions, how do you pick which node for the the path to start from and lead to, I'm literally having trouble incorporating the functions into a game.


WolRon(Posted 2005) [#4]
Have you read up on how A* works?

http://www.gamedev.net/reference/programming/features/astar/


Mustang(Posted 2005) [#5]
I suggest that you take a look at Turtle1776 excellent tutorial and sample code:

http://www.blitzcoder.com/cgi-bin/articles/show_article.pl?f=turtle177610292002201622.html

http://www.blitzcoder.com/cgi-bin/articles/show_article.pl?f=turtle177610292002202109.html


D_Town_Tony(Posted 2005) [#6]
I understand how A* works, I've read the tutorials, my problem is literally which functions in Andrew Pye A* lib do what,


WolRon(Posted 2005) [#7]
On the site I mentioned is a link to Blitz code for A* pathfinding. Why don't you just use that, it's well documented.