Pathfinding Demo

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Pathfinding Demo

Post by arras »

Demo showing simple A* pathfinding in 2D. It is second wariant so its quit simple. It uses unsorted open list.

When writing it I was largery influenced by this Patrick Lesters article:
http://www.policyalmanac.org/games/aStarTutorial.htm

Image

download source code:
http://www.spintz.com/arras/Files/PathDemo070512.zip
Last edited by arras on Sat May 12, 2007 8:04 am, edited 1 time in total.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Wow Arras, that's really cool and really fast. Nice work
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Thanks :)

There was small bug in main.cpp. I forgot to delete player node at the end ...corrected.
olivehehe_03
Posts: 157
Joined: Tue Mar 20, 2007 8:30 am

Post by olivehehe_03 »

Looks nice, can't wait to try and get this working in 3D...
Tell me what you cherish most. Give me the pleasure of taking it away.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

IrrWizard has A*Star path-finding built-in, if you'd rather not re-invent the wheel.

You'll probably need to make a few tweaks to IrrWizard to compile with 1.3, but if I can get IrrSpintz to use IrrWizard then 1.3 shouldn't be too involved either.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

olivehehe_03 >> pathfinding code can be used in pseudo 3D easily, to make it work in real 3D environment with seweral lewels above each other would be slightly more chalenging.

sio2 >> principle of A* is fairly simple and universal however its implementation is wery application specific. Thats why I "reinvented" :)
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

arras wrote:sio2 >> principle of A* is fairly simple and universal however its implementation is wery application specific. Thats why I "reinvented" :)
Yeah, I was replying to the poster who wanted it in 3D.
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

using A* in 3D is even much simpler if you use prebuild nodes...
the tut is great, but old.. i learned A* from it 2 years ago^^
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

ohhhhh... even drunk this sounds interesting... A+ A*!!!

you know what i';ve been waitnging for?

thatn damn zombie dome thingy,, you know?

what happened top that man?!
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

sio2 >> OK :)

TheGameMaker >> yes prebuild nodes work wery well with A* but are also quit restricting ...again, its wery application specific. Bye the way tiles (or hexagoons) are in a way also kind of prebuild nodes...

That article I have found when I was coding with Dark Basic, which is some 5-6 years ago. But since then I did not find better. It also include exelent list of links.

Midnight >> man I have no idea what are you talking about :P Did you returned from some wild party yesterday? :wink:
What is "zombie dome thingy"?
Post Reply