Original Post
I will use this image to help explain my problem:
I'm writing a dungeon generator. It's pretty much finished, except for one problem. The dungeons are a bit too linear. They're not completely linear, but they could definitely have more loops in them. That's what I'm trying to do. The idea is to randomly pick two rooms. Then, use a pathfinding algorithm to get a path from the first room to the second room, and then dig a tunnel there. Currently, my pathfinding gives a path similar to the one colored in green. That, however, is not what I would like the path to look like. I want it to actually look like the one highlighted in red. Got any ideas? If you'd like to post code, please use either C++ or pseudo-code. I'm using a language that I'm sure most of you don't know about. Anyway, thanks. [edit] Also, I'm not looking to get the shortest path between the two rooms. Any distance path works fine.