Dungeon generator that produces a 2D-array of different values that can be used to create a dungeon for
a game. The script is written in Perl and generates a gif image of the dungeon.
The result of the script can look like this:
The dungeon generator will be used in Qake voxel-engine that can be found here:
And the result implemented in Qake voxel engine using the output from the script (though ported to C#) can look like this:
perl genmap.pl && open dungeon.gif
The algorithm is very basic but produces very good random dungeons.
The process is as follows.
Generate rooms of random sizes and make sure that they don’t overlap and also got some distance between them.
Add doors in the middle of each room.
From each door, try to draw a road of a certain size outwards until it hits either a road or another room.
Flood fill each room of the
Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/-ZUVmsjsB24/DungeonGenerator