A very tiny GDExtension addon for Godot that allows you to skeletonise bitmaps. I.e. given an image, find the 'centers' of the paths.
This can be used, for example, to find the centers of player-built paths.
This uses a skeletonisation script by LingDong, available here: https://github.com/LingDong-/skeleton-tracing
- Go to the
actions
tab in github - Click the latest passing workflow run
- Scroll down to
artifacts
and downloadmap-pathfinder
- In the zip there is an addons folder. Copy the file
map-pathfinder
into your Godot projectsaddons
directory
Given a bitmap, converts it into polylines (Array of Vector2is that connect to each other)
Converts polylines (usually generated from above function) into an AStar2D graph
I provide this repository in the hopes it is useful to you. However, please not I do not intend to support it outside of any modifications needed for my projects.