Procedural Dungeon Toolkit - Dungeon Themed Procedural Generation Toolkit

Asset Store LinkPlayable DemoYoutube PlaylistUsage Manual

Procedural Dungeon Toolkit is a complete toolkit for your procedural dungeon or other procedural level generation needs ! Working on simple tile maps, creating your own levels with the asset is simple : A script generates and manages a procedural level tile map while included objects populate your level how, where and when you want it. This asset requires absolutely no scripting experience to generate custom procedural levels.

Get started creating your own levels in under 5 minutes using the near complete project scene featured in the playable demo and video. This asset will integrate perfectly with most model assets found on the asset store and also works with any other type of asset as long as you can provide a player game object to act as an origin for the object pooling.

While this is advertised as a dungeon generator because of the demo scene, included models and textures, Procedural Dungeon Toolkit can be easily used to generate any type of procedural levels simply by creating custom objects and chosing where, when and how often they spawn entirely using the Custom UI.

Control the look of the overall level layout using sliders and numeric seeds. Some minimal amount of programming throughout heavily commented code will unlock the full potential of the asset, as the current rules of the level generation are still not UI controllable ( to some extent ) . A custom tile map editor is also available which is useful to create your own dungeon levels instead of using the procedural generation algorithms.

Please note that this asset is still in development and features are constantly being added, fixed and improved as users and myself notice missing features and bugs.

The 60$ asset includes

Dungeon generation script featuring GUI to control the generator

Demo scene to get started using the asset under 5 minutes

NEW IN 1.29 : Multiplayer Support & Demo Scene

Models , Textures , Particle Effects to create a Dungeon Crawler Game

Navmesh Generation capabilities working with Unity 5.6 and Above

Tile Map editor to create your own levels or edit existing levels

Room Template editor to create complex rooms that are randomly placed into procedural levels

Integrated version of PDT Item Spawner to manage random item spawns on top of props

Ability to save a generated dungeon as a prefab file to manually make edits

Set of helpful scripts for things such as Light Flickering, Basic HUD, Explorable Map, Mob spawning & More

For those interested in how the generator works, here is a quick explanation : The actual map generation is done using algorithms that grow corridors and rooms out of a middle point. The script then spawns the necessary game objects around the player as you move around the map for enhanced performance.

You can also disable object pooling and load the entire map.

Spawning items around the dungeon is also easy, as you can tie an item spawn script to any prefab you are using in your generation process and decide what type of items can spawn on this prefab. I used this to make sure candles only generated on small drawers and tables.

The biggest part of the generation process that’s helpful for customizing the dungeons is the fact that the walls are actually cubes and corridors are wall sized empty areas capped off with floor and ceiling tiles. Basically to create any new object and have it properly scaled according to the environment simply create a corridor out of cubes in your 3D editor and scale the objects as if it were your actual environment.

Even if the level is essentially a tile map, round corners are entirely possible !

Then fixing the object placement is easy as you simply need to apply slight translations relative to the center of the current wall / empty area. This area is actually an empty game object storing every object at this position within the map. This also plays a role in object loading / unloading to keep performance stable even with huge levels.

Version 1.7 introduces a new GUI for creating and managing custom object generation, meaning you no longer have to edit code add your own objects to the generation process ! The editor features a translation editor as well as a drop down to select a pre generated pattern to detect where the object should generate. You can also easily create your own pattern by selecting custom pattern and using the available drop downs to create detection patterns and fully unlock the procedural generation capabilities of the asset !

With custom patterns , you can detect room entrances and add doors, detect a corner and add a rounded wall, detect a four way and add a pillar in the middle. You can detect single tiles and ignore everything else or create complex detection patterns. Using this same editor you can also control how often each object generate and enable randomized generation for things like torches and locked doors !

Version 1.10 introduces the new tile map editor to customize pre-generated maps as well as create your own tile maps entirely from scratch ! As you can see below, this editor uses native unity UI components and allows you to create your own maps and save them to disk as well as create dungeons with multiple spawn points or goals.

Here is the full usage manual for those interested in how the asset works!

If you have any questions or suggestions feel free to post in this thread or send me an email :slight_smile:

The Asset has finally been released on the asset store. Here is a link for people who want to go check it out : https://www.assetstore.unity3d.com/en/#!/content/71317

And here is an activation code for the first person to stumble upon this thread : ASV-AKHK-H4Q6-UNQK-HENK-MUUP

Saw this in the store new releases and added it to my wish list. Then tried the activation code and it worked so many thanks. Hope to get a chance to try it out soon.

Is it possible to create dungeons for top down view (so no ceilings?)

There is no easy toggle to remove ceilings as of yet ( just like for walls and floors , basically the essential components ) its still possible if you edit a little bit of code. But I will add this to a list of features to release as an update of early customer feedback since I guess it could interest a few people.

The generation process is currently optimized for 3D scenes as it doesnt add walls where players wouldnt be able to navigate so there will be empty gaps from a top down view but otherwise I dont see a problem.

Just added two demos of the asset on my Youtube channel for anyone interested , the first one about object pooling and how you can edit buffer size while the game is running :

Why would you want to edit the buffer size during gameplay ? Well this can be useful for larger rooms or boss rooms featuring more lighting than usual as well as the opposite for close up interactions , perhaps for cinematics containing high poly models.

The second one showcases a top down dungeon generated simply by adding a camera looking down and removing the ceilings :

hello,

is possible to update asset with this new demo scene ?

++

Would really appreciate a YouTube tutorial of how to set-up a level - talking through the process and explaining what needs to be done. This looks potentially brilliant but I want to make sure it does what I think it does. Would be particularly useful if you went into the detail of how to set-up the different spawning prefabs (you briefly mention spawning candles only on tables)

Many thanks indeed. Great work!

Sorry I dont really understand , Do you mean that the demo scene included with the asset isnt working or do you want the top down 2D scene as a demo scene ? I will include more quick start configurations as I update the asset. On that note I sent a new update sooner this week but it has yet to release. I will be posting an executable game demo showcasing the asset on this thread a little later as well , for those who want to walk around a generated dungeon by themselves.

You are most welcome :slight_smile: Thank you for your kind words , I really appreciate it !

And you are right : a full tutorial is absolutely needed for this kind of asset. I thought about doing a text based tutorial with a couple images but a video would show everything in detail with alot more ease… I shall equip myself with editing software ( was recording previous videos in single takes ) and will be posting the tutorial here once it is done. Thanks for your advice , I dont know why I did not realize many people would find this to be useful.

In the mean time I can still explain in detail how Item Spawning works since so far the method is quite simple. Essentially the generator has “Main” prefabs , used to generate the environment. Things like walls , ceiling , doors , drawers , tables , etc… Basically everything the player can “collide” with. Those simply generate by adding a game object to the slot on the script and enabling its toggle checkbox.

Items are generated on some of these game objects by placing an empty game object with a box collider on your building block ( to render the object and detect if the player has picked it up ) and using an item spawner script that takes a couple parameters , such as the item prefabs and the “type” of item spawn. The TYPE is where you can set the special parameters for the object spawn.

What I had in mind with this is that some objects ( like candles ) dont make sense being inside a chest or anywhere that isnt on top of the object it generated on. If you dont set the Item Spawn type to TABLE instead of DRAWER , no candles can generate on this spawn. For a large drawer you would set the all the spawns to DRAWER since every spawn has a wooden plank blocking the top making candles there unrealistic. For a small drawer you would set the top spawns to TABLE to allow candle generation on top of the drawer and DRAWER everywhere else to prevent it. So far I only have two preset types for Item generation being table and drawer since the last “Item” I worked on was the candle.

Now since items had little gameplay implications when I was writing item generation , this was used as a way to prevent generation of certain objects at certain spawns by first checking the type of spawn in script before adding a randomly generated object from your list of prefabs. However , this feature has way more implications in terms of what you can do with its restrictive capabilities. You could , for example , have a new CHEST category of items where only rare or unique items spawn. You could scan through the world and replace a fixed number of item spawns to OBJECTIVE spawns which only and absolutely must generate an object the player has to collect to complete the game / level. You could have a combo of a key holder building block that must generate next to a locked cell and add a key only item spawns.

As you can see just by preventing / enabling the generation of certain items based on where they will generate you can customize generation alot for certain types while keeping the entirely random generation intact for those that dont need any special attention.

Anyhow , I will upload a new tutorial explaining everything some time tonight and post it on this thread along with a small demo !

Quick note for those wondering about the demo scene not including the torches : at the time of release I was using a free asset for my fire particle effect , then tried making my own for release version and somehow couldnt figure it out so I just decided to release the demo as is without the torches. However as soon as I can make a fire effect im pleased with I will add them to the asset’s demo dungeon.

Quick update , a tutorial is out on my youtube channel showing off the steps required to generate dungeons from demo scene or entirely from scratch. I also try to explain various concepts related to item and prefab generation.

1 Like

New PDF guide out for those interested in the process behind creating and using your own assets with the generator : https://drive.google.com/open?id=0BxmPHU9LJYnFYXlJalFEN1o3M28

1 Like

Also , I finally got around to making a somewhat good looking fire particle system so the demo scene has been updated to include torches with particle effects as well as candles with particle effects , stairs and the barrel featured in the PDF tutorial. This version should come out some time this week.

I also decided to roll out a built version of the demo dungeon. This demo is exactly what you get by following the Quick Start steps in the README , except the currently released version of the asset doesnt contain torches yet , that comes with the next update awaiting approval. If you want to try it out for yourself , here are the download links for 32/64 bit Windows.

32 bit version | 64 bit version

1 Like

The update containing torches has been released sooner than I thought and is already available on the asset store ! again this version includes torches and candles with fire particle effects , stairs and barrels. The package also contains the tutorial PDF I linked in a previous post.

1 Like

I bought this great asset last week. Once I get caught up on work I plan on playing around with this. I really appreciate you taking the time to create a video tutorial. That’s something many assets are missing.

Quick question. This version adds stairs (very cool) but will the generator support multi-floors? And if so, can we specify different objects that can get spawned based on the level (for example, a boss at the lowest floor, or chest with a special sword, etc.)?

1 Like

Currently the generator does multi floor as a way to create more of the same corridors and room types although its entirely possible to achieve what you are trying to achieve , I plan on making another video tutorial or PDF about editing the generation process in a little bit but here is a quick explanation on how this could be achieved right now…

Basically at first the levels are first generated as tile maps , each tile having a certain type like empty , corridor , room entrance and room. Corridors are grown randomly , then room entrances are added and their surrounding areas filled randomly with room tiles.

I also added a entrance2 and room2 type of tiles that cannot connect to the room1 tiles. Right now the generation process is entirely random meaning the room content is not determined by room type , but you could force the generator to add a single “Boss Room Entrance” tile type that the generator will then force to generate only on the lower floor. Also , since right now the generation starts in the middle and expands in every direction , stairwells also have an entirely random UP or DOWN direction to them which you could force the generator to only place downwards , towards harder levels. Then unity could try to spawn a select amount of chests containing unique items , perhaps one on each floor , as well as mobs in the room2 types locked cells and bosses in your new boss rooms.

Based on the index of the current floor you can influence the generator , my current process however is entirely random and procedural : even if there are 2 distinct types of room in the generated map , unity treats them as the same and ties the same objects to it.

I hope this answered you question ! I plan on later adding a couple types of premade dungeons as well as a way to edit the generation process of the map outside of code so that you dont have to deal with code for adding or removing generation conditions.

Sounds good. Thanks for the answer.

Alright so next week I thought I would be concentrating on updating the GUI part of the asset and think it would be good if I asked you guys what you would like to see next in the asset. I think GUI is important for less script friendly users but you guys might think the asset just needs more models / room types or something else you thought of while using it. So I will create a poll that will influence my development efforts to try and release updates you guys need before the optional stuff.

If you have suggestions or request you can post them in this thread at any time.

Also , be sure to leave a quick review or rating on the asset page if you enjoyed it ! Remember that you can also use the support email to contact me directly about questions or ideas you have.

Quick update for the generator , I added a simple map script that allows you to replace a plane’s material with a live map of the level. Corridors and rooms show in white and gray while the player is the red tile. Blue squares are stairwells. The script has a toggle to enable switching between fully explored map as shown below or explorable map.

You can turn the map on and off using the M key , which makes it show up on the ground in front of the player. You can easily move the map by moving the plane on which it renders.


Now I see some unreachable rooms which I was not aware of since they seem to only appear after cleanup ( also since you cant reach them ) so im working on better room generation methods. The code is commented similarly to the prefab generation if you want to have a go at room generation , but the current room growing algorithm is somewhat messy.

I also cleaned up the main generation UI a little bit , still working towards a fully UI experience , which is what I will be doing this week if I dont get any particular requests.

1 Like

I like the idea of having secret rooms and areas. Any plans on incorporating this?