A simple dijkstra pathfinding library in lua, with demonstration program in love2d
Controls:
Left click: add/remove source
Right click: add/remove wall
[C] enable/disable colors
[X] enable/disable ‘X’ marks on sources
[P] enable/disable path drawing
[D] enable/disable diagonal movement
[N] enable/disable numbers
[F] switch between normal and inverted Dijkstra’s maps
Inverted map searches for the path away from sources
[+]/[-] adjust inverted map’s constant
The lower it is, the closer are the places that are considered “safe”.