Jumper - ( An Extremely Fast) 2D Pathfinder For grid-based games

Jumper is a pathfinding library designed for uniform cost 2D grid-based games.
It is written in pure Lua and features a mix of A-star, Binary-Heaps and Jump Point Search algorithm.
Indeed, it is extremely simple to use, lightweight, and works really fast!
Jumper can fit in games where pathfinding is needed.

Example :

package.path = package.path .. ';.\\?\\init.lua'  
local Jumper = require('Jumper')  
-- A collision map : 0 for walkable tiles,   
-- non-zero for unwalkable tiles  
local map = {  
 {0,0,0},  
 {0,2,0},  
 {0,0,1},  
}  
  
local walkable = 0 -- specify walkable tiles  
local allowDiagonal = true -- allow diagonal moves  
-- Inits our pathfinder instance  
local pather = Jumper(map,walkable,allowDiagonal,Jumper.HEURISTIC.MANHATTAN)  
local startX, startY = 1,1 -- starting point  
local endX,endY = 3,3 -- ending point  
-- Gets our path, t  
local path, cost = pather:searchPath(startX,startY,endX,endY)  

Find it on Github, with Documentation, usage examples, and visual demos!
Page : Jumper
Github : Jumper [import]uid: 142361 topic_id: 30317 reply_id: 330317[/import]

Excellent work, thanks for sharing.

PS: Are you the same Yonaba who made “The age of nations” homebrew RTS game for the PSP? [import]uid: 84637 topic_id: 30317 reply_id: 121483[/import]

Yep, totally. That’s me. [import]uid: 142361 topic_id: 30317 reply_id: 121541[/import]

Nice to see you here! I knew you back then, you would have known me as “zack” in those days.

You may recall the wolfenstein 3d port and luaplayer euphoria i made for the psp back then under the alias of “zack”

[import]uid: 84637 topic_id: 30317 reply_id: 121543[/import]

Yep, I do remember. Back in the old days…
Actually, I recognized the avatar, but I wasn’t that sure about where I saw it. There’s been a long time!
Good to see you’re still active. I’ve been quite busy the past days, but actually i’m back to coding, and sharing my good snippets. :stuck_out_tongue: [import]uid: 142361 topic_id: 30317 reply_id: 121551[/import]

thanks for the share, i am sure i can use it the sooner or latter! [import]uid: 90610 topic_id: 30317 reply_id: 121554[/import]

Excellent work, thanks for sharing.

PS: Are you the same Yonaba who made “The age of nations” homebrew RTS game for the PSP? [import]uid: 84637 topic_id: 30317 reply_id: 121483[/import]

Yep, totally. That’s me. [import]uid: 142361 topic_id: 30317 reply_id: 121541[/import]

Nice to see you here! I knew you back then, you would have known me as “zack” in those days.

You may recall the wolfenstein 3d port and luaplayer euphoria i made for the psp back then under the alias of “zack”

[import]uid: 84637 topic_id: 30317 reply_id: 121543[/import]

Yep, I do remember. Back in the old days…
Actually, I recognized the avatar, but I wasn’t that sure about where I saw it. There’s been a long time!
Good to see you’re still active. I’ve been quite busy the past days, but actually i’m back to coding, and sharing my good snippets. :stuck_out_tongue: [import]uid: 142361 topic_id: 30317 reply_id: 121551[/import]

thanks for the share, i am sure i can use it the sooner or latter! [import]uid: 90610 topic_id: 30317 reply_id: 121554[/import]

Hi folks,

I’ve been working on some updates.
Jumper nows works a little bit faster. I made some enhancements on return values (making profit of Lua’s ability to yield multiple values instead of packing them into tables). As a result, internal processes runs faster and reduces the memory footprint overall.

I’ve also added an autosmoothing feature that can be turned on/off.

I’ve also added chaining feature that could be interesting when one feels the need to reconfigure a pather instance in a quick and elegant manner. All setters are supported.

Documentation, and demos have been updated.
Hope you like it!

See Jumper on Github

PS: Actually, I would love some demos with Corona. As i’m working with some other frameworks, I don’t know much of Corona’s API and I miss time to get my hands with it. So I am looking forwared some kind people that would gently propose a little demo, self explanatory, on how to make use of Jumper with Corona. Would be greatly apreciated.
[import]uid: 142361 topic_id: 30317 reply_id: 125262[/import]

Hi all,

Jumper now moves to v1.3.1.
I’ve changed the way differents files were called internally, to make Jumper independant from Lua’s built-in module function. Some people were complaining about some errors when calling the library, that should be fixed now.
Added to that, Jumper’s should be now compatible with Lua 5.2 (but not fully tested yet, though).
Some bugs about the global env pollution with globals generated by Jumper were also fixed.
Have fun with it! [import]uid: 142361 topic_id: 30317 reply_id: 125403[/import]

Hi folks,

I’ve been working on some updates.
Jumper nows works a little bit faster. I made some enhancements on return values (making profit of Lua’s ability to yield multiple values instead of packing them into tables). As a result, internal processes runs faster and reduces the memory footprint overall.

I’ve also added an autosmoothing feature that can be turned on/off.

I’ve also added chaining feature that could be interesting when one feels the need to reconfigure a pather instance in a quick and elegant manner. All setters are supported.

Documentation, and demos have been updated.
Hope you like it!

See Jumper on Github

PS: Actually, I would love some demos with Corona. As i’m working with some other frameworks, I don’t know much of Corona’s API and I miss time to get my hands with it. So I am looking forwared some kind people that would gently propose a little demo, self explanatory, on how to make use of Jumper with Corona. Would be greatly apreciated.
[import]uid: 142361 topic_id: 30317 reply_id: 125262[/import]

Hi all,

Jumper now moves to v1.3.1.
I’ve changed the way differents files were called internally, to make Jumper independant from Lua’s built-in module function. Some people were complaining about some errors when calling the library, that should be fixed now.
Added to that, Jumper’s should be now compatible with Lua 5.2 (but not fully tested yet, though).
Some bugs about the global env pollution with globals generated by Jumper were also fixed.
Have fun with it! [import]uid: 142361 topic_id: 30317 reply_id: 125403[/import]

Hi all,
Jumper now reaches v1.4.1.
Some changes were brought internally, but they won’t affect the public interface.
Hope you like it!

[import]uid: 142361 topic_id: 30317 reply_id: 126388[/import]

Hi all,
Jumper now reaches v1.4.1.
Some changes were brought internally, but they won’t affect the public interface.
Hope you like it!

[import]uid: 142361 topic_id: 30317 reply_id: 126388[/import]

Hi folks,

I’ve been working on some changes in Jumper (now at v1.5.0)
Some people were complaining about issues with loading collision maps built with external tools and exported to Lua. Such maps were non-compatible with Jumper, as they were starting indexing at location different than (1,1).
This is now fixed. For now on, collision maps passed to init Jumper can start indexing at any integer. The only obligation is the cells must be indexed with consecutive integers.
Also, the heuristic name ‘CHEBYSHEV’ was removed, as it was just an alias.Now use ‘DIAGONAL’ instead.

I have also created a new repository (Jumper-Examples) where i’ll be pushing examples of use for this library. If someone come up with a clean demo, i’ll be happy to know about that.

Thanks. [import]uid: 142361 topic_id: 30317 reply_id: 126651[/import]

Jumper is insane! Very helpful. Thanks for sharing your work :slight_smile: [import]uid: 105707 topic_id: 30317 reply_id: 126696[/import]

Hi folks,

I’ve been working on some changes in Jumper (now at v1.5.0)
Some people were complaining about issues with loading collision maps built with external tools and exported to Lua. Such maps were non-compatible with Jumper, as they were starting indexing at location different than (1,1).
This is now fixed. For now on, collision maps passed to init Jumper can start indexing at any integer. The only obligation is the cells must be indexed with consecutive integers.
Also, the heuristic name ‘CHEBYSHEV’ was removed, as it was just an alias.Now use ‘DIAGONAL’ instead.

I have also created a new repository (Jumper-Examples) where i’ll be pushing examples of use for this library. If someone come up with a clean demo, i’ll be happy to know about that.

Thanks. [import]uid: 142361 topic_id: 30317 reply_id: 126651[/import]