Jump to content
  • Advertisement
Sign in to follow this  
npc

Path-finding why always use 2D only to demo your ideas??

This topic is 5096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

<rant start> Be honest now in your replies..why isn't there a demonstration anywhere on the internet or in any book ever written on pathfinding done in 3D using DirectX? The conclusions iv'e come to is it's either too difficult to explain,or else the people doing the writing (in books and articles)don't really know themselves or haven't actually put the theory into practice. In honesty,how many times have you read a thesis on this or that,article or book,that tries to explain something,without an actual implementation? without even the most basic of basic examples? how do these people know if something will work(or just leave and expect the reader to work it out by themselves),based on knowledge that is completely different to what is needed(e.g 3D). Is it really that difficult for these book authors or article writers,to write an example in the same style as the DirectX SDK examples or tutorials from NEHE? Here is the warrant for this post/rant on 3D Path-finding: * Been googling for roughly a month for as much information on algos/articles/example source and theory (in particular pathfinding),but AI in general,for use in 3d enviroments. Theory and tutorials on A* and Dijkstra is good,though i have never came across anything in my searches showing them in action using even a simple cube,cone etc in 3D using DirectX,only stupid MFC/GDI apps or 2D tile examples,which i found irrelivent for what i needed. Books iv'e bought or own are similar,these include: *Advanced 3D Programming with DirectX by Peter Walsh,which does explain basic theory on Locomotion/Motorskills,steering,Pattern based AI,Potential functions,Path following/planning and Neural nets. Again,although brief,the example shown is an MFC/GDI app,that wouldleave the most intelligent programmers baffled on how to apply this to a 3d enviroment with 3D characters. * Tricks of the windows game programming -Andre La Mothe - interested in the waypoints chapter- though sadly it is assuming 2D only. * Game programming Gems - OpenGL only(found too difficult to port/apply the ideas in my DirectX applications IMO,not enough OGL knowledge). * AI Techniques - 2D/GDI examples only. * AI Game programming - (is really a book on bot programming for Quake). * Real Time strategy - (A*)Tiles,could not get the ideas working in 3D. On a side-noted question,i found only 2 libs out there for pathfinding.one was a very old lib,with no examples showing how it could be used in a 3D DirectX app,and the other was obviously asking a lot of money,as they did not even have a price for it on their website.Obviously only aimed at the big companies. So what is the answer to get even the most basic pathfinding working in a 3D,DirectX enviroment for an indie game developer? Is there 1 single resource out there at all? Am i the only person who has had this problem or finding this too difficult? or is this a very common rant around here? I would gladly pay a reasonable ammount for a simple 3D DirectX example showing one of the techniques in action if anyone has developed such a demo,if not only to save myself money from the keyboards i keep breaking out of frustration -;) <rant end>

Share this post


Link to post
Share on other sites
Advertisement
I think the issue is that the theory is identical for 2D or 3D but the implementation for 3D is a lot harder, and tends to obscure the detail of the pathfinding algorithm.

Share this post


Link to post
Share on other sites
Well.. just like Kylotan said, patchfinding in 3d is old good 2d but with one more dimension. :D

And seriously : lets consider A* for 3d. Its the same algorithm, but you have to consider two more neighbour nodes (up and down) for every node. I made only 2d A*, but i recall that i was considering making itd 3d and i found it quite easy.

Share this post


Link to post
Share on other sites
As a pathfinding algorithm needs no graphics whatsoever in order to work, 2d or 3d are equal difficulty. I could make my 2d pathfinder into a 3d one, by adding only a few lines of code (to the 300+ already there)

I could also imagine making a slightly more generic version (perhaps using templating or polymorphism) that would work in n dimensions regardless of n.

The only difference would be that visualisation is much more difficult.

I would recommend that if you're developing a pathfinding algorithm, do it in 2d first, then expand it to 3d once it's working.

Bear in mind, that 2d square, 2d hextile, 3d, 4d etc, are essentially all the same algorithm.

Mark

Share this post


Link to post
Share on other sites
3rd Person shooter/Max Paynish style...the AI/pathfinding doesn't need to be as complex though.

The AI needs similar traits as Resident Evil TM or Alone in the Dark TM.

Fairly basic ideas..Zombies/monsters spawned/respawned on events that are triggered such as when the player enters a room or location,find player...move to his location...Evade etc etc.
Shoot zombie/MPC,zombie falls..gets back up...you get the basic idea.

Need to have path's or(waypoints) for zombies/NPC to wander,go to and find.

The path-finding/navigation is proving to be the most difficult part to get up and running in 3D/directX -;)

Share this post


Link to post
Share on other sites
Does anyone here use the middleware solution PathEngine?

If yes,can you give me a rough(you can be discreet by just saying " a lot! probably out of your price range!")estimate of the licensing prices.Is it reasonable for an indie-project?

I know i could e-mail them,though its normally quite embaressing after they send you all the info first,then tell you its around the 20 grand mark.So i'd rather avoid that if possible.

Share this post


Link to post
Share on other sites
Sorry to not answer the replies(how rude of me-;)

Yes,again..in theory,it would be the same for both 2D graphics and 3D Graphics..but (in practice)if you take a moment to actually try it yourself in a 3D enviroment you'll see that most of that theory goes out the window and (mostly)your left with guessing/trial and error work.

I don't mean that rudely,but have you actually tried any of this yourself in a 3D enviroment? or?

Thanks for your replies though,keep the replies coming,interested to hear the hardcore programmers views/experiences.

Share this post


Link to post
Share on other sites
Game Programming Gems #1 = OpenGL Only...

sorry pipo read the book,worn the -T-shirt and failed with section 3(navigation meshes)of Gems...the theory was very interesting though LOL ;-)

<Edit> before anyone jumps down my throat for my last comment...i will offer 400 US dollars for a succesful port of that demo to DirectX 9(not joking,very serious).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!