Hey o/
It's actually pretty simple/dumb. I just tinkered. It only takes 3 steps:
- Just pick some random positions for nodes. Any position is valid as long as it isn't too close to an existing node. The number of nodes you choose to add is proportional to the area of the map.
- Connect every node to its nearest neighbour node. And have a 50% chance of connecting it to up to 2 more nearby neighbours.
- Now you've got a random scattering of nodes, some connected in clumps, you want to join these "islands". So for every node, find all the nodes it can reach via connections, then find the nearest neighbour that ISN'T in this set and connect to it. Repeat this process until there are no separate sets.
That's it!
That said, the output isn't actually that great imo.
I have played with more intelligent generation rules. I've got a local version I've been trying to polish into more of a complete game. But finding more mechanics that feel fun, and find a way to balance it better is tricky, so it's not felt good-enough to push up yet.