Need Path Finding routines, happy to $

BlitzMax Forums/BlitzMax Programming/Need Path Finding routines, happy to $

jonwalker(Posted 2009) [#1]
Hi All,

I’m in need of some Path Finding routines. I’ve searched for various existing solutions but none seem to fit my requirements. If these routines don’t exist then I’d be happy to pay to get them coded.

Most existing path finding systems use a “grid” to indicate where the path can be created, this usually results in a maximum of 8 possible directions. I need however code where the number of paths that can be traveled can be any number and created at runtime in code.

I see this project needing two parts.

1. Creation of a tree like structure, where any “Node” can be joined to any other Node. So you might have something like:
Create Node1(Weight)
Create Node2(Weight)
Create Node3(Weight)
Create Node4(Weight)
Node1.JoinTo(Node2)
Node1.JoinTo(Node3)
Node2.JoinTo(Node3)
Node3.JoinTo(Node1)
Node4.JoinTo(Node1)

The “Weight” would indicate the cost of traveling through that node.


2. A path finding routine, (maybe A*? open to thoughts on this.) that can return the shortest path between any two nodes taking into account the weights. So you might have:
ShortestPath = FindPath(FromNode, ToNode)

Does anyone have any existing routines, or does someone want to take this on as a project? It’s not something I have a desire to code myself.

Thanks, Jon :o)


_JIM(Posted 2009) [#2]
Hm... I'll try this.

How soon do you need it? It might take a day or two to make sure everything works.

EDIT: Nvm that. Got the code completed with a little sample too if you're interested.

Example based on this:




Hope this covers what you need.
I'm still working on it, so I may improve certain areas, but its functional.

You (and anyone else) can use the code in any way you want. Would appreciate a mention or a donation. :)


Midimaster(Posted 2009) [#3]
I can do it with a recursive solution, free number of nodes and free number of connctions. I tested a little bit around and i already have a first solution. It could be ready saturday or sunday.

You offered to pay for it? Please conctat me under info@... to talk about the price you can pay.


jonwalker(Posted 2009) [#4]
Cool thanks Midimaster and Jiman! :o)

I'll go through this and let you know, most probably Monday. :o)

Thanks, Jon


Czar Flavius(Posted 2009) [#5]
Hm is this homework???


_JIM(Posted 2009) [#6]

Hm is this homework???



Could be :D I remember doing this for university a few years ago.


JoshK(Posted 2009) [#7]
You should look into Recast, it is excellent:
http://blitzmax.com/Community/posts.php?topic=88259


Danny(Posted 2009) [#8]
Thanks for that Jim, nice piece of code!

Multumesc ;)

D.