When clicking the download link for the TLpath library, here, it comes up with a Dropbox 404 page. Other path-finding libraries I've tried for Love are a little too complicated for me. Was hoping to try this one in case it was simpler. If it's not available anymore I'd appreciate the easiest path-finding library, I'm pretty bad at this stuff
BTW: The game I'm making is tile-based, so don't worry about the "scalability" of the library.
TLpath library gone
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
TLpath library gone
gaeem defelpmint is maiy pashin
Itch: Freakman
Itch: Freakman
Re: TLpath library gone
This one is really simple to implement:
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
In tiled games, each node of the graph always has 4 (or 8 if you allow diagonal move) neighbors. Costs (the numbers at the edges) depend on the terrain. You can use 1 if all moves have an equal cost.
There is pseudo code on the page which should be fairly easy to translate to Lua.
Edit: Lua example:
https://rosettacode.org/wiki/Dijkstra%27s_algorithm#Lua
Edit 2: A* is more efficient in the average case for games, but harder to understand. Still, if you want something better than Dijkstras, A* is it.
An open source implementation in Lua: https://github.com/lattejed/a-star-lua
MIT License allows all sort of usage, including commercial usage. But google will give you plenty more, A* is something many games use.
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
In tiled games, each node of the graph always has 4 (or 8 if you allow diagonal move) neighbors. Costs (the numbers at the edges) depend on the terrain. You can use 1 if all moves have an equal cost.
There is pseudo code on the page which should be fairly easy to translate to Lua.
Edit: Lua example:
https://rosettacode.org/wiki/Dijkstra%27s_algorithm#Lua
Edit 2: A* is more efficient in the average case for games, but harder to understand. Still, if you want something better than Dijkstras, A* is it.
An open source implementation in Lua: https://github.com/lattejed/a-star-lua
MIT License allows all sort of usage, including commercial usage. But google will give you plenty more, A* is something many games use.
In soviet russia, code debugs you.
Who is online
Users browsing this forum: No registered users and 55 guests