- Home /
ftl-like map generator
Hey guys. i am trying to do ftl-like map generator. I can generate nodes randomly and define start-exit as you can see in image. But i couldn't establish meaningful paths. I try to chose closest nodes to move, but dead end occurs. (cannot even reach exit.) I try to make circle, but not as required again. Can you suggest me a way? I want to create ftl-like movement. Thanks.
Answer by Mikael-H · Apr 04, 2017 at 05:45 AM
One way is to do delaunay triangulation of the points to get a graph where all nodes are gauranteed to be connected. Then you can remove edges in the graph one by one, checking that each removal does not affect the ability to reach the start node, by using pathfinding.
Thanks. It's quite hard to implement as far as i understand...
Well depends on if you know your way around a pathfinder :) you'll be fine with a simple depth or breadth first search which should be farily simple to implement. You'll need to make it able to traverse the graph that the triangulator spits out. It might be a couple of hours worth of work if you've never done it before.