{"id":22016473,"url":"https://github.com/yonaba/jumper","last_synced_at":"2025-04-04T13:10:18.711Z","repository":{"id":4999602,"uuid":"6157826","full_name":"Yonaba/Jumper","owner":"Yonaba","description":"Fast, lightweight and easy-to-use pathfinding library for grid-based games","archived":false,"fork":false,"pushed_at":"2022-10-21T09:02:33.000Z","size":553,"stargazers_count":631,"open_issues_count":36,"forks_count":125,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-04T12:53:19.683Z","etag":null,"topics":["gamedev","lua","pathfinding","pathfinding-algorithms","pathfinding-library"],"latest_commit_sha":null,"homepage":"http://yonaba.github.io/Jumper","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"remiprev/her","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yonaba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-10T13:34:13.000Z","updated_at":"2025-04-01T23:31:56.000Z","dependencies_parsed_at":"2023-01-11T16:37:21.590Z","dependency_job_id":null,"html_url":"https://github.com/Yonaba/Jumper","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yonaba%2FJumper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yonaba%2FJumper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yonaba%2FJumper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yonaba%2FJumper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yonaba","download_url":"https://codeload.github.com/Yonaba/Jumper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182399,"owners_count":20897381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gamedev","lua","pathfinding","pathfinding-algorithms","pathfinding-library"],"created_at":"2024-11-30T04:35:27.647Z","updated_at":"2025-04-04T13:10:18.686Z","avatar_url":"https://github.com/Yonaba.png","language":"Lua","readme":"Jumper\n======\n\n[![Join the chat at https://gitter.im/Yonaba/Jumper](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Yonaba/Jumper?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Build Status](https://secure.travis-ci.org/Yonaba/Jumper.png)](http://travis-ci.org/Yonaba/Jumper)\n\n__Jumper__ is a pathfinding library designed for grid-based games. It aims to be __fast__ and __lightweight__.\nIt features a wide range of search algorithms, built within a clean interface with \nchaining features which makes it __very friendly and easy to use__.\u003cbr/\u003e\n\n__Jumper__ is written in pure [Lua][]. Thus, it is not __framework-related__ and can be used in any project embedding [Lua][] code.\n\n## Installation\nThe current repository can be retrieved locally on your computer via:\n\n### Bash\n```bash\ngit clone git://github.com/Yonaba/Jumper.git\n````\n\n### Download (latest)\n* __Development version__: [zip](http://github.com/Yonaba/Jumper/zipball/master) | [tar.gz](http://github.com/Yonaba/Jumper/tarball/master) ( __please do not use this!__ )\n* __Latest stable release (1.8.1)__: [zip](http://github.com/Yonaba/Jumper/archive/jumper-1.8.1-1.zip) | [tar.gz](http://github.com/Yonaba/Jumper/archive/jumper-1.8.1-1.tar.gz) ( __Recommended!__ )\n* __All stable releases__: [tags](http://github.com/Yonaba/Jumper/tags)\n\n\n### LuaRocks\n```bash\nluarocks install jumper\n````\n\n### MoonRocks\n```bash\nluarocks install --server=http://rocks.moonscript.org/manifests/Yonaba jumper\n````\n\n## Installing Jumper\nCopy the contents of the folder named [jumper](http://github.com/Yonaba/Jumper/blob/master/jumper) and its contents and place it inside your projet. Use *require* function to import any module of the library.\n\n## A Simple Example of Use\nHere is a simple example explaining how to use Jumper:\n\n```lua\n-- Usage Example\n-- First, set a collision map\nlocal map = {\n\t{0,1,0,1,0},\n\t{0,1,0,1,0},\n\t{0,1,1,1,0},\n\t{0,0,0,0,0},\n}\n-- Value for walkable tiles\nlocal walkable = 0\n\n-- Library setup\nlocal Grid = require (\"jumper.grid\") -- The grid class\nlocal Pathfinder = require (\"jumper.pathfinder\") -- The pathfinder class\n\n-- Creates a grid object\nlocal grid = Grid(map) \n-- Creates a pathfinder object using Jump Point Search\nlocal myFinder = Pathfinder(grid, 'JPS', walkable) \n\n-- Define start and goal locations coordinates\nlocal startx, starty = 1,1\nlocal endx, endy = 5,1\n\n-- Calculates the path, and its length\nlocal path = myFinder:getPath(startx, starty, endx, endy)\nif path then\n  print(('Path found! Length: %.2f'):format(path:getLength()))\n\tfor node, count in path:nodes() do\n\t  print(('Step: %d - x: %d - y: %d'):format(count, node:getX(), node:getY()))\n\tend\nend\n\n--\u003e Output:\n--\u003e Path found! Length: 8.83\n--\u003e Step: 1 - x: 1 - y: 1\n--\u003e Step: 2 - x: 1 - y: 3\n--\u003e Step: 3 - x: 2 - y: 4\n--\u003e Step: 4 - x: 4 - y: 4\n--\u003e Step: 5 - x: 5 - y: 3\n--\u003e Step: 6 - x: 5 - y: 1\n````\n\n## Specs\nSpecs tests have been included.\u003cbr/\u003e\nYou can run them using [Telescope](http://github.com/norman/telescope) with the following command \nfrom the [root](http://github.com/Yonaba/Jumper/blob/master/jumper) folder:\n\n```\ntsc -f specs/*\n```\n\n## Credits and Thanks\n\n* [Daniel Harabor][], [Alban Grastien][] : for the [Jump Point Search](http://harablog.wordpress.com/2011/09/07/jump-point-search/) algorithm.\u003cbr/\u003e\n* [XueXiao Xu][], [Nathan Witmer][]: for the [JavaScript port][] of the algorithm.\u003cbr/\u003e\n* [Steve Donovan](http://github.com/stevedonovan): for the awesome documentation generator tool [LDoc](http://github.com/stevedonovan/ldoc/).\n* [Srdjan Markovic](http://github.com/srdjan-m), for his tremendous feedback.\n\n## License\nThis work is under [MIT-LICENSE][]\u003cbr/\u003e\nCopyright (c) 2012-2013 Roland Yonaba.\n\n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\u003cbr/\u003e\n\u003e of this software and associated documentation files (the \"Software\"), to deal\u003cbr/\u003e\n\u003e in the Software without restriction, including without limitation the rights\u003cbr/\u003e\n\u003e to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\u003cbr/\u003e\n\u003e copies of the Software, and to permit persons to whom the Software is\u003cbr/\u003e\n\u003e furnished to do so, subject to the following conditions:\u003cbr/\u003e\n\u003e\u003cbr/\u003e\n\u003e The above copyright notice and this permission notice shall be included in\u003cbr/\u003e\n\u003e all copies or substantial portions of the Software.\u003cbr/\u003e\n\u003e\u003cbr/\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\u003cbr/\u003e\n\u003e IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\u003cbr/\u003e\n\u003e FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\u003cbr/\u003e\n\u003e AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\u003cbr/\u003e\n\u003e LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\u003cbr/\u003e\n\u003e OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\u003cbr/\u003e\n\u003e THE SOFTWARE.\n\n[Jump Point Search]: http://harablog.wordpress.com/2011/09/07/jump-point-search/\n[Lua]: http://lua.org\n[L�ve]: http://love2d.org\n[L�ve2d]: http://love2d.org\n[L�ve 0.8.0 Framework]: http://love2d.org\n[Dragon Age : Origins]: http://dragonage.bioware.com\n[Moving AI]: http://movingai.com\n[Nathan Witmer]: http://github.com/aniero\n[XueXiao Xu]: http://github.com/qiao\n[JavaScript port]: http://github.com/qiao/PathFinding.js\n[Alban Grastien]: http://www.grastien.net/ban/\n[Daniel Harabor]: http://users.cecs.anu.edu.au/~dharabor/home.html\n[the algorithm and the technical papers]: http://users.cecs.anu.edu.au/~dharabor/data/papers/harabor-grastien-aaai11.pdf\n[MIT-LICENSE]: http://www.opensource.org/licenses/mit-license.php\n[heuristics.lua]: http://github.com/Yonaba/Jumper/blob/master/Jumper/core/heuristics.lua\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/Yonaba/jumper/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n[![githalytics.com alpha](https://cruel-carlota.pagodabox.com/5165385288dcb27776c96dce1a82e33d \"githalytics.com\")](http://githalytics.com/Yonaba/Jumper)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonaba%2Fjumper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyonaba%2Fjumper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyonaba%2Fjumper/lists"}