Page 3 of 3
Re: pathfun: a pure Lua library for 2D pathfinding, with editor
Posted: Fri May 05, 2023 1:30 pm
by darkfrei
Is it possible to limit the length of the line and use it as a worms-style rope? Here Worms is a good old game:
https://en.wikipedia.org/wiki/Worms_Armageddon
Re: pathfun: a pure Lua library for 2D pathfinding, with editor
Posted: Fri May 05, 2023 2:53 pm
by apicici
I'm very familiar with Worms
I don't think something like that would work with this library because of the way the pathfinding works: it uses the funnel algorithm on polygonal meshes, so it first finds a path of adjacent polygons and then uses string-pulling to make it as short as possible. In order to limit the length I think it would have to be a fully vertex based approach, where each vertex is a node in a graph and nodes are connected if they are in line of sight (I may be wrong, though).
Re: pathfun: a pure Lua library for 2D pathfinding, with editor
Posted: Mon Aug 28, 2023 10:22 am
by aleperry
I apologize for the delay, I try to be as clear as possible, currently the steps to create a map are:
1) I open the game map.
2) I place the editor on the map and adjust the transparency with a third party tool.
3) I trace the map trying to be more accurate as possible.
4) with a lua script I flip the coordinates (on an x=y axis) and apply an offset to the coordinates to switch from the editor's default reference system to the game one.
5) with a last script I transform the coordinates from the proportions of the editor (monitor resolution) to those of the game.
6) I open the map in the editor and I check that I haven't screwed up things
.
Unfortunately every correction is made by roughly modifying the map and recalculating the coordinates with the scripts, since I can view the game coordinates it would be much easier to be able to set the origin of the axes and the scale (or the proportions of the map). I have attached an image to try to explain better.
- Example
- Enhaced.png (219.13 KiB) Viewed 6918 times