Random dungeon generator

Random dungeon generator

Alright, version 0.1 of my humble random dungeon generator is out. Had to solve the dam thing with paper and pencil first. The style of the code is... well... utter chaos, but it works. You can get it here:

https://github.com/m7600/random_dungeon_generator

To use it, simply clone or download it, open the folder in a terminal, use cmake . and make, and then just run the executable. It will generate a .txt file called "outputmap.txt". Move outputmap.txt to a folder like /flare-game/mods/empyrean_campaign/maps, and then you can open it with Tiled.

Currently it generates a random-sized dungeon between 80-100 tiles in width/height, as well as 16 randomly sized rooms. I used srand() and rand() for this, I know that they are not the best option for generating random numbers, but I can change that later.

The walls all face the directions that they should face. The next step will be to add passages between the rooms.

Here are some screenshots, the first one shows only the floor tiles, then the walls, and finally the collision layer (which still needs some work).

Anyways, maybe this never gets implemented, but with some love it could still be a useful tool for modders, for quickly generating dungeon maps, that can be edited further with Tiled.

Attachments: 
Preview
Screenshot from 2019-10-24 20-45-57.png Screenshot from 2019-10-24 20-45-57.png 268.8 Kb [0 download(s)]
Preview
Screenshot from 2019-10-24 20-46-00.png Screenshot from 2019-10-24 20-46-00.png 303.6 Kb [1 download(s)]
Preview
Screenshot from 2019-10-24 20-46-05.png Screenshot from 2019-10-24 20-46-05.png 324.6 Kb [0 download(s)]