The Game Creators
The Game Creators Home Click to Login
  Hot: Official TGC CompetitionLee is tweeting!July NewsletterSmart PackerBox2DWeb Hosting SurveyDGS BonanzaFPS Creator Bonanza;
The Game Creators
Program Announcements / Astar pathfinding Dll

Go to the first page of this board Return to the Forum Menu Post Message
44 Messages - Page   of 2   
Bookmark and Share Search the Forum Next 40

Author Message
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 12th Sep 2007 14:43     Edited: 24th Jan 2009 14:10     | link | toggle

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:
+ 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



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 : |||%
Back to top
Download: IAAstar_v09.zip Size: 1599305 bytesReport this message as abusive
Atreides

User


Joined: Sat Oct 11th 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 13th Sep 2007 04:11           | link | toggle

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 !
Back to top
Here\'s a link :)
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 13th Sep 2007 10:26           | link | toggle

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
Report this message as abusive
Atreides

User


Joined: Sat Oct 11th 2003
Location: Switzerland (but NOT on a mountain !)
Posted: 14th Sep 2007 05:01           | link | toggle

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
Here\'s a link :)
Report this message as abusive
dab

User


Joined: Wed Sep 22nd 2004
Location: You Temp Folder!
Posted: 14th Sep 2007 20:13     Edited: 14th Sep 2007 20:13     | link | toggle

oh yea... Totally. How could I forget that??

But if it works really well, I think I'd find this usefull.
Back to top
dab-Media
Report this message as abusive
thebulk71

User


Joined: Mon Jan 2nd 2006
Location: takin a poop
Posted: 15th Sep 2007 08:03           | link | toggle

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
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 15th Sep 2007 15:02           | link | toggle

@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
Report this message as abusive
Ian T

User


Joined: Thu Sep 12th 2002
Location: Around
Posted: 4th Oct 2007 18:36           | link | toggle

How's the speed compared with internal DBP systems such as Ian M's A-star example?
Back to top
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 7th Oct 2007 04:27           | link | toggle

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
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 4th Nov 2007 08:24     Edited: 14th Nov 2007 04:04     | link | toggle

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
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 17th Nov 2007 09:28     Edited: 17th Nov 2007 09:29     | link | toggle

[deleted]

RTS game project : 3.2% finished
|||%
Back to top
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 27th Nov 2007 16:05           | link | toggle

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 : |||%
Back to top
Report this message as abusive
Kohaku

User


Joined: Mon May 3rd 2004
Location: The not very United Kingdom
Posted: 28th Nov 2007 10:27     Edited: 6th Dec 2007 11:29     | link | toggle

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
developing augmentation
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 2nd Dec 2007 14:24           | link | toggle

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 : |||%
Back to top
Report this message as abusive
FERSIS

User


Joined: Wed May 17th 2006
Location: Cyberspace
Posted: 17th Dec 2007 18:18           | link | toggle

It works with GDK ???
cheers
Back to top
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 18th Dec 2007 10:06           | link | toggle

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 : |||%
Back to top
Report this message as abusive
El Goorf

User


Joined: Sun Sep 17th 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 18th Dec 2007 14:13           | link | toggle

wow, awesome tutorial, interesting read, ty.

http://notmybase.com
All my base are not belong to anyone.
Back to top
Not My Base
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 21st Dec 2007 15:57           | link | toggle

You're welcome


RTS game project : |||%
Back to top
Report this message as abusive
FERSIS

User


Joined: Wed May 17th 2006
Location: Cyberspace
Posted: 27th Dec 2007 07:34           | link | toggle

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
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 29th Dec 2007 08:07           | link | toggle

Thank you!
I will compare IA::Astar and this code now^^
And seasons greetings !


RTS game project : |||%
Back to top
Report this message as abusive
Google Ad
Back to top
 
FERSIS

User


Joined: Wed May 17th 2006
Location: Cyberspace
Posted: 8th Jan 2008 08:47     Edited: 8th Jan 2008 08:49     | link | toggle

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
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 19th Jan 2008 12:27     Edited: 20th Jan 2008 08:28     | link | toggle

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 : |||%
Back to top
Report this message as abusive
Ian T

User


Joined: Thu Sep 12th 2002
Location: Around
Posted: 28th Feb 2008 09:18           | link | toggle

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
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 15th Mar 2008 13:15           | link | toggle

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 : |||%
Back to top
Report this message as abusive
Diggsey

User


Joined: Mon Apr 24th 2006
Location: On this web page.
Posted: 15th Mar 2008 15:13           | link | toggle

@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

Back to top
http://diggsey.heliohost.org/
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 20th Mar 2008 15:20           | link | toggle

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 : |||%
Back to top
Report this message as abusive
luke escude

User


Joined: Sun Sep 9th 2007
Location: Right Behind You
Posted: 22nd Mar 2008 11:54     Edited: 22nd Mar 2008 11:59     | link | toggle

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
LuJo Software Find user on ICQ Send AIM user a message
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 22nd Mar 2008 12:36           | link | toggle

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 : |||%
Back to top
Report this message as abusive
luke escude

User


Joined: Sun Sep 9th 2007
Location: Right Behind You
Posted: 22nd Mar 2008 13:14           | link | toggle

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
LuJo Software Find user on ICQ Send AIM user a message
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 23rd Mar 2008 10:08           | link | toggle

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 : |||%
Back to top
Report this message as abusive
luke escude

User


Joined: Sun Sep 9th 2007
Location: Right Behind You
Posted: 25th Mar 2008 22:24           | link | toggle

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
LuJo Software Find user on ICQ Send AIM user a message
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 26th Mar 2008 15:11     Edited: 26th Mar 2008 16:02     | link | toggle

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 : |||%
Back to top
Download: iaa_0.9a_3d_example.zip Size: 3033361 bytesReport this message as abusive
luke escude

User


Joined: Sun Sep 9th 2007
Location: Right Behind You
Posted: 26th Mar 2008 16:22           | link | toggle

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
LuJo Software Find user on ICQ Send AIM user a message
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 3rd Apr 2008 15:22     Edited: 25th Nov 2008 12:56     | link | toggle

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 :
+ Code Snippet


RTS game project : |||%
Back to top
Report this message as abusive
Wendox

User


Joined: Tue Dec 19th 2006
Location: world\'s end
Posted: 4th Apr 2008 07:22           | link | toggle

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
Find user on ICQ
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 16th Jun 2008 05:37           | link | toggle

Small news : I think the version 1.0 will be out in about 1 or 2 months.

Cheers,
Darktib


RTS game project : |||%
Back to top
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 28th Aug 2008 14:40           | link | toggle

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 : |||%
Back to top
Report this message as abusive
cyangamer

User


Joined: Mon Jun 2nd 2008
Location: Houston, TX, USA
Posted: 20th Sep 2008 19:00           | link | toggle

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
Cyan Productions Send AIM user a message
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 12th Oct 2008 09:53           | link | toggle

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 : |||%
Back to top
Report this message as abusive
Darktib

User


Joined: Mon Jun 18th 2007
Location: France
Posted: 24th Jan 2009 13:39     Edited: 24th Jan 2009 14:12     | link | toggle

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 : |||%
Back to top
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
44 Messages - Page   of 2   
Search the Forum Next 40

This is a multi-page thread older than 30 days.
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:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Game Creator Store
Privacy Policy AUP Top of Page