Godot Version
4.1.1 stable
Question
I have created up this map here in Aseprite.
However, I am having a tough time trying to work out how to determine what a neighbour is.
I have an idea of trying to determine a neighbour by finding out who has either shared vertexes or shared edges. Though I am not sure how to go about finding the shared vertex/edge.
I thought I could potentially iterate over the image and if the pixel colour is black then I can at least determine I’ve hit a border but I’m not sure where to go from there.
I’ve used a red dot in the rough centre on the image for each ‘tile’, so using the above thought process, I can get a list of all the centroids so creating the ‘graph’ aspect is relatively straight forward.
Is this the right idea? Or is there a better/smarter way of handling pathfinding with irregular polygons.