This tool generates maps similar to one in Slay the Spire
Video tutorial about this tool: YouTube
Based on https://github.com/yurkth/stsmapgen
- Generate points on a grid randomly
- Connect all the points without intersecting edges
- Find path between to points on graph using BFS (or A*)
- Remove points from path to generate different path
- Repeat steps 3 and 4 a few times
Just copy and paste MapGenerator.gd into your project folder.
After that just call it from your scripts with:
var generator = load("res://MapGenerator.gd")
var map_data = generator.generate(30, 200, 12)
You can find example of generating map with this tool in example folder.