DungeonMaker
The constants-file
(casual users: hands off !)
Actually, I've kept my hands off the variables in this file myself, though
I see potential in a few to use them for valid design purposes. Since the
DungeonMaker is not equipped to switch between different constant-files,
be aware that if you change the parameters you will change (and possibly break) all
the predesigned dungeons that come with the program. But here, without further
ado, is the complete constants-file that comes with the DungeonMaker:
maxCrawlers = 800
minCorrWidth = 2
smallestRoomWidth = 3
chDirOnStraight = 30
jumperLife = 7
joinDist = 13
You should only change these constants if you know what you're doing
Here's what you'd be doing:
maxCrawlers is the maximum number of Crawlers (and Jumpers) that can
exist in the dungeon at any one time. If there are maxCrawlers
live Crawlers, and one of them tries to make a baby, it will be aborted, and
the letter C (for Crawler) of J (for Jumper) will be printed to the console.
In larger dungeons this regularly happens, but it is not really a concern -
800 Crawlers will eventually fill the dungeon nicely, thank you very much.
If you are bothered by long lines of C's and J's on your screen, by all means
raise the value. Using a very low value (like maxCrawlers = 50) is an
interesting design option that can add a new and unpredictable dimension
of randomness to the generated dungeons.
minCorrWidth enforces that all corridors in the dungeons will have
at least this width. If one of the values in the stats-file is
lower, it is not used but set to this value. Also, the distance between
the columns laid down by ColumnJumpers is always minCorrWidth.
If you try to build a room with a width smaller than
smallestRoomWidth, the program will complain and simply not build it.
This is to make sure that doors in rooms have actually walls to their sides.
chDirOnStraight is an important parameter, and the one you would most likely
want to have variable to get different design options. In generation 0, we really
want our WallCrawlers to head off in their assigned Direction, and not
amble all over the place. To enforce this, the use of changeDirProb
was modified for generation zero as follows: When Forward is
different from Direction for these Crawlers (they are not facing where
they should be heading), changeDirProb is used as normal - but when they
are facing where they should be heading, and the roll of the dice has
determined they should be changing their Forward direction (which would
lead them off course), the dice are rolled again, and the change is only executed
with a probability of chDirOnStraight. Thus, the lower chDirOnStraight
is, the straighter will be the walls built by first generation
Crawlers whose Direction is a legal Forward value. Crawlers with
a diagonal Direction (such as NorthEast) are not affected by
chDirOnStraight and will tend to zigzag awfully if
changeDirProb is set to a high value.
jumperLife is the equivalent of maxAge for ColumnJumpers, only
it is set here to the same value for all Jumpers that ever come into being.
joinDist is a very tricky parameter that can mess things up badly, but
that one might very well want to use in dungeon design. When a Crawler
that wants to leave no opening at the end of its run looks ahead to see whether
there is room to build a wall, he will join an existing wall in front of him
if and only if it is no more than joinDist spaces ahead. If the value is set too
high, such Crawlers will build long straight stretches of walls in this situation,
which can look quite out of place in many dungeons, and if it is too low, too many
Crawlers will never get into a situation where they will join up with an existing wall.