Pathfinding DLL

Blitz3D Forums/Blitz3D Userlibs/Pathfinding DLL

Knight #51(Posted 2009) [#1]
Hey Guys,

I'm working on an open-source AI Pathfinding DLL. The only thing I'm not too sure on is how to create a bank and use poke/peek commands with it in C++. Could ya'll post some examples please?

p.s I already tried to Google it for thirty minuits.


Naughty Alien(Posted 2009) [#2]
..thats very very good idea...what commands will be included in to DLL??


ZJP(Posted 2009) [#3]
Good idea.
There is a tuto and a Blitz3d ( C++ too ) example here : http://www.policyalmanac.org/games/aStarTutorial.htm .A good option, the C example > Dll ;-)

JP

PS : http://www.policyalmanac.org/games/AStar.zip


MikhailV(Posted 2009) [#4]
Great idea! A* for single object and groups will be good.


Knight #51(Posted 2009) [#5]
Tanks ZJP :D

what commands will be included in the DLL?


Hmmmm.......I don't have alot yet, I'm still planning it out.

Here is a list of prototypes.
BBDECL int BBCALL CreatePath(const char *Name, int Waypoints); //creates a path
BBDECL const char * BBCALL GetPathName(int Index); //returns the path name of the entered index
BBDECL int BBCALL FindNearestWaypoint(char *Path, float x, float y, float z); //returns the index of the nearest waypoint in the desired path
BBDECL int BBCALL SetWaypointPos(char *Path, int WP_Index, float x, float y, float z); //sets the position of desired waypoint in desired path

Sudjestions welcome.


Knight #51(Posted 2009) [#6]
Hmmm.....A* appears to be a "2D" pathfinding system. Maybe I should make a 2D lib intead of a 3D. Hmmm......just ignore my previous post (just the function prototypes, not the part where I thank people). Ok. It's been decided.................................I'll make a DLL for A*


Naughty Alien(Posted 2009) [#7]
..I thought it is pathfinding for 3D what will be great stuff...eehh


Knight #51(Posted 2009) [#8]
I guess you're right, but I'm going to start with 2D for I'm new to programming AI.


Doiron(Posted 2009) [#9]
Hmmm.....A* appears to be a "2D" pathfinding system. Maybe I should make a 2D lib intead of a 3D. Hmmm......just ignore my previous post (just the function prototypes, not the part where I thank people). Ok. It's been decided.................................I'll make a DLL for A*

As long as you use nodes instead of a grid, A* can be used for everything. It's just that most of the examples use a grid, where basically each cell is a node with eight links...


Knight #51(Posted 2009) [#10]
Thanks Doiron, but I'll still start with 2D.


Sake906(Posted 2009) [#11]
You are wrong Gizy. With the right implementation, A* can work well in 3D, you simply need to have a 3D grid instead of a 2D grid and allow the pathfinder to iterate through the nearest nodes towards the objective point.


Mike0101(Posted 2009) [#12]
Yes, A* is right for 3d too.


Knight #51(Posted 2009) [#13]
Ok. But I still want to start with 2D. Once I get that down, I will make a 3D one.


vivaigiochi(Posted 2010) [#14]
ok. but where is the lib?


Knight #51(Posted 2010) [#15]
Sorry guys. This thread was a failed attempt. It was way over my head at the time. I didn't have enough experience. I should have let you all know sooner. My apologies to everyone :(


patmaba(Posted 2010) [#16]
Another idea is to set a the path algorithm.

A*, Dijkstra, ...

examble

Algo parameter where algo is a domain
0 = A*
1 = Dijkstra
2 = ..
3 = ..

BBDECL int BBCALL CreatePath(const char *Name, int Waypoints, in Algo )