Page 1 of 2
AI, Path Finding
Posted: Sat Mar 22, 2008 5:08 pm
by DDd
Hi,
I was wondering if there is any AI middleware that you would recommend to use with irrlicht. Also have there been any attempts to implement AI directly in Irrlicht or an Irrlicht based engine?
Posted: Sat Mar 22, 2008 5:42 pm
by sudi
hmm interesting question.....first why do u want to intergrate a ai engine into a graphicEngine? second search the forum for AI.....then u would find a project of JP who is making a AI engine
Posted: Sat Mar 22, 2008 6:14 pm
by JP
Yeah you can check out what i'm working on at the moment. Currently it's not really in a usable state for anyone. It's being developed specifically for Christian Clavet's FPS game First King so i'm focusing on getting it ready for his project and actually don't have a huge amount of time for it due to full time work commitments etc. But it will be an open source free to use AI engine for anyone to use on here.
Obviously AI would never be integrated into irrlicht as it's a graphics engine for rendering and nothing more, it's just used to make games a lot, hence why i'm putting together this AI engine, to lend a helping hand to folks!
I'm not really familiar with any AI engines, i've seen Kynapse advertised in places but i think you have to pay for that...
Posted: Sat Mar 22, 2008 10:17 pm
by Acki
you also can google for A* (A-Star), it's a very common path finding algorithm, but you'll have to implement it on your own...

but it's not too hard to understand though...
and probably there are many other algorithms for path finding, just google...
well, this site is prety good/interesting one for AI in general, also for pathfinding:
http://ai-depot.com/articles/?s=pathfinding
Posted: Sat Mar 22, 2008 10:23 pm
by JP
Incidentally i just did a bit of a performance test on one of the irrAI demos i'm working on and i found that there was no performance loss from the AI... I got 175fps if i had the AI calculating its pathfinding and i got 175fps if i turned the AI calculations off.... And that was with 10 NPCs in the scene... very bizarre... i'm sure that can't be right!

Posted: Sat Mar 22, 2008 11:29 pm
by MasterGod
Acki wrote:you also can google for A* (A-Star), it's a very common path finding algorithm, but you'll have to implement it on your own...

but it's not too hard to understand though...
and probably there are many other algorithms for path finding, just google...
well, this site is prety good/interesting one for AI in general, also for pathfinding:
http://ai-depot.com/articles/?s=pathfinding
If you need a good A* tutorial check this out:
http://www.policyalmanac.org/games/aStarTutorial.htm
Posted: Sun Mar 23, 2008 12:13 am
by Acki
why you quoted me, I know A* and can code it from the top of my head !!!
well, seriously, yes this is a good A* beginners tutorial, I also studied it when I started to learn A*...

Posted: Sun Mar 23, 2008 1:22 am
by randomMesh
Acki wrote:you also can google for A* (A-Star), ... but you'll have to implement it on your own...
http://www.grinninglizard.com/MicroPather/
Yeah, sure. And reinvent the wheel, too.

Posted: Sun Mar 23, 2008 2:08 am
by MasterGod
@Acki: LOL! I quoted you cause you mentioned A*. Actually I was thinking after I posted it, "will he (Acki-you) think it's for him or for DDd".
I guess I was wrong

Posted: Sun Mar 23, 2008 2:18 am
by Acki
randomMesh wrote:Yeah, sure. And reinvent the wheel, too.

why not when my reinvented wheel suits my needs better ?!?!?

I'm sure there are 100s of libs for A* out there, but A* is so easy to understand and to use that I don't need any 3rd party lib just for this...
but sure for noobs it will be a help as long as they don't want to learn how A* works...
@Mastergod: yeah it was just a joke of mine...

Posted: Sun Mar 23, 2008 3:46 am
by Halifax
why not when my reinvented wheel suits my needs better ?!?!?
Well then it isn't a reinvented wheel, because you made a new 4D wheel.
But on a serious note, reinventing the wheel is not bad, like Acki said, when it does the following: suits your needs better, you can learn from it, etc.
It's so stupid to say for someone to not reinvent the wheel in general. Reinventing the wheel is what life is made of. People learn by others creating a wheel, releasing papers, and then others reinventing that wheel and learning from it. How many hunderds of people have tried coding HDR based off of papers? Are they just reinventing the wheel? If so, then they shouldn't, and only the person who created HDR should be using it, thus leaving the general public in the dark about it.
</rant>
Posted: Sun Mar 23, 2008 9:22 am
by rogerborg
Thanks, that's a very clear and well documented implementation. Given that this discussion is occurring on the forums for
an engine, I think the merits of not re-inventing the wheel should be clear.

Posted: Sun Mar 23, 2008 10:00 am
by Halifax
rogerborg wrote:
Thanks, that's a very clear and well documented implementation. Given that this discussion is occurring on the forums for
an engine, I think the merits of not re-inventing the wheel should be clear.

This is true, but in what respects did Irrlicht not reinvent the wheel compared to all the other 3d rendering engines before it?
Posted: Sun Mar 23, 2008 12:36 pm
by BlindSide
JP wrote:Incidentally i just did a bit of a performance test on one of the irrAI demos i'm working on and i found that there was no performance loss from the AI... I got 175fps if i had the AI calculating its pathfinding and i got 175fps if i turned the AI calculations off.... And that was with 10 NPCs in the scene... very bizarre... i'm sure that can't be right!

Offcourse it can, that's because its most likely graphics-bound, FPS being a graphics term, its usually more effected by videocard-related things, and less by CPU driven things (Unless the cpu and memory pipeline is so overworked that its struggling to send the necessary resources to the graphics card. Eg, a complex physics simulation.)
I would be surprised if it did slow it down (It must mean you are doing some very crazy AI calculations.) What path finding algorithm are you using anyway? djkstar?, wavelet?
Cheers
Posted: Sun Mar 23, 2008 1:41 pm
by arras
It's so stupid to say for someone to not reinvent the wheel in general.
I think the merits of not re-inventing the wheel should be clear.
Isn't it what we all doing here after all? Isn't Irrlicht itself just another "wheel" reinvented?
Here is my own A* "wheel" reinvented using Irrlicht

:
Pathfinding Demo
It would need some small adjustments to get it work with recent version of Irrlicht however.