Summary
The Roguelike Dungeon Generator was a solo project written in Java, which uses various configurable parameters to generate a random dungeon.
It was meant to be a design test for a later rewrite in C++, to use with the Unreal 4 game engine. It implements the
design scheme laid out by Bob Nystrom,
with some additions for room overlap capacity and trap placement.
The program uses System.out to display the dungeon (meant exclusively for testing as this is designed for use as a subsystem of a larger game),
so if you’re running the jar, I advise that you do so from the command line. It uses Unicode characters for Full Block and shaded blocks, which
appear as ?’s in the Windows command line.
How To Use
Run the jar from the command line, or open the project and run from eclipse.
The map is generated to default parameters, but is dynamic within the code.
Some parameters are configurable through command line arguments, but not all. The remaining arguments are under construction.
Arguments
-w [val] : Sets the width of the map. I recommend not setting it higher than 100, as the hallway placement recursion causes a segmentation fault in excessively large maps.
-h [val] : Sets the height of the map. I recommend not setting this higher than 100 either.
-rw [val] : Sets the minimum room width. This can be no less than 1, and no greater than the map width, for obvious reasons. If this is set higher than the maximum width, it will automatically replace the maximum width to itself.
-rW [val] : Sets the maximum room width. This can be no less than 1, and no greater than the map width, for obvious reasons. If this is set lower than the minimum width, it will automatically replace the minimum width to itself.
-rh [val] : Sets the minimum room height. This can be no less than 1, and no greater than the map height, for obvious reasons. If this is set higher than the maximum height, it will automatically replace the maximum height to itself.
-rH [val] : Sets the maximum room height. This can be no less than 1, and no greater than the map height, for obvious reasons. If this is set lower than the minimum height, it will automatically replace the minimum height to itself.
Key
S : Starting point, where a player character would spawn into the level.
+ : The level exit.
Shaded areas: Acid pools, which deal damage to the player for every turn they remain in them.
The darker the shading, the more damage it would deal. A Number in the middle represents the strength of the acid pool, if greater than 3.
-#-: A mine, which deals damage to the player once then disappears. A higher number means more damage is done. These might also have secondary effects.
B#x: A Bug, which attaches to the player and continually applies its effect. The x represents a varying letter, which tells you which type of bug it is.
Current types are b (bits/money), m (memory/party slot), and r (return/kick party members). These were modeled after Digimon World 2, which inspired this project.
[#]: Rock wall. This has no effect, other than blcking the player. Can be destroyed. A higher number takes a stronger attack to break.
{#}: Mag wall. This is hidden until walked upon, at which point it deals the player and knocks them back. Cannot be passed until it is destroyed.
A higher number takes a stronger attack to break.
Enemy and treasure placement were part of the algorithm, but were later deferred to be placed by the parent running the algorithm. This was to simplify the parameters of
the algorithm, since many different enemy types and strengths, as well as treasures, would be available.