Random Path Algorithm

Quick follow up to my previous post, I found the same technique is pretty good at generating organic looking random paths. You simply start with an empty room, and keep randomly filling points until it is no longer possible to add any more without disconnecting the room. What’s left is a nicely wiggly pathway.

Edit: I’ve made a much better implemenation since publishing this article. Read here instead.

Try a demo. Click to add/remove anchor point, where the path must pass through.

Generate a new path