Yeah, I'm aware of the distance issue. Railworld settings won't effect that. As soon as I come up with a decent, workable idea for a fix it's going to get added.
The generation algorithm is actually really simple once you get the basic concept:
1) Divide the world into 32-chunks-to-a-side squares.
2) Each "Big Square" generates either North+South or East+West for its guaranteed connections to other squares. and picks random locations on those sides for the actual connection points. This is sufficient to guarantee that there is always more maze to explore.
3) Generate clearing locations for the Big Square.
4) Run up to step 2 for the adjacent Big Squares, so you know where to put all the gaps in this one's edges.
5) Simple depth-first maze generator for the contents of the Big Square.
6) Do lots of dumb stuff to make the walls look like rivers, ravines and mountains. (Seriously, it's mostly just geometry, but cliffs were a PITA. Look inside control/walls if you really want to know all the details there) River fords are generated as part of this, so are always shortcuts to the maze, as are the mountain/river interfaces (I'm not 100% happy with those, I personally prefer river+ravine because of that)