Easy pathfinding in your libgdx game

My first A* visualizer

I v0.2.4 of my java pathfinding library has been uploaded, which now features a libgdx-bridge (which can be still much improved, but can already save you lots of typing) and ThetaStarFinding for smoother paths! That means that the library contains 3 different path finding algorithms: A*, Jump Point and Theta*. Hurray!

It tries to have as generic as possible implementations for different path finding algorithms, mostly used in games.
To be generic and allow having your own customizations, the pathfinding library possess a bunch of core interfaces on which it works:


This ones is a representation of a graph node, it contains information needed to traverse any kind of NavigationGraph

An agroupation of NavigationNode's, which is capable of providing some information about itself, such as if a node has line of sight to another one, or what are the neighbors nodes of each node.


This interface is responsible for providing a possible path from one to another one, no matter the graph you feed to it.


The heuristic to calculate distance from one to another, current implementations are ManhattanDistance, ChebyshevDistance and EuclideanDistance

The pathfinding library contains already an implementation for grid graphs (NavigationGrid, GridCell, allowing easy integration into your game if you are using a tile map, for example. You can find more information about it in the github repository.

comments powered by Disqus