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]