Search Unity

World Building [RELEASED] Dungeon Architect

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

  1. Culrich

    Culrich

    Joined:
    Sep 24, 2014
    Posts:
    17
    @AliAkbar Hello again! I was just curious if you have updated or added documentation on how to use the Free Space Decorator node? You use it in your Dibablo-esc dungeon scene to add exterior rooms outside of the dungeon and I'm looking to do that in my current project.
     
    Xepherys likes this.
  2. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Xepherys you'll need to call navMesh.Build() after the dungeon is built. This should be called before you spawn any NPCs. You can refer the shooter example where I call this and then spawn the NPCs

    namespace DAShooter {
    public class GameController : MonoBehaviour {
    IEnumerator RebuildLevel(Dungeon dungeon) {
    // Build the navigation
    RebuildNavigation(); // calls navMesh.Build()

    // Spawn the npcs...
    }
    }
    }
     
    Xepherys likes this.
  3. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Culrich I'll post an open sample with documentation soon
     
  4. Xepherys

    Xepherys

    Joined:
    Sep 9, 2012
    Posts:
    204
    I figured it out ;) - thanks for replying, though. I keep heading over to the Unreal forums since there's more activity there regarding DA, but of course much of it is Blueprint related which is only half helpful on the Unity side. All in all, though, DA is great.
     
  5. Culrich

    Culrich

    Joined:
    Sep 24, 2014
    Posts:
    17
    Awesome, thank you for your continued support!
     
  6. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Culrich I've created a sample. In the mean time here's a quick overview of how it works

    Drop the MarkerEmitterFreeSpaceDecorator script on your dungeon object.


    Then create a marker named "EmtpySpaceDecoration" in your theme file and add your decorative rooms on it.




    The script makes sure no overlap occurs. DistanceFromEdge also implies the size of the decorative items is NxN. In this case the size of the blue boxes is 2x2 size of a normal tile

    Depending on your game's camera angle, it is desirable to push down the decorative items as it might block your dungeon



    Specify a push down axis (in this case 1,0,0) so if a view might be blocked from that axis, it would push it down by the specified units (8 units in this case). You can have more than one axis. In the diablo like level, I had the camera faced at around 30 degrees and I was pushing it down on two axis

     
    Xepherys, antoripa and Griffo like this.
  7. Culrich

    Culrich

    Joined:
    Sep 24, 2014
    Posts:
    17
    Thanks for the explanation! This helps a lot. I'll be sure to get this added to our game soon.
     
    AliAkbar likes this.
  8. netdnx

    netdnx

    Joined:
    Nov 6, 2014
    Posts:
    1
    I saw this question asked before but I haven't seen any answer so ...
    Is it possible to skip the room creation step and use my own prefab rooms?
    If it is .. how do let DA know where the doors are?

    I really want to get DA but this is kind of important to what I'm working on

    Cheers
    Brad
     
    AliAkbar and pixelsteam like this.
  9. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    @AliAkbar is there any way to create a more organic transition between two dungeons. For example between a city and a residential area? What would be the best approach? Also I notice in some of the demo scenes I cannot use the paint script, what is the limitation with that? For example would it be possible to paint streets with residential houses?
     
    Last edited: Dec 12, 2016
    AliAkbar likes this.
  10. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @netdnx Brad, there's no good way of doing that now. The reason is because of what you mentioned, the door constraints. In the coming week's I'll create a new type of layout method (called snap builder) that will let you use room prefabs
     
  11. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @pixelsteam Could you elaborate on the organic transition? What would you like to see at the transition?

    The paint tool is not implemented for the city builder. I have that in my todo list and will be available soon
     
  12. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    This shows a good example of the transitions from sky scrapers to high rises, to apts, to residential. Is something like this possible.
     
    Last edited: Dec 13, 2016
    AliAkbar and antoripa like this.
  13. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Drop the attached script to your city dungeon game object and emit house markers at start / end distances





    @pixelsteam
     

    Attached Files:

    v_James_v, Xepherys, antoripa and 2 others like this.
  14. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Fantastic Ali!!!! Thank you!!!
     
  15. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Have you added a new road layout?
     
    pixelsteam likes this.
  16. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    @AliAkbar Please consider this a +10 for a dungeon flow feature in DA. As far as I can tell, this is the only feature another prominent procedural dungeon asset has above Dungeon Architect.

    I'd also like to make a couple of suggestions.

    Please consider allowing selection rules to be linked together to alter the probability of a selection. Use case: Twenty percent chance for a treasure trove to appear in the middle of a room if the room is near the end of the dungeon and there are no treasure troves already in the dungeon.

    Please change the node editor to allow zooming in and out with the mouse scroll wheel.

    Also, please design an intuitive way to allow for the marking of rooms with a larger Y axis, just to vary the verticality of dungeon. Currently, I would have to hack into the dungeon builder to do this, or I would have to use a combination of custom emitters and theme nodes.

    Thanks for a really great tool so far.
     
    Xepherys, AliAkbar and pixelsteam like this.
  17. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Excellent Suggestions!
     
    Xepherys likes this.
  18. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729

    @Sovogal Thank you for the suggestions!

    I'll add a flag to optionally link the probability with selection rules

    In the upcoming update, I'm working on adding a new feature called Clustered Theming. This allows you to automatically apply different themes to various clusters (or corridors / rooms) of your dungeon. This helps in breaking monotony and adding variation to your levels. With this you can have a different theme with a larger ceiling room as one of the cluster themes. Would this help with your use case?



    As for zooming, you are right, it is definitely needed. Since the whole graph is user drawn, I needs a bit more work. I've added it in my todo list
     
    Steve-Tack and Sovogal like this.
  19. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @antoripa Yes I randomly merge nearby city blocks (based on a configurable param) to add some variation
     
    antoripa likes this.
  20. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Very excited about this for exterior assets and city blocks. When do you expect to have this implemented?
     
  21. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    This is actually an entirely better solution than the one I considered. It solves my use case and a bunch of others. I was thinking about how to modify the builder to add things that would necessarily take the place of other markers, like bridges and cliffs in place of platforms. Mixing two themes sounds like it might solve that use case as well.

    I am still supremely interested in the flow map idea. Rolling my own solution might prove rather difficult without rewriting the builder to emit markers for things like "boss room" or "puzzle room." Then figuring out how to connect prefabs to the existing layout. Sounds daunting.
     
    Xepherys likes this.
  22. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Gg for your's Awards
     
    AliAkbar likes this.
  23. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    S4G4N likes this.
  24. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
  25. ANTARES_XXI

    ANTARES_XXI

    Joined:
    Dec 23, 2014
    Posts:
    141
    Will there be any discount in the near future?:) Did you think about trial/demo version of this asset?
     
    S4G4N likes this.
  26. Pat19645

    Pat19645

    Joined:
    Apr 17, 2014
    Posts:
    14
    Hi,
    I have a problem with my doors, they don't open no more when they are placed with Dungeon Architect.
    Very nice asset otherwise! :)
     
  27. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hi, sorry if this was already asked, but does this have a way to handle occlusion culling? Obviously we can't use Umbra with this, so what is the recommended way to have a First Person view using this without destroying framerates? I know another dungeon generator that has been out for ages has Sector support built in to solve this ... is there anything similar in this? I would love to try using this for my project, but unless there's a way to handle this, a first person game with decent graphics is simply out of the question.
     
  28. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Thank you @kilik128
     
  29. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Pat19645, could you give more info on this? Are the doors physics enabled? If so, is the door colliding with the ground mesh?
     
  30. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @DGordon I'll have a look at spectre
     
  31. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Happy new year everyone. I've implemented a new layout method called Snap Builder for unity. It pieces together existing room prefabs to build your dungeon (inspired by Doom Snap Map). I believe DunGen also does something similar.




    I'll provide tools to let you pieces together your modules manually like the way doom snap map does it (maybe even during runtime for your players to build levels?)
     
    GenaSG, Xepherys, Hans and 4 others like this.
  32. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    @AliAkbar Does this mean we might be seeing a kind of dungeon flow system that works with the Snap Builder? Also seems like it may be a great opportunity to implement SECTR support.
     
    AliAkbar likes this.
  33. Pat19645

    Pat19645

    Joined:
    Apr 17, 2014
    Posts:
    14
    Problem came from the door itself Ali, fixed it already. :)
     
    Xepherys likes this.
  34. sammi32

    sammi32

    Joined:
    Feb 19, 2014
    Posts:
    16
    Hi,

    Happy new Year :)

    i have some Questions :)

    I need a random Dungeon Generator like Diablo/ Hellgate London :)

    I Need a Start Zone - Mini Boss Room - Endboss Room and a Exit Room can i define that?


    Can i generate a new Dungeon at Start from the Game and next, can i save the result for a multiplayer Coop Game?


    thank you and best regards.
     
  35. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729

    @sammi32 This level of control is not possible now. I'm working on adding it with the Dungeon Flow editor

    You can however have a start / end room decorated with a different theme. Have a look at the following examples:
    • SpecialRoomFinder script in the Survival Shooter demo to find further rooms for spawn / boss rooms
    • DynamicVolumeSpawning to decorate rooms with different themes (possible to apply another theme to the boss room)
     
    Xepherys and Sovogal like this.
  36. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    77
    Hi,
    I'm interested in dungeon architect I read your feature it look great but I have some question
    1.I would like to know more information about your 2d pathfinding. I have poly|Nav2D I want to compare which is better
    incase I use poly|Nav2D at least I need to know corner of each room for define shape of walk-able zone how I access this data
    2.Can I know side of each door (I would like to place trigger front and back of each door)
    3.Can I save dungeon at run-time for allow player play again
    Incase can save at runtime, Can I save data in dungeon as seed ? (I mean if in the dungeon have 3 power-up each power-up can pick only 1 time when player play first time pick 1 of them when player play this dungeon again power-up have only2 and save position) or I need to save this by my self
    4.How to spawn Player and enemy and is this have any limits?
    5.If I have boss in dungeon Can I generate Deepest room for boss and player is start room?

    thank you and best regards.
     
  37. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    2. This could be part of your door prefab.
    3. The same seed with the same dungeon size with the same theme will always generate the same dungeon.
    4, 5. You can accomplish this with additional marker emitters on the dungeon builder game object.
     
  38. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    77
    3.Can I save each power-up status or I need save them in playerperfs or something like that
     
  39. sammi32

    sammi32

    Joined:
    Feb 19, 2014
    Posts:
    16
    Hi,

    @AliAkbar

    Have you a release date for this Feature "Dungeon Flow editor" ?

    I have have see some differences between Unity and Unreal , Cave Generator and some other thinks comes that for the Unity version and if yes, have you you a release Date?

    And last but not least the Snap Builder looks also very interested , a release date ? :)

    I am between Dungeon Architect or DunGen to buy in the next days and must look what is better for me. :)


    and my Goal is a Dungeon Generator for Underworld Dungeons Like "Hellgate London" for Coop Games, with a Boss , know i am think Dungeon Architect is the better solution for me, but i not sure yet.

    Thank you for your time
    best regards
     
  40. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    100
    You'll probably want to serialize persistent player related data in some way. I wouldn't look to a level randomizer to do that for you.
     
  41. banksazero

    banksazero

    Joined:
    May 8, 2015
    Posts:
    77
    I would like to use poly nav 2d with this
    Could I know position of each corner room because poly nav use polygon 2d and it can change shape by point
     
    AliAkbar likes this.
  42. ANTARES_XXI

    ANTARES_XXI

    Joined:
    Dec 23, 2014
    Posts:
    141
    Hey! Does this asset use multithreading / coroutines? Can we show some animated UI (progressbar os smthing else) while generating a dungeon?
     
  43. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Hi, @AliAkbar
    i bought your unreal asset of DA, i can build ceiling structures, i wonder i could do the same as unity? also i would like to know if my A* AI works with your system?

    can it also create ceiling walkways within too?

    EDIT: how do i create prefab of rooms then ask DA to create the levels?
    how do i also create a main prefab in the middle & get DA to build around the main prefab?

    I realized DA cannot built rounded corners?

    no multi-storey scene? i need to create those in scifi
     
    Last edited: Jan 13, 2017
  44. LarryWP

    LarryWP

    Joined:
    Oct 31, 2014
    Posts:
    57
    The "Tech Demo (2D)" link is dead. I am only interested in 2D development at the time being. Is there another link for this demo?
     
    AliAkbar likes this.
  45. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    When @AliAkbar (dungeon architect developer) moved his website some of his links got broken. I am sure he will fix it once he sees your message.
     
  46. LarryWP

    LarryWP

    Joined:
    Oct 31, 2014
    Posts:
    57
    OK. Thanks!
     
  47. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Hi, @AliAkbar
    i bought your unreal asset of DA, i can build ceiling structures, i wonder i could do the same as unity? also i would like to know if my A* AI works with your system?

    can it also create ceiling walkways within too?

    EDIT: how do i create prefab of rooms then ask DA to create the levels?
    how do i also create a main prefab in the middle & get DA to build around the main prefab?

    I realized DA cannot built rounded corners?

    need multi-storey scene...
     
    Last edited: Jan 17, 2017
  48. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @banksazero
    1. I use SharpNav for the navigation (a port of the open source recast navigation). Some users have reported quality issues with it which I need to look into. However, after 2 months in 5.6, Unity will support runtime navigation mesh baking (like in unreal version) and it will remove the need for SharpNav and other runtime navigation libraries
    2. Sure. You just attach the triggers underneath your door node. (you can have multiple nodes). So two more nodes for the front and back triggers with and offset.
    3. A dungeon built with the same configuration will create the same dungeon. So, you can save the dungeon configuration and regenerate it when the player revisits. As for gameplay elements, the data needs to be serialized by yourself. I read an article on gamasutra a few years ago on how the devs saved the game state incrementally as a list of actions (e.g. powerup pickup, item moved etc). Then when the player revisits the procedural level again, they apply those actions again on the dungeon (apply powerup pickup, by removing it, move the item etc)
    4. You can spawn them from the dungeon theme file itself or from a script. I give an example of doing this with the shooter game demo
    5. Sure, the shooter game demo finds the furthest points in the dungeon and makes them the spawn / boss points
     
    antoripa likes this.
  49. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    I'm working on the snap builder for the next release, along with other features (clustered theming etc). I'll release the flow editor after that, which will take a while
     
  50. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Sure, the info is present in the dungeon model. It gives you the rectangle of each cell (room / corridor). Let me know if you need a concrete example