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

[RELEASED] Dungeon Architect

Discussion in 'Works In Progress' started by AliAkbar, Aug 9, 2015.

  1. Matt-Roper

    Matt-Roper

    <Of The Graphics> Unity Technologies

    Joined:
    Oct 27, 2015
    Posts:
    106
    Awesome job! Where was this asset when I was working on a Dungeon crawler 2 years ago!
     
    AliAkbar likes this.
  2. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Thanks @Matt Roper!
     
  3. DRhodes

    DRhodes

    Joined:
    Mar 26, 2015
    Posts:
    4
    I suppose my original question was in response to your question "which layout algorithm would we like to see next." I would mainly want the dungeon builder to be built via smaller components for extensibility and readability. I would imagine a dungeon without the corridor component would just be a bunch of connected rooms. I suppose this changes the logic quite a lot, though.
     
  4. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,053
    @AliAkbar Thanks! Looking forward to work with Dungeon Architect in a new game we are about to start working on soon :)
     
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    I have been watching the videos and a few cut off before the end. Am I missing anything? :)
     
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    Okay, watched all the videos and everything looks great, not too hard, and something I can handle with a little bit of help from my coders.

    One thing seems incomplete though..the script for layouts. An example of a different layout would be nice, just to see exactly what that means.

    I am not entirely sure this will work for my cities and from the videos, I can't tell what I might do to change that.

    What I want to do is make components that can be placed to build city blocks with row houses around them. The interior will not be used for the houses, I could probably just use complete building components rather than walls, etc. Interiors will be done separately and I can see how your system might work for that.

    So, could I use "tiles" that I make that contain certain features, like one that is a house (cube), one that is a garden with walls, one that is a plaza, and one that is cut in half diagonally so the plaza is not a perfect square. I also plan to add tiles with other buildings, such as archways and community buildings.

    DiagramBlocks.jpg



    Would the default layout work or would I need to have my programmers write a script for this?
     
  7. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Playing around with Gaia. Created a dungeon listener that hooks into an event right after markers are spawned into the scene (but before the theming engine has spawned anything in those marker locations). In that script I clamp the marker points on the terrain height and all objects from the theme file are automatically placed on the terrain





    Uses Gaia and Exterior Village Kit from @3DForge

    I'm now working on removing the grass from the pathways
     
  8. danien

    danien

    Joined:
    Jun 16, 2009
    Posts:
    71
    That would be awesome! Thank you.
     
  9. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    The Terrain transformer script now removes details (grass) in the corridor path and paints the corridor with another texture. All this works with any terrain object, including Gaia generated one







     
    Last edited: Feb 23, 2016
  10. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    Hey, that is very cool!! I can't wait to try it.

    Too bad that doesn't work during run time. :)
     
    S4G4N and AliAkbar like this.
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,192
    Are you sure this won't work for cities? Streets = hallways, residential / commercial / industrial blocks = rooms.

    If not, what am I forgetting about?
     
    AliAkbar likes this.
  12. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Hmm I guess it could but the result wont be that good. You'll need a specialized city builder to create beautiful results like this:


    I already started work on a city generator for ue4 and unity. Will keep you folks posted
     
    S4G4N and Teila like this.
  13. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    Oh boy!
     
    AliAkbar likes this.
  14. S4G4N

    S4G4N

    Joined:
    Mar 13, 2013
    Posts:
    2,923
    Looking very good and extremely promising
     
    AliAkbar likes this.
  15. Sabathius

    Sabathius

    Joined:
    Jul 13, 2013
    Posts:
    55
    I hope you don't find this rude, but I'm going to throw my paycheck at you at the speed of light when this comes out.
     
    hakankaraduman and AliAkbar like this.
  16. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    882
    Amazing ! :) any chance to see more
     
  17. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    107
    Hi @AliAkbar

    Im interested in your asset, but as i see it, rigth now your assest is "too random" let me explain

    not all games are minecratf, an infinite random game really benefits from your asset, but what happens if i want a random game that requires an ending?

    i would like to see a way to include "rooms" that will be generated always in the dungeon an amount i desire, and in the order i desire

    for example, i want to always generate 2 miniboos "rooms" and 1 boos room at the end, and the boos "room" wont be generated before the miniboss "room" did
    im asking that it would be pefect to have a dungeon "flow" control
     
    Teila likes this.
  18. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @LunaTrap Thanks for your feedback. That's a good point and was also raised by others previously

    I'll create a node based flow control editor where you can drop in nodes and attach rules to it and connect them like this:


    In each node you can attach reusable rule scripts, to spawn NPCs, lock doors, spawn keys anywhere before those locked doors, spawn items after etc.

    If you have a better approach, please let me know.

    As a kid I used to play Chip's Challenge a lot. Levels like those could be a good test case
     
    Sabathius, Dbone, danien and 2 others like this.
  19. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    How's this go for making Skyrim-ish style of dungeon Gyrpt interiors something maybe done with Luos Nopal Free Rocks, Luos Free Caves. Tho theyer UE4 assets, not sure what there is here close to those maybe stuff from that
    Big Environment Pack thats on sell for $30 I don't know Unity assets that well yet.

    BUT wanted to create stuff along the lines of Morrowind, Oblivion and Skyrim ish style, guess I could have said Elder Scrolls ish and got it in one, think you get my drift
     
  20. kerafrymm

    kerafrymm

    Joined:
    Jan 20, 2013
    Posts:
    21
    If there was more control over the generation (like you said you were planning above, to add node graphs, etc.) and ability to force certain things to spawn, I'd throw money at you.

    Kerafrymm
     
    Teila likes this.
  21. maidamedia

    maidamedia

    Joined:
    Nov 19, 2009
    Posts:
    220
    Hi, what about optimization like occlusion culling for runtime generated world?
     
  22. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,074
    Thanks for clarifying. That is what I assumed was the situation, but I wanted to confirm. Effectively what this means is that the complete initial state of a procedural level can be represented by a single number -- as long as the generating algorithms and the theme definitions remain constant. :)

    One possible future enhancement might be to (optionally) allow more than one seed per level, to allow more variation. I'm thinking of a master seed that controls the generation of all first-level nodes (i.e., the basic layout of a map) and then a second seed that is used for all node levels except the first one. This means storing only one more numeric value, but it effectively squares the number of possible permutations.

    Another possible implementation would be to allow the designer to create a single global object that is a "seed catalog", similar to the way defining layers works in Unity. Let the designer create a list of names and seed values, and then for each node in the theme they get a dropdown selector for which seed should govern that node.

    What this would provide is a way to have *most* of a procedural level be the same every time, for a given seed, but perhaps randomize other parts of the level on each load. Here's an example of my hypothetical seed catalog:

    Map 11823743 ----> Defines everything about the map layout, and never changes once generated
    Clutter 516323 ---> For choosing colors of draperies, placement of random furniture, torches, etc.
    Enemies (random) ----> Spawning random enemies, generate this one anew for every load of the level
    Loot (random) ---> Spawns random loot and pick-ups, generate this anew for every "N" loads of the level

    So with just four entries, I get a huge increase in variability of the procedural levels, and if the player leaves this level and returns later, they see the same placement of static objects but are challenged by newly-randomized enemies and a balanced (and designe-conrolled) amount of loot respawn. So the player can't just "mine" a solved level again and again and expect to multiply their loot, but if they fight a fresh crop of enemies, they do occasionally get some reward and get resupplied with healing items etc.

    I can't think of all possible use-cases for such a seed catalog, but if the individual seeds can be specified as constants *or* controlled by a game-specific script, I'll bet your users would come up with all kinds of innovative ways to use this.

    For users who don't need this feature, your system would just fall back to all theme nodes using a seed catalog that has just one default entry. So upgrades don't break existing games.

    EDIT: I realize I was unclear about one thing in my suggestion. I'm not suggesting DA itself should assign different seeds to different nodes. Like Unity layers, just allow the designer to create a list of seeds, name each seed in the list (mnemonic for the designer), and assign seeds to nodes. DA just provides the mechanism; it's up to the designer if, and how, they use it in their game.
     
    Last edited: Feb 25, 2016
  23. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,074
    How about integration with SECTR? :)
     
  24. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    This is a very powerful tool and fun to use, but yeah, the lack of control is frustrating. Some way to be able to place specific items/buildings, etc., in nodes that you can place in specific places and always have those generate in those places would be nice. It would add a new dimension to this tool.

    I have had a tough time getting everything to line up and it overlaps meshes, making it extremely laggy after a while since there is so much in there. I might be doing something wrong though. I did have several freezes and a crash though, which can be troublesome.

    It didn't work for my original plan, which might be why the developer never responded to my forum question. (lol) But we will find other uses for it hopefully.
     
  25. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Teila I'm sorry I missed to answer your question. Yes it would require a marker emitter script to get a city like layout in DA

    As for the lag, are you using lights with shadows enabled? That would kill the performance in unity real fast. Try using non-shadowed lights for smaller lights.

    This is an editor extension. I believe Unity lets you apply for a refund if it doesn't fit your requirement. Thank you for trying out DA :)
     
  26. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    I did not try that. I will do so. I think there might be other things I did wrong that caused some of the problem.

    I do not want a refund. :) I knew I was taking a chance when buying it and I also knew that we have other things that may work with it. So no worries.

    Emitter script...is there one in the example projects? I love to learn new things and do have a programmer or two to help out. :) I don't remember seeing this in the manual or tutorials but may have missed it.
     
    AliAkbar likes this.
  27. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Good point. However, the clutter, enemies and loot can all spawn from the same theme file and even though the randomness comes from different streams, they have the possibility of affecting each other if they are added under a same marker node

    e.g.
    Code (csharp):
    1.  
    2.             RoomCorner
    3.                |
    4.     ----------------------
    5.     |          |         |
    6.   NPC1       Loot1     Chair
    7. (RandS1)    (RandS2)    (RandS3)
    8.  
    execution happens from left to right calling Random.Next on each nodes' individual random stream. However it might stop in the middle if a node is selected, thereby not calling RandomStream3.Next. Hence changing seed for stream 2 can affect stream 3. I'll investigate further
     
    syscrusher likes this.
  28. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Teila are you trying to build a layout like in Ceaser 3?



    Can you PM me more info about your requirements. I'll see if I can create a marker emitter for you
     
  29. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    Yeah, that might work!

    Will do so asap. My mom is on her way over so can't ignore her...but will get it to you sometime today or tomorrow. :)
     
  30. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Take your time. It's mid night here in India and I'm off to bed ;). See u all tomorrow
     
  31. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    Goodnight!! :) I thought your accent was of Indian origin.
     
  32. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Not sure what one needs to do to get answers here
     
  33. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,074
    Ah, yes....I understand. I had forgotten. The only workaround that quickly comes to mind would be to store a "next random" for every node in the graph at the *beginning* of each iteration, so the RandomStreamX.Next() method is called the same number of times regardless of conditional results. I used to do a lot of industrial work with PLCs (programmable logic controllers), and that kind of algorithm was used in those to represent boolean logic states -- and for exactly the same reason. This would penalize performance a little, though probably not much.

    If my suggestion isn't viable, I understand. It was just an idea. :)
     
  34. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,192
    Maybe your question is too general? Maybe you can narrow it down to the specific feature or two you are looking for.
     
  35. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,074
    Your question was rather broad, I think, and might be hard to answer. Also note that the developer is in India, so it's the middle of the night there. :)

    I won't presume to speak for AliAkbar, but having done a lot of modding work with Oblivion and Skyrim myself, I'll take a crack at this.

    Out of the box, this asset would work fabulously for generating Oblivion-style dungeons if you purchased an appropriate tile-based asset library. Oblivion's dungeons are very tiled (remember it came out in 2006).

    Skyrim dungeons are still tiled, but the tile sets are much more intricate. If you had a Skyrim-like tile set for Unity, you could generate a simple version of that type of dungeon in this asset. But Skyrim's level designers did a lot of placement of meshes in non-tiled positions and rotations. You'll particularly observe this in the cave levels, with whole sections built out of jumbled rocks laid semi-randomly over and around a tiled substrate. This technique yields a very organic look (I love those levels!), but it is almost impossible (today) to procedurally generate something like that.

    You probably could build a dungeon of the Nordic ruins level of complexity with Dungeon Architect, but you would have to create very intricately-crafted theme graphs in DA to account for the fact that a section of room or corridor isn't always just a single tile with a simple tile-to-tile coupling.

    Of course, all of the above presumes you are purchasing or creating original tiles for Unity. It's entirely illegal to reuse Bethesda's assets in your own game. (I'm sure you know that....just covering my butt here.)

    The bottom line is that DA is a really clever procedural dungeon generator, but even the most clever program in the world can't compete head-to-head with a skilled human level design artist for really complex customized maps. It all depends on what you need in your game.
     
    hopeful likes this.
  36. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    288
    Thats the reason I used the terms "ish" and style

    @syscrusher Thank you for the reply. Maybe my question was general, this is my first ever look at this tool and I'm quite new to Unity, so know what to ask is maybe over the scope of my knowledge to ask accurately without looking like a fool.

    As the name might (to those with a little knowledge) suggest I'm in New Zealand and there where posts from the Author after my post so I figured he'd read it thus prompting my second post less he missed it and the second post was the day after the first.

    Any way you have to some degree answered my question and for that I thank you. What happen to said dungeon if you drag it out and form a base level, then proceed to edit and change mesh's to make a more organic less repetitious form out of what you started with, does it all fall apart or can it handle being chopped and channeled?
     
    Last edited: Feb 26, 2016
  37. MangeyD

    MangeyD

    Joined:
    Mar 11, 2014
    Posts:
    75
    Wow after months of waiting it was released while I was away :( I can't afford it now since I bought the Village Exteriors while it was on sale and several items from the current madness sale... I will just have to wait a couple of weeks now before I can grab it unfortunately, but it is great to see it out... Congrats
     
    S4G4N and AliAkbar like this.
  38. Gorgoth

    Gorgoth

    Joined:
    Jul 20, 2015
    Posts:
    8
    I bought the tool yesterday and i'm somewhat impressed. I wonder if there is any example how to change the build process a bit. I use assets different than all examples i found so far. I have special corner assets, wall crossings, T-Walls, walls that are one sided and walls that 2 sided, special walls for the corridors and so on. and whats even more complicated, the assets have different sizes: walls that are 2x2 and walls that are 4x4 and 2x4 etc. And the ground tiles are 2x2 and 2x4 etc. ;-) so its a bit complicated to use the architect ^^ any suggestion where to start or any documentation how to build my own spawner. I could of course either build room templates and use them in the generator, but i think the advantage of this architect is the possiblity to spawn single wall elements to build rooms. other dungeon generators i already have can spawn complete rooms.

    A second question. How can i change the generator to use walls for corridors? i'm trying to build some dungeon like in alien breed, so there are no corridors without falls, i rather have special assets for corridors.

    thanks for help and i really like you architect, though i think i need to customize it a lot ;-)
     
  39. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Kiwi-Hawk You can create indoor dungeons like in Oblivion (please check the indoor cathedral video in this post).
    I downloaded Luos Rocks a few months ago but didn't get a chance to try it with DA. For more organic dungeon's I'll later create another builder for caves using cellular automata. I already have something like this going in UE4. Will bring to unity soon and the cave dungeons would look more natural


    You can modify the dungeon anyway you like after it is built, however you will lose the manual changes if you rebuild the dungeon (or change the theme file with real-time update on). If you no longer want DA to affect a generated dungeon, just delete the DungeonGrid gameobject after you have created the level
     
    Last edited: Feb 26, 2016
  40. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    I'll explore integration with SECTR
     
    cygnusprojects likes this.
  41. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    I used an existing emitter created earlier (used for the Multi-storey dungeon to decorate empty space) to fill them up with houses across the border of the dungeon in Gaia










    @hopeful does this suit your needs
     
    S4G4N likes this.
  42. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Gorgoth Thanks for using DA. It's possible with DA to handle special cases like T-Walls, X-intersections, single sided walls, single lane corridors, inward/outward corners etc. I created a marker emitter that emits markers (on which you can attach your assets on) for the Cathedral Demo and it handles all these cases.

    You will however have issues with ground tiles not being the same dimensions as set in the dungeon config. You can create a selector script if you need it

    I'll post a sample soon with free assets so you can use as a reference.
     
    S4G4N and Gorgoth like this.
  43. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Thanks @MangeyD !
     
  44. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    I just bought DA because of the amazing feature set! Well done! I had some time to play around with it last night and it's worth every penny, easy to understand and a joy to tweak and experiment with. Thank you!

    One question: are you currently working on making this flow control editor? It would be extremely useful for my current project. Any idea when we might see it?
     
  45. Gorgoth

    Gorgoth

    Joined:
    Jul 20, 2015
    Posts:
    8
    Great :) Sounds promising. I'll look forward to it. I'll have a look into making a custom selector. I need it anyways, as i have ground tiles that has to be in the right rotation and only directly placed near the the walls because they have drains on one side.
     
  46. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    How well does it play together with Sectr or any of the other procedural occlusion asset?
     
    kimsama likes this.
  47. Gordyne

    Gordyne

    Joined:
    Feb 22, 2016
    Posts:
    30
    I'm really impressed! Excellent work sir!
     
  48. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,192
    I can't tell for sure. When you produced something like this earlier, that's what led me to ask the question. :)

    My situation requires a modern urban setting. While clearly your WIP seems like it could address the need, it also kind of seems like DA could do it.

    Here's what I imagine: using a roadway with sidewalks and street lights in lieu of a hallway, with a special case of traffic lights and crosswalks at intersections. Ramps on the sidewalk acting like doors in a dungeon, leading to parking lots and buildings and alleys instead of rooms. Being able to use the theme-switching to bring in industrial / commercial / residential / park / agriculture pieces in different areas. And last but not least, being able to store these urban developments as random number keys, instead of storing them as scenes.

    In terms of layout or structure, the idea would be to roughly fill an area with interconnected urban landscaping, as opposed to a start-to-end type dungeon flow. I don't know, but this might be the main sticking point ...?

    If you want to see if you can throw something together that looks like that, I can suggest some free city assets by Bumstrum. That ought to give you materials and meshes for road, sidewalks, street lights, and buildings, which won't be enough for a full simulation, but maybe enough to prove the concept.

    Unity had a few free models in the store that could have helped flesh out the details, like traffic lights, but for some reason they recently pulled them all. (?)
     
    Sabathius and Teila like this.
  49. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,820
    I feel like something like this can be done as well.

    I did manage to get this from DA: I put the house rows in as fences and it gave me the cells I wanted. The problem really was the randomness, which is fine but I wanted complete squares with corridors between them and instead, had the corridors running through the squares, I think that is what happened at least.

    CityLayoutDA.png

    What I wanted was this: This is my favorite of the images, btw.

    tint5_3.jpg

    Or maybe this:

    ExampleCity01.png
    And this too, with a change in the layout if possible although this one would be easier by hand probably.
    BirdsEyeView2.jpg

    It feels as if this could be done with tiles that contain the buildings so you could set up a grid of tiles with open roads between them.
     
  50. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,192
    Have you tried treating your roads as long, broad cross-shaped hallways (or T-shaped) with no walls, and with doors at the end of each cross piece that only connect with more roads, and doors along the sides that only connect with "rooms" that contain residences? It seems that if you could make the roads longer, it would reduce the randomness a bit.
     
unityunity