Jump to content


Dijkstra Pathfinding with Python


  • Please log in to reply
17 replies to this topic

#13 asnowcappedromance

asnowcappedromance

    Initiate

  • Members
  • PipPip
  • 158 posts
  • Joined: 18-October 09
  • Location:Vancouver, B.C.
  • Name:Manuel Tausch

Posted 25 March 2012 - 04:55 PM

sure, no big deal, be my guest :)

Manuel Tausch
senior FX TD - Rhythm & Hues

#14 Farsheed Ashouri

Farsheed Ashouri

    Peon

  • Members
  • Pip
  • 95 posts
  • Joined: 16-January 09
  • Location:Tehran, Iran
  • Name:Farsheed Ashouri

Posted 26 March 2012 - 12:49 PM

View Postvi_rus, on 01 February 2012 - 03:16 AM, said:

I can share source code, if it'll helps you at c++ learning)
Could you please share your code here? I need to learn HDK.
Thank you in advanced.

#15 vi_rus

vi_rus

    Initiate

  • Members
  • PipPip
  • 111 posts
  • Joined: 05-June 09
  • Location:Moscow, Russia
  • Name:Sergei Bolisov

Posted 26 March 2012 - 11:52 PM

View PostFarsheed Ashouri, on 26 March 2012 - 12:49 PM, said:

Could you please share your code here? I need to learn HDK.
Thank you in advanced.

Attached Files


Posted Image
Posted Image
Looking for a job

#16 hyperforce

hyperforce

    Peon

  • Members
  • Pip
  • 34 posts
  • Joined: 07-November 10
  • Location:Heeze, Netherlands
  • Name:Erwin Heyms

Posted 27 March 2012 - 05:09 AM

Manuel, I'm trying to implement your solution into my level generator and its working fairly well. (I've added in an image)
The 3D grid is invisible in the image, but I've photoshoped in some dark red markers to give you a sense of depth in the image.

cooking times get rather long very fast however and the more complex it gets the higher the chances are one or more lines aren't generated correctly. I'm not sure if this is related to the algorithm or due to the foreach nodes.

I am getting a lot of "breaking while loop" warnings however.
The 3D grid i'm using has roughly 10.000 points with roughly 8-12 connections each.

vi_rus, would it be ok if I try to implement your HDK version?
And if it is, do you have an example file that I can try to implement?
Thank you in advance. Though I'd understand if you refuse.

Attached Thumbnails

  • roomStructure2.jpg

Edited by hyperforce, 27 March 2012 - 07:07 AM.

My Procedural FPS level generator:
http://forums.odforc...vel-generation/

Email: erwinheyms@gmail.com

#17 petz

petz

    Initiate

  • Members
  • PipPip
  • 213 posts
  • Joined: 30-June 07

Posted 27 March 2012 - 08:51 AM

if you are going the hdk route anyway, wouldn´t it be the easiest to use one of the many existing graph-libraries like bgl (boost graph library), igraph, ...?
most libraries provide numerous shortest path algorithms that should be pretty fast for around 10000 points.

petz

Edited by petz, 27 March 2012 - 01:19 PM.


#18 hyperforce

hyperforce

    Peon

  • Members
  • Pip
  • 34 posts
  • Joined: 07-November 10
  • Location:Heeze, Netherlands
  • Name:Erwin Heyms

Posted 19 April 2012 - 12:21 AM

I thought I'd show you what your Dijkstra's Algorithm solution has allowed me to build so far:

I'm using it to build the corridors and where they cross smaller rooms as you can see below:

Attached Thumbnails

  • FightMyMinions.jpg
  • corridormatrix.jpg

My Procedural FPS level generator:
http://forums.odforc...vel-generation/

Email: erwinheyms@gmail.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users