{"id":32488326,"url":"https://github.com/xaguzman/pathfinding","last_synced_at":"2026-03-05T14:03:58.652Z","repository":{"id":16991817,"uuid":"19754853","full_name":"xaguzman/pathfinding","owner":"xaguzman","description":"Java pathfinding framework. ","archived":false,"fork":false,"pushed_at":"2022-01-27T01:48:35.000Z","size":207,"stargazers_count":98,"open_issues_count":4,"forks_count":27,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-27T07:51:47.274Z","etag":null,"topics":["gamedev-tool","java","libgdx","pathfinding-library"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xaguzman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-13T20:33:20.000Z","updated_at":"2025-10-11T04:03:42.000Z","dependencies_parsed_at":"2022-07-13T13:51:35.370Z","dependency_job_id":null,"html_url":"https://github.com/xaguzman/pathfinding","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/xaguzman/pathfinding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaguzman%2Fpathfinding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaguzman%2Fpathfinding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaguzman%2Fpathfinding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaguzman%2Fpathfinding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xaguzman","download_url":"https://codeload.github.com/xaguzman/pathfinding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xaguzman%2Fpathfinding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30130031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T12:40:50.676Z","status":"ssl_error","status_checked_at":"2026-03-05T12:39:32.209Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-tool","java","libgdx","pathfinding-library"],"created_at":"2025-10-27T07:51:27.583Z","updated_at":"2026-03-05T14:03:58.622Z","avatar_url":"https://github.com/xaguzman.png","language":"Java","readme":"[![Build Status](https://travis-ci.org/xaguzman/pathfinding.svg?branch=master)](https://travis-ci.org/xaguzman/pathfinding)\n\npathfinding - APACHE LICENSE 2.0\n==========\n\n\u003cp\u003e\nA java pathfinding library meant to be used for games.\nIt is generic enough to be used in different kind of graphs (though, right now it only has implementation for grid graphs).\n\nIt was heavily inspired by [this](https://github.com/qiao/PathFinding.js/ \"Pathfinding.js\") javascript library. Code initially was adapted, then\nsome modifications were made.\n\nThis library works with Libgdx's html5 backend, it was even used in my [#1GAM january entry](https://github.com/xaguzman/shiftingislands/ \"Shifting Islands Source\").\n\nCurrent versions: \n* 0.2.6\n\n__________\n\n## Installing\nThe library has been uploaded to sonatype oss repository.\nIf you are using libgdx you can install it via graddle adding this dependency to your core project:\n\n\u003e\tcompile \"com.github.xaguzman:pathfinding:0.2.6\"\n\nThere's also the [gdx-bridge](https://github.com/xaguzman/pathfinding/tree/master/gdx-bridge) extension to easily get pathfinding features\nin your game directly from your tmx maps.\n\n## Intro\nThe library works on a bunch of interfaces:\n* NavigationNode: this basically just represents a node of a graph. contains some getters and setters meant for navigation. Right now, only implementation is GridCell\n* NavigationGrap: a group of navigation nodes. Right now, only implementation is NavigationGrid\n* PathFinder: the implementation for the pathfinding algorithm, current options are:\n\t* AStarFinder\n\t* AStarGridFinder\n\t* JumpPointFinder\n\t* ThetaStarFinder\n\t* ThetaStarGridFinder\n\nFinders are fed with so called PathFinderOptions, which determine how the pathfinding will work (allowing diagonal movement, for example).\n\n## How to use\nYou need to create a graph.\nBe aware the the NavigationGrid class, expects a bidimensional array of GridCell stored as [x][y]\n\n```java\t\n//these should be stored as [x][y]\nGridCell[][] cells = new GridCell[5][5];\n\t\n//create your cells with whatever data you need\ncells = createCells();\n\t\n//create a navigation grid with the cells you just created\nNavigationGrid\u003cGridCell\u003e navGrid = new NavigationGrid(cells);\n```\n\nNow, you need a finder which can work on your graph.\n\n```java\n//create a finder either using the default options\nAStarGridFinder\u003cGridCell\u003e finder = new AStarGridFinder(GridCell.class);\n\t\n//or create your own pathfinder options:\nGridFinderOptions opt = new GridFinderOptions();\nopt.allowDiagonal = false;\n\t\nAStarGridFinder\u003cGridCell\u003e finder = new AStarGridFinder(GridCell.class, opt);\n```\nOnce you have both, a graph and a finder, you can find paths within your graph at any time.\n\n```java\nList\u003cGridCell\u003e pathToEnd = finder.findPath(0, 0, 4, 3, navGrid);\n```\n\t\nThat's pretty much all there is to using the library.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaguzman%2Fpathfinding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxaguzman%2Fpathfinding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxaguzman%2Fpathfinding/lists"}