multiple grid graphs

HomeForumsA* Pathfinding ProjectBeginner Questionsmultiple grid graphs

This topic has 2 voices, contains 5 replies, and was last updated by  Aron Granberg 81 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
Author Posts
Author Posts
February 14, 2012 at 09:38 #1523

roto23

Day 3 and I keep making progress. In my game I have a need for 3 separate grid graphs. One for infantry and another for tanks. Their capsule will have a much larger radius and thus can’t move to some spaces that and infantry can nice to. I also have a need for a grid graph for naval units. Can I over lay 3 grid graphs on top of each other? Also how do I tell the seeker which grid graph to use?

February 19, 2012 at 17:19 #1539

roto23

Anyone know if this is possible?

February 20, 2012 at 19:46 #1542

Aron Granberg

Hi

See similar question here: http://www.arongranberg.com/forums/topic/multiple-pathfinders-list-graphs/

Also take a look at this post:
http://www.arongranberg.com/2012/02/graph-updates-and-tagging/
If you only want to restrict some areas which are for example infantry only.

February 20, 2012 at 21:58 #1543

roto23

Thanks for the reply. I think I need the pro version. Can you verify this.
This is what I want to do….
I have land units and sea units. I think I will need two graphs. One for land units and one for sea units. If I put a penalty on the sea nodes, the infantry won’t travel in the water, which is good, but then the naval units will try to find land paths which is bad.
Can you confirm that I can have two grid graphs in the pro version? and just tell the seeker to use this graph for land units and the other graph for sea units?

February 25, 2012 at 10:04 #1555

roto23

Aron,
Is it possible to use 3 grid graphs of the same size, covering the same area. And find a path telling the seeker which grid to use in the pro version?

February 27, 2012 at 11:32 #1562

Aron Granberg

Hi roto23

Yes that s possible. You would use a graphMask. In the pro version, the seekers StartPath function accepts a parameter named “graphMask”. This is a bitmask where each bit specifies if the graph can be used when searching for close nodes. (bit 0 sets whether the first graph can be used and so on).

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: multiple grid graphs
Your information:






<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>