Closed madmenyo closed 5 years ago
Sounds about right; DungeonGenerator (or SectionDungeonGenerator) is the class that blocks out disconnected areas. You can feed the char[][]
to DungeonGenerator and it will find the largest walk-able area and wall off any areas that aren't connected to it. DungeonGenerator can also add doors, grass, and boulders, and splash water around.
You can also use DungeonUtility.debugPrint(char[][])
to print dungeons; your approach works fine though and also allows substitutions on the StringBuilder or the String it produces, which debugPrint() does not.
I generated a view maps with the DenseRoomMapGenerator.Java and it always leaves some unconnected areas. Your link to the output in the comments has everything connected.
Reproduce:
I have yet to find a seed that connects every section.
throw it in here to see results, but I bet you have other ways :).
Version: 3.0.0-b10'