Program Announcements / Astar pathfinding Dll |
| Author | Message | ||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
![]() IA::Astar
Hello, I have written a dll in order to use pathfinding in game (astar algorythm). I have learned a* algorythm with the very good article of Patrick Lester (at the address http://www.policyalmanac.org/games/aStarTutorial.htm ) Afterthat I have downloaded the exemples and have translated the code and implement the result in my own system. So I would like to thank Patrick Lester for his very good article (and his very good exemple). My system resembles much of P.Lester's exemple. Features: Current version : v1.0 The version 1.0 is out ! Notice that one file from the doc still need translation... Commands: + Code Snippet Important Note : the dbpro files and the dll are not free of bugs. You use it at your own risks.The files are provided 'as is', without any warranties of any kind. A complete license is included in the documentation. Dbpro Version 6.6b or 7.0 recommended, but should work with older and younger versions. If you have any questions, remarks or bugs , you can contact me at info-tibo@orange.fr. Warning ! You must write the subject of your mail with the mention "[Dbp]" (for antispam) if you send me a mail. Videos: Youtube video astar v0.6 Youtube video astar v0.9 (2d application, french subtitles) Screenshots: Version 1.0
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Downloads: Have fun ! ~Darktib |
||
| Back to top |
|||
|
Atreides
User Joined: Sat Oct 11th 2003 Location: Switzerland (but NOT on a mountain !) |
Quote: "2) If one knows how I may do in Code::Blocks for send a string to dll (the tutorial 'Third Party Commands' indicate 'LPSTR', but it doesn't work)."
Il y a quelques temps, j'ai écrit un tutoriel expliquant comment faire des DLLs avec Code::Blocks : http://www.games-creators.org/wiki/Cr%C3%A9er_des_DLLs_en_C_pour_Dark_Basic_ProIl y a une partie qui concerne la conversion des types DBP vers C et vice-versa. Pour ce qui est des strings, c'est un peu tordu : quand une fonction en renvoie un, il faut détruire d'une certaine manière celui envoyé en paramètre - je n'y ai pas encore jeté un oeil. Par contre, pour envoyer un string comme paramètre, c'est tout con : char* The sleeper must awaken ! |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
Sauf que ca marche pas... gcc compile bien mais apparement dbp ne comprend pas... (en plus j'ai appris a faire des dlls en lisant ton tuto Sur le tuto de TGC ils dise que c'est "LPSTR"... Enfin...je vais retester. En passant, si tu savais comment rajouter des lignes et des colonnes a des tableaux en C++ ce serait cool. RTS game project : 1% finished |
||
| Back to top |
|||
|
Atreides
User Joined: Sat Oct 11th 2003 Location: Switzerland (but NOT on a mountain !) |
C'est bizarre que ça ne fonctionne pas chez toi. Tu es certain de ne pas avoir fait d'erreur ? LPSTR signifie "Long Pointer String", c'est parfaitement identique à un char*. C'est juste qu'un bonhomme a trouvé utile de changer les noms des char*... Jette un oeil à ceci : + Code Snippet + Code Snippet Ca passe sans problème chez moi. Si tu as définit ton tableau "type arr[32][24]", tu ne peux pas modifier ses dimensions. Par contre, si c'est un type **arr, tu peux utiliser realloc. A vue de nez et sans tester... Allocation : + Code Snippet Réallocation : + Code Snippet J'évite d'utiliser new, j'ai rencontré des problèmes avec cette commande. Elle ne fonctionne pas lorsqu'on demande d'allouer beaucoup de mémoire (pour des traitements de données numériques, il m'arrive d'avoir à allouer près d'un giga). Malloc ne m'a jamais laissé tomber The sleeper must awaken ! |
||
| Back to top |
|||
|
dab
User Joined: Wed Sep 22nd 2004 Location: You Temp Folder! |
oh yea... Totally. How could I forget that?? But if it works really well, I think I'd find this usefull. |
||
| Back to top |
|||
|
thebulk71
User ![]() Joined: Mon Jan 2nd 2006 Location: takin a poop |
Nice... can this be adapted for a 3D environment? ( Ce serait genial... et encore felicitations pour le bon travail... ca fait plaisir de voir que les francais sont encore present sur ces forum ) |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
@thebulk71 : Yes it can be adapted for a 3d environment (for exemple I have coded this dll for my 3D RTS project...) @all: I have some bugs, but I think I can put the version I have on the forum. @Atreides: J'ai modifié les options de GCC et ca fonctionne maintenant parfaitement.Merci pour ton aide (et ton tuto The help files are not in the zip (because I haven't the time for write these actually) RTS game project : 3% finished |
||
| Back to top |
|||
|
Ian T
User ![]() Joined: Thu Sep 12th 2002 Location: Around |
How's the speed compared with internal DBP systems such as Ian M's A-star example? |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
The speed depend of the pathlength and the computer : for a path which the pathlength is <= 400 waytiles that searchpath function takes 0~2 ms; for paths that pathlength is >400~450 waytiles it takes 2~10(10 is a max) ms. I don't know how is the speed of DBP internal system so I cannot help you on that point. Hope this can help you, ~Darktib PS : Sorry if my english is bad - I'm french RTS game project : 3.2% finished |||% |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
Version 0.9 will be out the latest week of november, if I have the time I want. RTS game project : 3.2% finished |||% |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
[deleted] RTS game project : 3.2% finished |||% |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
Kohaku
User ![]() Joined: Mon May 3rd 2004 Location: The not very United Kingdom |
Looks awesome. I may find myself using this at some point. Your English is good by the way. ![]() You are not alone. |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
FERSIS
User Joined: Wed May 17th 2006 Location: Cyberspace |
It works with GDK ??? cheers |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
El Goorf
User Joined: Sun Sep 17th 2006 Location: Uni: Manchester, Home: Dunstable |
wow, awesome tutorial, interesting read, ty. http://notmybase.com All my base are not belong to anyone. |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
FERSIS
User Joined: Wed May 17th 2006 Location: Cyberspace |
This is the code that Ian T was talking about: http://www.thegamecreators.com/?m=codebase_view_code&i=56984d6fa64dd67ceb1e01c8d835c957 Its pretty fast and stable. |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
FERSIS
User Joined: Wed May 17th 2006 Location: Cyberspace |
Could you be nice , and give us an example for GDK ? Because my attempts to make it work ,failed misserably. dbLoadDLL on GDK dont work very well so i used IanM's snippet + Code Snippet But it doesnt work.It crashes when i call SetAstarEngineMap So any example of this great looking DLL on GDK will be a good news for me. Cheers |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
I will test your code, and give you the solution if I find. Have you a short description of the dll commands in gdk ? It could be very useful Normally, you load the dll, and call the dll functions exported. So, IA::Astar dll functions are not FunctionYY@@-I-don't-know, it's z8Functionii, or similar, because its compiled with GCC. |
||
| Back to top |
|||
|
Ian T
User ![]() Joined: Thu Sep 12th 2002 Location: Around |
Would it be possible for you to adapt this extention to work with predefined nodes in 3d space rather than a full array of nodes? Preset nodes are pretty much the de facto standard for enclosed spaces, but all the interest on the forums seems to be focused towards open maps for things like RTS games. That method really isn't compatible with what I'm doing. |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
I can't adapt it in a list of node, because of performances . For example I have seen last week an astar plugin for Irrlicht with nodes, but when I wanted 128*128 pathmaps I was a 2 fps...in C++... But I have restarted the developpment of the plugin last week, it will be the version 1.0, and actually it is a total rewrite, more convenient. If you want to use astar in big spaces you can make several pathmaps which you place 'border to border'. In IA::Astar 0.9a you can use 4 pathmaps with no need to create each pathmap (already created when you call the init function). |
||
| Back to top |
|||
|
Diggsey
User Joined: Mon Apr 24th 2006 Location: On this web page. |
@Darktib When you use nodes, you don't create a grid of them |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
Well... Perhaps I will try to create a dll using nodes but for the moment I want to finish IAA 1.0 . How are the DarkAI performances ? PS : the other advantage of IA::Astar is this dll doesn't need to be executed width dbp, it can be used with all languages supporting dll management (C, C++, VB, etc...) |
||
| Back to top |
|||
|
luke escude
User Joined: Sun Sep 9th 2007 Location: Right Behind You |
I cannot dowlnoad version 0.6... The page that it links you to keeps forwarding to another random page, like Dallas Hotels, or EBay. Thanks EDIT: Do you have the 3D pathfinding example? 2D Does not really help the people who make 3D games Vector3 3D World Creator - By Luke Escude http://www.lujogames.com/luke/vector3/vector3.html |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
The v0.6 have been deleted, because this hosting site delete files after 1 month... All the versions can be adapted for 3d games, If you prefer the code thant the download I can put the 3d example code on the forum. Actually (at this moment) I code the v1.0 ...This version will have 2d and 3d example. I think the plugin in v1.0 will be 'ready' in about 1-2 months. cheers, ~Darktib |
||
| Back to top |
|||
|
luke escude
User Joined: Sun Sep 9th 2007 Location: Right Behind You |
OK, thanks a lot. It would really help to have that 3D example code. You don't have to put up version 0.6, because I thought that it had a 3D example, but I guess it doesn't. But if it does, feel free to upload it. Vector3 3D World Creator - By Luke Escude http://www.lujogames.com/luke/vector3/vector3.html |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
luke escude
User Joined: Sun Sep 9th 2007 Location: Right Behind You |
OK, thanks for your help. Any progress on the example? I hope I am not too persistant! Vector3 3D World Creator - By Luke Escude http://www.lujogames.com/luke/vector3/vector3.html |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
luke escude
User Joined: Sun Sep 9th 2007 Location: Right Behind You |
Great! Thanks for the 3D example, and releasing a new version of IA Astar! Vector3 3D World Creator - By Luke Escude http://www.lujogames.com/luke/vector3/vector3.html |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
For those who wants IA::Astar news, here is a screenshot. This screenie was taken with more than 1 million polys... and more than 50 000 objects The average of path research time with a 64*64 pathmap is 0.20 millisecond^^ Screenshot : + Code Snippet |
||
| Back to top |
|||
|
Wendox
User Joined: Tue Dec 19th 2006 Location: world\'s end |
Darktib, i really love your plugin, its exactly what i was looking for for a long time. the news sound good !!! 0.2 milliseconds is just awesome I'm waiting for the next version! cheers |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
|
cyangamer
User ![]() Joined: Mon Jun 2nd 2008 Location: Houston, TX, USA |
Is there an estimate to when the English version will be out? Thanks. Currently working on - Enemy AI and Action Battle System the sig limit needs to be raised... |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
The only thing that is not done is to translate the documentation from frenchinto english... All the function names are in english - but not the prototpye indication. I think translating documentation files will take a long time as it's not interessant neither easy...^^ So I think i can release the dll with english documentation before christmas (^^), but I dont know exactly when. Cheers, Darktib |
||
| Back to top |
|||
|
Darktib
User Joined: Mon Jun 18th 2007 Location: France |
|
||
| Back to top |
|||
This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.
Go to the last page to check if you can reply to it.
Forum Search
Enter a word or phrase to search our Forum for:
|
|




























