Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Astar pathfinding Dll

Author
Message
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 12th Sep 2007 22:43 Edited at: 24th Jan 2009 21:10

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:
== pathfinders objects
== pathmaps
== pathmaps saving/loading from memory and from files
== search path
== basic waytile reader
== evolued path reader : checkpoints
== evolued pathmap operation : inversion
== much faster than v0.9a
== 2 variations of Astar : with or without diagonals
== documentation (french & english)

Current version : v1.0

The version 1.0 is out !

Notice that one file from the doc still need translation...

Commands:


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





Version 0.6



Version 0.9a




Downloads:
IA::Astar 1.0 French Version
IA::Astar 1.0 English Version


Have fun !

~Darktib


RTS game project : |||%

Attachments

Login to view attachments
Atreides
19
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 13th Sep 2007 12:11
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_Pro
Il 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 !
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 13th Sep 2007 18:26
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
Atreides
19
Years of Service
User Offline
Joined: 11th Oct 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 14th Sep 2007 13:01
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 :


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 :


Réallocation :


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 !
dab
18
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 15th Sep 2007 04:13 Edited at: 15th Sep 2007 04:13
oh yea... Totally. How could I forget that??

But if it works really well, I think I'd find this usefull.
thebulk71
16
Years of Service
User Offline
Joined: 2nd Jan 2006
Location: takin a poop
Posted: 15th Sep 2007 16:03
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 )
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 15th Sep 2007 23:02
@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
Ian T
20
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 5th Oct 2007 02:36
How's the speed compared with internal DBP systems such as Ian M's A-star example?
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 7th Oct 2007 12:27
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
|||%
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 4th Nov 2007 15:24 Edited at: 14th Nov 2007 11:04
Version 0.9 will be out the latest week of november, if I have the time I want.

RTS game project : 3.2% finished
|||%
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 17th Nov 2007 16:28 Edited at: 17th Nov 2007 16:29
[deleted]

RTS game project : 3.2% finished
|||%
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 27th Nov 2007 23:05
Version 0.9a will be out the 2nd December 2007!

Actually I am testing the dll.

Im not sure but I think that there will be only the dll, the *.ini file and 2 or 3 examples.


RTS game project : |||%
Kohaku
18
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 28th Nov 2007 17:27 Edited at: 6th Dec 2007 18:29
Looks awesome. I may find myself using this at some point.

Your English is good by the way.


You are not alone.
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 2nd Dec 2007 21:24
Thanks Kohaku

If you know where is a post about astar in dbp it would be great to indicate me where is this post (to compare performances)


RTS game project : |||%
FERSIS
16
Years of Service
User Offline
Joined: 17th May 2006
Location:
Posted: 18th Dec 2007 01:18
It works with GDK ???
cheers
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 18th Dec 2007 17:06
Its a dll, so you can use this plugin with the language you want.
In C/C++ with GDK you can write :
call dll ("astar.dll","SearchPath",parameters) or equivalent.
If you want to know the name of the functions you can use a stringtable reader, such as FileAnalizer.

cheers


RTS game project : |||%
El Goorf
16
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 18th Dec 2007 21:13
wow, awesome tutorial, interesting read, ty.

http://notmybase.com
All my base are not belong to anyone.
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 21st Dec 2007 22:57
You're welcome


RTS game project : |||%
FERSIS
16
Years of Service
User Offline
Joined: 17th May 2006
Location:
Posted: 27th Dec 2007 14:34
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.
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 29th Dec 2007 15:07
Thank you!
I will compare IA::Astar and this code now^^
And seasons greetings !


RTS game project : |||%
FERSIS
16
Years of Service
User Offline
Joined: 17th May 2006
Location:
Posted: 8th Jan 2008 15:47 Edited at: 8th Jan 2008 15:49
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


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
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 19th Jan 2008 19:27 Edited at: 20th Jan 2008 15:28
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.


RTS game project : |||%
Ian T
20
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 28th Feb 2008 16:18
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.
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 15th Mar 2008 20:15
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).


RTS game project : |||%
Diggsey
16
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Mar 2008 22:13
@Darktib
When you use nodes, you don't create a grid of them You create a node at every corner of every collision object, and links between nodes that can 'see' each other. It is MUCH faster than using a grid for a large area. This is how DarkAI works

Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 20th Mar 2008 22:20
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...)


RTS game project : |||%
luke escude
15
Years of Service
User Offline
Joined: 9th Sep 2007
Location: Right Behind You
Posted: 22nd Mar 2008 18:54 Edited at: 22nd Mar 2008 18:59
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
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 22nd Mar 2008 19:36
The v0.6 have been deleted, because this hosting site delete files after 1 month... If you want I can put the 0.6 on MegaUpload.

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


RTS game project : |||%
luke escude
15
Years of Service
User Offline
Joined: 9th Sep 2007
Location: Right Behind You
Posted: 22nd Mar 2008 20:14
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
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 23rd Mar 2008 17:08
OK, I will put this example today or tomorrow, just want the time to adapt the function names for IAA 0.9a^^


RTS game project : |||%
luke escude
15
Years of Service
User Offline
Joined: 9th Sep 2007
Location: Right Behind You
Posted: 26th Mar 2008 05:24
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
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 26th Mar 2008 22:11 Edited at: 26th Mar 2008 23:02
Finish!

It is a total rewrite, that's why it was so slow...

The example is attached to this post, with the zip of IAA 0.9a (maybe it can be useful^^)
The pathmap used can be changed with the 2d example.

Don't forgot comments^^

Cheers,
Darktib


RTS game project : |||%

Attachments

Login to view attachments
luke escude
15
Years of Service
User Offline
Joined: 9th Sep 2007
Location: Right Behind You
Posted: 26th Mar 2008 23:22
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
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 3rd Apr 2008 23:22 Edited at: 25th Nov 2008 19:56
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. 10 fps

The average of path research time with a 64*64 pathmap is 0.20 millisecond^^
Screenshot :



RTS game project : |||%
Wendox
15
Years of Service
User Offline
Joined: 19th Dec 2006
Location:
Posted: 4th Apr 2008 15:22
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
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 16th Jun 2008 13:37
Small news : I think the version 1.0 will be out in about 1 or 2 months.

Cheers,
Darktib


RTS game project : |||%
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 28th Aug 2008 22:40
The french version 1.0 is out

Features and download are in the first post.

Enjoy !

PS: The langage of the version is the langage of the documention and of the examples. For the english users the english version will be out in about 1 or 2 months I think.


RTS game project : |||%
cyangamer
14
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 21st Sep 2008 03:00
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...
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 12th Oct 2008 17:53
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


RTS game project : |||%
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 24th Jan 2009 20:39 Edited at: 24th Jan 2009 21:12
Hello all, and Happy new year !

So, I have translated all files except the bigger because of lack of time...

'appologize for releasing it so late, but here is the link :
http://www.mediafire.com/download.php?zj2zuyljhf5
or see first post.


Cheers,

Darktib


RTS game project : |||%
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 24th Jan 2009 21:08
Sorry for the double post...

OK, I've uploaded the zip, here is the link to the file:
http://www.mediafire.com/download.php?zj2zuyljhf5

The editor is in french, if I have time (which is uncertain...) I could translate the buttons^^

Enjoy !

~Darktib


RTS game project : |||%
Caleb1994
14
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Feb 2009 17:38
does this work with dbc????
Caleb1994
14
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 4th Feb 2009 17:40
does it work with dbc????
Darktib
15
Years of Service
User Offline
Joined: 18th Jun 2007
Location: France
Posted: 14th Feb 2009 19:29
I'm not sure if it works with dbc, but it should because this dll doesn't use anything which is related to the DarkBASIC internal engine.


RTS game project : |||%

Login to post a reply

Server time is: 2022-11-29 08:37:34
Your offset time is: 2022-11-29 08:37:34