Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Pathfinding : Jump Point Search - Straight Moves vs Diagonal Moves


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Roland_Y   Members   -  Reputation: 127

Like
0Likes
Like

Posted 27 May 2012 - 02:58 AM

Hi community,
I'm new here, so please be gentle... :)


Planning working on a 2D RTS, I tried to learn how Astar works.
Indeed, I found articles explaining how Astar could be optimized coupling it with binary heaps,
and algorithms taking advantages of Path symmetry, like Jump Poin Search algorithm.
I made my own implementation and it happened to run fine.
I even made some benchmarks tests with maps from MovingAI Labs.

Yet there is a problem. Everything runs fine when diagonal moves are allowed.
When disabled, no path is returned when the case it involves a diagonal move....
It may be linked to the way I implemented it, then I'm all asking...
In general, how would you oblige the algorithm (JPS) to search for path involving only straight moves (not diagonals moves) to reach a goal ?
Thanks in advance!

Sponsor:

#2 Roland_Y   Members   -  Reputation: 127

Like
0Likes
Like

Posted 28 May 2012 - 04:19 AM

Noone ?

#3 Explodinator   Members   -  Reputation: 119

Like
0Likes
Like

Posted 28 May 2012 - 07:56 AM

Your question is not very clear. It seems that you are trying to generate a path from point A to point B when B is only accessible from A via a diagonal jump?

If so, there exists no path containing of only vertical and horizontal movements that get you from point A to point B, so your algorithm is correct to return no path.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS