Jumper : 2D Pathfinder with Jump Point Search (v.1.8.1)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

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

Post 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!
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

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

Post 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.
User avatar
OuTopos
Prole
Posts: 8
Joined: Thu Aug 02, 2012 9:44 am

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

Post 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?
OuTopos
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

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

Post 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.
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

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

Post 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:
User avatar
OuTopos
Prole
Posts: 8
Joined: Thu Aug 02, 2012 9:44 am

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

Post 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 4183 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.
OuTopos
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

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

Post 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.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post 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.
Help us help you: attach a .love.
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

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

Post 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.
User avatar
Karai17
Party member
Posts: 930
Joined: Sun Sep 02, 2012 10:46 pm

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

Post 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?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests