Page 5 of 10

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.0)

Posted: Tue Oct 09, 2012 8:24 am
by Roland_Yonaba
Hi all,

Just wanted to mention that Jumper now reaches v1.5.0.
Find the version_history here.
Links in the first OP was updated.
Also, for those who wanted to use Jumper, mixing it with AdvancedTiledLoader, or for anyone who is just interested in, there's now an dedicated repository where examples of use for Jumper will be pushed.
This repository contains multiple branches, here is the one dedicated to Love2d.
Jumper-Examples-Love2d

I'll be happy to know about your thoughts, what's seems not be working right, etc.
If you come up with nice/clean demos, let me know.
Hope you like it!

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.0)

Posted: Tue Oct 09, 2012 8:57 pm
by Roland_Yonaba
Hi,
Bumping on my own thread, but just to give fresh heads-up.

Since the start, I noticed some odds with non-diagonal moves. Fact is, the original algorithm was designed to prefer diagonal search instead of horizontal/vertical search.
So I basically hijacked it, to be able to deal with diagonals and orthogonal moves. It worked, but I wasn't that much satisfied with the results. Fact is, they were too much "zigzags" at each step when a path with no diagonal moves was requested.
I took a fresh look at that recently, and I made some changes...
And the results were ashtonishing:

Until 1.5.0:
Image Image

Now (1.5.1)
Image Image

Well, I won't say that "the job is done", though. There's still some things I could come back on, such as find a way to reduce the expanded nodes when diagonal moves are forbidden. Anyway, that's waay better than before.

Github: Jumper

I'll be pleased to have comments and suggests, it'll help improve. Thanks.

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1)

Posted: Sat Oct 13, 2012 6:54 am
by OuTopos
Thank you for the awesome work!

I was just wondering about something.
Would it be possible to have obstacles that are just lines along the grid lines?

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1)

Posted: Sat Oct 13, 2012 8:22 pm
by Jasoco
OuTopos wrote:Thank you for the awesome work!

I was just wondering about something.
Would it be possible to have obstacles that are just lines along the grid lines?
You'd probably basically have to make it so whatever blocks the line passes through would be considered solid/impassable. Simple really.

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1)

Posted: Sun Oct 14, 2012 2:44 pm
by Roland_Yonaba
OuTopos wrote:Thank you for the awesome work!
Thanks!
OuTopos wrote: I was just wondering about something.
Would it be possible to have obstacles that are just lines along the grid lines?
Jasoco wrote:You'd probably basically have to make it so whatever blocks the line passes through would be considered solid/impassable. Simple really.
Definitely. I can't provide a better answer. :awesome:

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1)

Posted: Mon Oct 15, 2012 4:03 am
by OuTopos
Okay I see. Was expecting that, just thought I could ask to be sure.

This is the behavior I was aiming for.
grid.png
grid.png (5.74 KiB) Viewed 3850 times
But I guess A* can't do that, am I right?

As a workaround I think I could split up all tiles so the are two tiles and offset by 0.5 to simulate those lines.

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1)

Posted: Mon Oct 15, 2012 4:44 am
by Karai17
I was thinking of a similar issue. I would like to be able to create a grid where some tiles can be passed through on some sides, instead of a standard 0/1 collision grid. My original idea was to apply tile properties in Tiled but now that I am using Jumper for collision detection, that isn't really an option.

basically, imagine the ability to fall down a cliff, but not fall up a cliff. You could run down the map from the top, but you'd collide with the mountain side from the bottom.

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1)

Posted: Mon Oct 15, 2012 7:01 am
by Robin
OuTopos wrote:But I guess A* can't do that, am I right?
Of course it can. You just need an implementation that is aware that whether or not a certain tile is accessible can depend on which direction you're coming from.

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1)

Posted: Mon Oct 15, 2012 8:45 am
by Roland_Yonaba
Karai17 wrote:I was thinking of a similar issue. I would like to be able to create a grid where some tiles can be passed through on some sides, instead of a standard 0/1 collision grid. My original idea was to apply tile properties in Tiled but now that I am using Jumper for collision detection, that isn't really an option.

basically, imagine the ability to fall down a cliff, but not fall up a cliff. You could run down the map from the top, but you'd collide with the mountain side from the bottom.
That's interesting, I was thinking of this too.
It is totally possible, still using the same algorithm. It just need a proper map representation.
I'll give a thought at this.

Re: Jumper : 2D Pathfinder with Jump Point Search (v1.5.1.1)

Posted: Mon Oct 15, 2012 2:34 pm
by Karai17
Perhaps making a simplified version of the Tiled map, so all collisions are a "1" instead of the tile number, all "collide from top" are 2, etc?