Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[Release] Dungenizer 2D - Dungeon generator

Discussion in 'Assets and Asset Store' started by mpamukcu, Dec 1, 2014.

  1. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hello,

    I tried to find a simple dungeon editor for my 2D game and i decided to write my own. If you looking for a really simple dungeon generator, check out my new editor extension.

    Key Features;
    Creates nice dungeons from simple prefabs. It works ON THE FLY or by an Editor extension .
    Populates with your prefabs like like chest,monsters,npc's (or whatever you want).
    You can choose them where to spawn for chest to spawn next to walls or any random location.
    Generates an enter and exit prefab.
    Customizable room count and room sizes.
    Works in unity5!
    Frequent updates.( I am working to add some cool features to it . and please feel free to ask for updates that you need. )

    Just create your monster and player logic by yourself, and let the dungeonizer create level design for you.


    Price: 5$
    Asset Store Link;
    https://www.assetstore.unity3d.com/en/#!/content/22162

    FAQ:
    Q: How i can create roofs?
    A: You need to attach roof prefab to your floor prefab like this;
    dungeonizer_roof_workaround.PNG
     

    Attached Files:

    Last edited: Aug 7, 2016
  2. Magian

    Magian

    Joined:
    Nov 16, 2009
    Posts:
    91
    Does this work with Unity 5?
     
  3. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Yeah it works!
     
  4. Diet-Chugg

    Diet-Chugg

    Joined:
    Jul 4, 2012
    Posts:
    51
    I watched your video and it seems this is a pretty cool tool. I have not bought it because it doesn't suit my current project but I may get it in the future. (So I added it to my wishlist)

    As I'm working on a semi-similar sort of tool (Not a generator but an tilemap system) I have used a class you may have interest in.

    I imaging you call GameObject.Instantiate(prefab) somewhere in your code.
    I suggest you change it to something like this:
    (At the top of your script)
    #if UNITY_EDITOR
    using UnityEditor;
    #endif

    (Where GameObject.Instantiate(prefab) is being called)
    #if UNITY_EDITOR
    GameObject.Instantiate(prefab)
    #else
    PrefabUtility.InstantiatePrefab(prefab);
    #endif

    This way if you generate the dungeon in the editor you still get prefab connections (IE. you can click an object in scene make a change and be able to hit apply and change it across all prefabs) and so it still builds properly at runtime and can still generate at runtime.

    Best of luck on your tool. :)
     
  5. gamezuv

    gamezuv

    Joined:
    Nov 6, 2013
    Posts:
    76
    hi, the generator is great. I am working on a mobile game which needs pathfinding. I have both a pathfinding and navmesh so any will do. Can you please make a video or guide a noob with necessary steps . I will be generating levels on the fly at runtime . I read the review which Darren Cook wrote . So I am guessing you already have figured a solution and I am hoping you and Either Darren can guide me . I posted it and here and did not email because I think others can also benefit from the solution . Thanks in advance . Let me know if you need more details.
     
  6. gamezuv

    gamezuv

    Joined:
    Nov 6, 2013
    Posts:
    76
    hi, the generator is great. I am working on a mobile game which needs pathfinding. I have both a pathfinding and navmesh so any will do. Can you please make a video or guide a noob with necessary steps . I will be generating levels on the fly at runtime . I read the review which Darren Cook wrote . So I am guessing you already have figured a solution and I am hoping you and Either Darren can guide me . I posted it and here and did not email because I think others can also benefit from the solution . Thanks in advance . Let me know if you need more details.
     
  7. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi,
    I was created this video for Darren as a little workaround for navmesh. I hope it will help you too.


    Thanks for using dungeonizer,
    Mert
    Dungeonizer
     
  8. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    Was someone able to create a whole 3D "procedural" Dungeon with this tool?
    I really like how easy the asset has been made and as I understand this is a simple dungeon generator to create the Dungeon level with 4 prefabs (wall, floor, roof etc).
    As far as I can see you cant drag and drop different Wall / Roof / Floor Prefabs to the different fields, to make rooms with different random prefabs?
    I mean in a 3D Dungeon you don't use alsways the same Wall prefab. I am coming from Dungen so I am really interested to know if this tool can be used to create procedural dungeons consisting of different Prefabs. (Every room looks completely different and random).
     
  9. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi Ronny,

    You can use different wall/floor/door prefabs in different rooms. And you can spawn objects specifically for selected rooms. (also with some code, you can change everything, i am working on some plug-in option for next version)

    Mert
     
    RonnyDance likes this.
  10. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    This sounds pretty awesome. So one can assign 4 wall prefabs and rooms are created using the different wall prefabs randomly? Is there a documentation or video which describes this? Because the little Tutorial video just shows how to use only one prefab drag and droping it to the field (wall / floor).

    Really interested to see whats possible to create with this asset.
     
    Last edited: Sep 8, 2016
  11. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Not randomly, you need to assign like (2nd room after start is using that walls, 5th room using this walls + that mini boss, in 7th room spawn a key, 9th room uses locked doors,and fancy floor etc.etc.)
    Most of dungeonizer customers did not need a tutorial (because its really easy) for customization but i will create a sample video for you and share here soon.
     
  12. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Just wanted to share a custom configuration that creates different walls in different rooms before making a video.
    Creates different walls in room 4 and room 7 It also creates a boss in 7th room. (forgot to put a wall in 8th room,sorry but its pretty like this). If you check "generate_on_load" setting, it will create a new random dungeon when dungeonizer prefab loads in scene on the fly. And "tile scaling" option is for your prefabs standart tile width. (i used 2x2 sized walls in this case)

    Screen Shot 2016-09-08 at 12.30.12.png
     
    RonnyDance likes this.
  13. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    I see, this is really easy. I like that!
    What still wonders me is, how do you manage to give a room multiple walls? In the screenshot I see that you are using different walls in the custom rooms (4,7,8). But anyway it's still one wall prefab for one room. What if my room should consist of two different old stone wall prefabs? Do I have to create one "combined_wall" prefab which consist of both wall prefabs, because I can just use one wall prefab for a room?

    Or can I just create 2 Custom Rooms with the same Room ID using different wall prefabs, and your asset will combine them?
    Just curious because my rooms consist of wall prefabs with windows, without windows, with loose stones in it etc. They are not always "spawned objects". Sometimes they are in the wall prefab itself.

    Spawned Objects like stairs, deks etc. can be spawned using spawn options, like you did with the boss I see. Another question would be, how are they spawned? Are they spawned in the middle of the room, are they spawned randomly? Because a Boss normaly should be spawned in the middle of the room but other objects like desk and tables on different locations. I suppose they are just spawned randomly and I need to move them by myself in the room where I want to?

    Thanks again for your input and information :)
    Cheers
    Ronny
     
    Last edited: Sep 9, 2016
  14. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hello Ronny,

    1) Sorry dungeonizer can't combine 2 different wall prefabs in same room (yet). You can put a start script to wall prefab to change its behavior randomly. But its not dungeonizer, just a walkaround.

    2) You can choose an object to instantiate randomly in a room - or spawn it next to a wall ("spawn by wall" option,its good for desks or light etc)

    Ps: i am working on a future version of dungeonizer that allows to set spawning rules. Its currently working well but i couldn't make a -very simple- frontent for this rules so i am working to make it simpler, useful:
    Rules like; if room bigger then 5 squares put a carpet in the middle, a desk and put some libraries next walls etc.etc.

    Mert
     
    StevenPicard likes this.
  15. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    557
    It would be cool if the "Floor Prefab" "Wall Prefab" would be a list of objects not only one object. So you can just drag and drop multiple prefabs to it, or use comma seperated object names and your asset will spawn them randomly than.Or just do it like the Custom Room / Spawn Options Size Rules. Incrase Size for different Wall / Floor Objects.

    To your Spawn Rules problem:
    I think a Dropdown Box for Spawning Rules would be good for that.
    Something like:
    Spawning Rule for this Object / Prefab:
    • Random
    • Middle
    • On Wall
    • On Object (Think of a Prince Boss which should be spawned on a Chair you spawned before, or of a candle light which should be spawned on a desk spawned before).
    Anyway I still think that this asset is pretty awesome doing the current features so user friendly and easily. Gonna take a closer look to it this weekend.
     
    Last edited: Sep 9, 2016
    StevenPicard likes this.
  16. LifeAbstract

    LifeAbstract

    Joined:
    May 6, 2015
    Posts:
    3
    Hello,

    I recently purchase the asset and its great but how does one achieve this style to generate? 7b890b63-f459-4fd2-86b7-b920659a564f_scaled.jpg
    I tried to copy the count and sizes that are on the inspector but all i get are halls that are way to far apart(demonstrated below).How does one condense the dungeon to look like the image above?
    dun1.png
    dun2.png
     
    StevenPicard likes this.
  17. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi,

    Unfortunately no. Dungeonizer was renewed to prevent shortcuts between start and end rooms (like very long corridor in that image). I did it because,i wanted to allow dungeonizer users to create flows like "start->key->mini boss->locked door->another boss->loot->big boss->finish".

    If you still want that version, please send an email to "support at mahalle.org" with a copy of your purchase email.

    Thank you for choosing dungeonizer,
    Mert

    (i edited this post for add salute sorry)
     
  18. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    680
    It would be nice to have an option to generate the style LifeAbstract is asking for. Also, I like RonnyDance's suggestions.Those would be great additions.

    Anyways, I am looking forward to your planned updates.
     
  19. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Thanks for your opinions. I am working on RonnyDance's suggestions as much as i can. For LifeAbstract, that was nearly a rewrite of all code, and i can't implement custom rooms and spawn options to new algorithm, sorry.

    I am going to think about for a better solution to everyone. Maybe more scrambled looking algorithm. For now, I need to change screenshots asap to prevent potential misunderstandings.
     
  20. drunkenoodle

    drunkenoodle

    Joined:
    Nov 11, 2012
    Posts:
    16
    Hey everyone, I've just been having a bit of a play around with Dungeonizer (after being away for a year), and have set a dungeon to generate on load. But after having a bit of a look through I couldn't see a sort of 'onDungeonReady' event and thought I'd drop the suggestion in here. Obviously ignore me if there's already such a thing and I've overlooked it.

    I'm not sure it would be massively useful, but it might be if you have to do some post processing in or around the dungeon for whatever the reason.

    Anyway keep up the great work, loving the minimalism of the plugin and the power it has. Have a great Christmas in the interim! :D
     
  21. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi!

    You are right. There is no onDungeonReady event. Maybe you can write a Start() function in a script and attach it to start prefab. Or fire an event with a slight modification in dungeonizer script. (just fire it in the end of generate method)

    also there is better way to "generate on load" via another script. Here is an example. It configures dungeon before spawn and controls loading screen and works async etc etc.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class dungeonizerStarter : MonoBehaviour {
    5.     public Dungeonizer dungeonizer;
    6.     public string difficulty = "easy";
    7.     public GameObject loadingScreen;
    8.     public GameObject chest;
    9.  
    10.     // Use this for initialization
    11.     void Start () {
    12.         /* we will configurate dungeonizer here */
    13.         StartCoroutine("dungeonStarter");
    14.     }
    15.  
    16.     public IEnumerator dungeonStarter()
    17.     {
    18.      
    19.         SpawnOption easyFood = new SpawnOption();
    20.         easyFood.maxSpawnCount = 10;
    21.         easyFood.minSpawnCount = 10;
    22.         easyFood.spawnRoom = 0;
    23.         easyFood.spawnByWall = false;
    24.         easyFood.gameObject = chest;
    25.      
    26.  
    27.         if (difficulty == "easy")
    28.         {
    29.             dungeonizer.maximumRoomCount = 10;
    30.             dungeonizer.spawnOptions[0] = easyFood;
    31.         }
    32.         else if (difficulty == "hard")
    33.         {
    34.             dungeonizer.maximumRoomCount = 20;
    35.         }
    36.         else
    37.         {
    38.             dungeonizer.maximumRoomCount = 50;
    39.         }
    40.  
    41.         Debug.Log("START");
    42.         dungeonizer.Generate(); //generates
    43.         yield return new WaitForSeconds(0); // sorry:)
    44.         loadingScreen.SetActive(false);
    45.         Debug.Log("GENERATED");
    46.     }
    47.  
    48.     // Update is called once per frame
    49.     void Update () {
    50.  
    51.     }
    52. }
    53.  
    Thanks for using dungeonizer.
    Mert
     
  22. JustaGameDev

    JustaGameDev

    Joined:
    Jan 29, 2016
    Posts:
    49
    HI, just purchased this asset, and was wondering how i could be able to remove the gap between the floor and the wall ?

    upload_2017-2-1_15-23-38.png
     
  23. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi,

    Because of dungeonizer is tile based, wall prefabs bottom dimensions must equal to floor prefabs area. Most stylish way to do this is putting a floor prefab as a child prefab of walls.

    unityfloor.PNG

    Thanks for using dungeonizer.
    Mert
     
  24. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    66
    Hi
    I'm interested in Dungeonizer it look very cool easy to use but I have some question.
    1.Can I use this at run-time.
    2.Can I set more than 1 theme (example room A theme Sci-fi,B Ancient,C Mine) in 1 setting.
    3.Can I save the dungeon and re generate it again as same as first.


    Thank you
     
  25. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hello,

    I will answer shortly because i am mobile sorry.

    1.yes
    2.yes, you can specify multiple themes but you need to choose a general theme for standart rooms and define others room by room.(ie.you need to say 5th room after start is mine 6th is ambient etc)
    3.no

    Thanks for using dungeonizer
    Mert
     
  26. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    66
    Ok thank
     
  27. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    66
    With this price very good.
    I would like to know a little bit.
    Can I use random.randomrange to use with room id or is this hard to integrated.
    Can I set player spawn in something like start room and boss is spawned in deepest room ? or you have any suggestion about this.

    very quick respond.
     
  28. Antrozwastaken

    Antrozwastaken

    Joined:
    Sep 12, 2016
    Posts:
    1
    Hi just want to say that this asset is great. However, there is a game-breaking bug that spawns an empty Dungeon that I have encountered. Hopefully this bug can be fixed as soon as possible since it is a dead end for players if they encounter it. Screenshot of the error in the Unity Editor is attached.

    Here is the error as shown on the logs:

    Code (CSharp):
    1. ArgumentOutOfRangeException: Argument is out of range.
    2. Parameter name: index
    3. System.Collections.Generic.List`1[Room].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    4. Dungeonizer+Dungeon.Generate () (at Assets/Dungeonizer/Dungeonizer.cs:150)
    5. Dungeonizer.Generate () (at Assets/Dungeonizer/Dungeonizer.cs:504)
    6. DungeonizerEditor.OnInspectorGUI () (at Assets/Dungeonizer/Editor/DungeonizerEditor.cs:21)
    7. UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
    8. UnityEditor.DockArea:OnGUI()
     

    Attached Files:

  29. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hey there,

    Thanks for information. I will fix asap.

     
  30. polarmagpie

    polarmagpie

    Joined:
    Nov 11, 2017
    Posts:
    4
    (For your website link is broken now, I was not sure that the mail I sent would reach. So I post what I mailed to the thread too. thanks.)

    Hello, I bought your Dungeonizer a while ago and have some questions.

    I want the tutorial but the link in Unity Asset Store is broken, So I couldn't refer to that. I'm so sorry, but without the tutorial, I just can't dare to look through the whole code alone.

    Here is the list that I want to know is

    1) Usage of custom room function. I want to import a json from Tiled Editor(http://www.mapeditor.org/) and that I can do alone. The json file contains the information of map size, and prefabs to spawn. But, how can I insert my custom room to the map generated and pave way between them to link?


    2) Can I get the rect which encompasses the whole map like this by script on runtime?

    3) Can I adjust a degree of connectivity between rooms? It usually generates map with a linear path without any turning points. I want more like Drunkard Walk.

    4) Is it possible I get rect[] of the rooms made on runtime?

    I'm just ready to give you 5 stars and recommend your asset to my friends, but I need a bit of help. Please, can you help me a little?
     
  31. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hello, i answered this question on e-mail. But going to copy it here for other people too.


    1) Sorry, Dungeonizer is not supports external custom rooms like json files. Custom room option is configurable in the preferences section of Unity.
    Room Id: Is the room that you want to customize. (for example. 2nd room after the start prefab have room ID 1)

    2) Sorry again, you can't draw a rect, it needs modification of dungeonizer code.
    3) Dungeonizer creates lineer corridors only. But with enough rooms your dungeon will be complex. (50 rooms example below)

    4) Yes its possible. But need some coding.
    In the very end of Dungeonizer script, you can modify Start() function as you wish. Static variable named Dungeonizer.map have very good information about created dungeon. Example below;



    // Use this for initialization
    void Start () {
    if (generate_on_load){
    ClearOldDungeon();
    Generate();

    Debug.Log(Dungeon.map.GetLength(0)); //Width of dungeon
    Debug.Log(Dungeon.map.GetLength(1)); //Height of dungeon
    Debug.Log(Dungeon.map[50, 50].room.room_id); //Room id of that coordinates.
    Debug.Log(Dungeon.map[50, 50].type); //Default = 0 , Room Floor = 1, Wall = 2, Corridor Floor 3, Room Corners = 4, 5, 6 , 7

    }
    }
     

    Attached Files:

  32. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    241
    Hi.

    Saw this asset on the DevDog christmas giveaway and I found it really interesting but I would like to use it 3D mostly. On the asset store product features it says 3D is a bit experimental yet, just want to be sure it can fit my needs, so, in short:

    1.- Does it fully support 3D right now?
    2.- Are any of the RonnyDance's suggestions included on 1.4.2 version?
    2B.- If answer is not, is the code friendly enough to C# newbies to add several props as walls to give randomize look on those at last?

    Sorry if I sound too demanding, it's just I want to know if this is what I searching for.


    Thanks in advance.
     
  33. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi Muppo,
    1.- Dungeonizer actually creates pretty good 3D dungeons. It is stable as 2d. But it is tile based like 2d. Wall width and floor widths are equal. Ofcourse you can workaround with proper 3d assets but feels like always something missing. That's why i am keeping "experimental" word there.

    2.- No, sorry. But still;
    - You know you can use different assets for different rooms.
    - You can select spawning object to spawn close to wall or anywhere.

    2B.- Yes! Dungeonizer has a very simple source file. Also i can assists with quick fixes like randomless of walls, or floors, etc.

    ps: Dungeonizer supports surprising things when it comes to hack dungeonizer sources. (for ex. see my answer to "polarmagpie" below) But i don't want to add them all to editor preferences. I want this asset to stay with simple code with a simple gui, with simple dungeons.

    Thanks for your interest for Dungeonizer,
    Mert Pamukcu
     
  34. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    241
    Thanks for the aswers.
    I bought it, will give it a try on spare time and maybe mess a bit with the scripts, I really like the random wall from a list idea.
     
  35. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Thanks muppo! I hope Dungeonizer will fit in your projects perfectly.

    This is a snippet from Dungeonizer.cs, this is where dungeonizer chooses what prefab to use as wall in particular tile. You need to modify it for random walls. You will also find similar code for floorPrefab and others. btw, all walls in same room has same room.room_id. And room_id is increasing from start room to end room. (for example; room_id 2 is ther second room after startPrefab's room.)

    Code (CSharp):
    1.                     GameObject wallPrefabToUse = wallPrefab;
    2.                     Room room = Dungeon.map[x,y].room;
    3.                     if(room != null){
    4.                         foreach(CustomRoom customroom in customRooms){
    5.                             if(customroom.roomId == room.room_id){
    6.                                 wallPrefabToUse = customroom.wallPrefab;
    7.                                 break;
    8.                             }
    9.                         }
    10.                     }


    ps: i found this code piece from old emails. It is an example for more control over dungeon generation. This way you can control room count with code. Also you will know when dungeon is loaded properly.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class dungeonizerStarter : MonoBehaviour {
    5.     public Dungeonizer dungeonizer;
    6.     public string difficulty = "easy";
    7.     public GameObject loadingScreen;
    8.     public GameObject chest;
    9.  
    10.     // Use this for initialization
    11.     void Start () {
    12.         /* we will configurate dungeonizer here */
    13.         StartCoroutine("dungeonStarter");
    14.     }
    15.  
    16.     public IEnumerator dungeonStarter()
    17.     {
    18.        
    19.         SpawnOption easyFood = new SpawnOption();
    20.         easyFood.maxSpawnCount = 10;
    21.         easyFood.minSpawnCount = 10;
    22.         easyFood.spawnRoom = 0;
    23.         easyFood.spawnByWall = false;
    24.         easyFood.gameObject = chest;
    25.        
    26.  
    27.         if (difficulty == "easy")
    28.         {
    29.             dungeonizer.maximumRoomCount = 10;
    30.             dungeonizer.spawnOptions[0] = easyFood;
    31.         }
    32.         else if (difficulty == "hard")
    33.         {
    34.             dungeonizer.maximumRoomCount = 20;
    35.         }
    36.         else
    37.         {
    38.             dungeonizer.maximumRoomCount = 50;
    39.         }
    40.  
    41.         Debug.Log("START");
    42.         dungeonizer.Generate(); //generates
    43.         yield return new WaitForSeconds(0); //<-- I need to return somewhere anyway
    44.         loadingScreen.SetActive(false);
    45.         Debug.Log("GENERATED");
    46.     }
    47.  
    48.     // Update is called once per frame
    49.     void Update () {
    50.    
    51.     }
    52. }
    53.  
     
    Muppo likes this.
  36. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    241
    Had time this weekend to play a bit with Dungeonizer code and made some customization:

    Pretty much visual editor stuff and multiple prefabs for walls and floor. Also Dungeons are generated on it's own GameObject so it can be easy moved. Kudos to Mert on this one, I was stuck and he helped me very fast.

    Nice asset, worth it's price.
     
    DarkApollo likes this.
  37. madshkramer

    madshkramer

    Joined:
    Jan 15, 2018
    Posts:
    2
    Awesome asset! i just tried it and it works amazing! I have two questions though..

    1: When creating bigger prefabs, how do i avoid them sticking out of the map (a house maybe)?

    2: i would love to use the asset for creating some grassfield like dungeons, in which case i want the rooms to be more dynamic shaped than the current box shape, are there any ways of accomplishing this?

    Cheers!
     
  38. CyberGenesis

    CyberGenesis

    Joined:
    Jul 1, 2017
    Posts:
    1
    Guessing this isnt being developed anymore?

    Tried to email but got a kickback from the mailer
     
  39. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi, Thanks for reaching here. We are still supporting Dungeonizer. A new version and more documentation on the way but still work to do.
    Our email address had a technical problem. It is now fixed.
     
  40. redwiz666

    redwiz666

    Joined:
    Aug 9, 2017
    Posts:
    5
    Is there a new link to the tutorial? the one listed in the asset store is down.
     
  41. redwiz666

    redwiz666

    Joined:
    Aug 9, 2017
    Posts:
    5
    never mind i found a youtube video that shows to get started with it. But i have a new question. Is it possible to make the corridors wider? i've looked through the code and nothing jumped out at me as where i can modify it to increase this.
     
  42. redwiz666

    redwiz666

    Joined:
    Aug 9, 2017
    Posts:
    5
    Would you mind sharing the changes you made? this looks like a good addition to the script
     
  43. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hi, corridors are always 1 tile width in dungeonizer, for wider corridors you need to raise "Tile Scaling" value and your tile size.
     
    redwiz666 likes this.
  44. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    241
    No problem.

    What I did is extend the dungeonizer script to add arrays for each element and call then like this:
    Code (CSharp):
    1. GameObject floorPrefabToUse = _floorPrefabs[Random.Range(0,_floorPrefabs.Length)];
    and so on in every prefab call.


    Also there's the code wich displaces new generated dungeon (mid button calls this funtion)
    Code (CSharp):
    1.     public void MoveNewDungeon(bool immediate = false)
    2.     {
    3.         int childs = transform.childCount;
    4.         for (var i = childs - 1; i >= 0; i--)
    5.         {
    6.             GameObject pieces = (transform.GetChild(i).gameObject);
    7.             pieces.transform.Translate(0,heightDisplacement,0);
    8.         }
    9.     }

    And this is the code for new dungeon generated on its own folder (should be nested at the end of public void Generate() )
    Code (CSharp):
    1.         GameObject newDungeon = new GameObject("New Dungeon");
    2.         newDungeon.transform.SetParent(this.transform);
    3.         int childPieces = transform.childCount;
    4.         for (var o = childPieces - 1; o >= 0; o--)
    5.         {
    6.             GameObject pieces = (transform.GetChild(o).gameObject);
    7.             if(makeIt3d){
    8.                 if(pieces.gameObject.name != "New Dungeon"){
    9.                 pieces.transform.SetParent(newDungeon.transform);
    10.                 }
    11.             }
    12.         }
    Last thing: modded the editor script to show these big buttons on the inspector.



    Hope this helps.
     
  45. prof3ta

    prof3ta

    Joined:
    May 9, 2014
    Posts:
    1
    Hi, this is a super noob question, but how do I instantiate my player on top of the Start Prefab? How do I get the vectors of the start prefab to my player?
     
  46. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hello,

    Actually you can assign your "Player" prefab to Start Prefab. Alternatively you can code your start prefab like a spawn point. That way it can Instantiate player in its own coordinates.

    Thanks for using dungeonizer.
     
  47. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    327
    hello,

    hope you are fine.

    unity version : 2018+

    is possible to fix these issues :
    • all objects from spawn option are in same room ( an example with chest but if i add more than 1 spawn option object, all are in same room)
    • corner junction with corridor / room

    nice work.

    thanks :)
     

    Attached Files:

    Last edited: Nov 17, 2018
  48. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hello,

    You have set "Spawn room" setting to 1. Thats why objects spawning 1st room after spawn room.
    I will look in to corner problem.

    Mert
     
  49. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    327
    Hi,

    below a new try as you recommended.

    i running many tries and same thing: all objects spawns in same room.


    regards,

    T.
     

    Attached Files:

  50. mpamukcu

    mpamukcu

    Joined:
    Sep 2, 2013
    Posts:
    33
    Hello everybody,

    I have submitted a new version for dungeonizer. I hope it will fix many problems you having and we have some upcoming new features. Now we are waiting for approval but i should be online in 1 week.

    Notes here:
    - Fixed that bug causes dungeonizer to crash.
    - New spawn option: "Spawn rotated" Makes object randomly rotated in 3d mode. Good for creating messy rooms.
    - Spawn rotated option also rotates objects spawned by wall. Its like wall decorations are facing the right way.
    - Spawn in the middle: Spawns objects in the middle of rooms. Good for lights and carpets. (also benefits from spawn rotated option)
    - Height Fix: tinkers vertical position of spawned object.
    - Corridor floors can be different tiles.

    edit: it is accepted and ready to download!
     
    Last edited: Feb 11, 2019
unityunity