Search Unity

[RELEASED] Dungeon Architect

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

  1. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    Couple more questions:

    - What is the largest grid you have been able to generate?
    - Does the tooling itself support any on-the-fly culling for very large levels? For example only placing the prefabs within a certain bounding area that moves with the player, and destroying/returning to the pool when the player leaves.
     
    Last edited: Dec 11, 2017
  2. emperor12321

    emperor12321

    Joined:
    Jun 21, 2015
    Posts:
    50
    It seems like it is working for some people on blank projects. I have six namespace errors which make it unplayable currently in my blank project. Is there a step I missed in setup?
     
  3. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    What's the difference beetween a Cell and a GridCellInfo object? Does the first hold infos about the whole Room or Corridor while the second holds infos about the single tiles of a Room or Corridor?
     
  4. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    Guys can someone explain how to use the snap builder? I cannot find docs anywhere and I'm stuck.
     
    AliAkbar likes this.
  5. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    I've been wanting to create that for a while :D. I'll look into it soon
     
  6. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    @Arganth I'll look into mesh combining. GPU instancing is straightforward with UE4 as it takes care of the shaders creation and compilation itself. However, in unity it requires the material's shader to support instancing, which I cannot update from code. I'll explore further on this.
     
    Sehee26 and Arganth like this.
  7. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    Thank you @Naughtykyuubi69 Let us know what you create
     
  8. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    Hey @jaybennett, DA supports mutiple layouts (called builders) and they can implement their own tooling to influence the layout.

    I've implemented a new type of system based on texture rasterization (more info in the further post). This system can allow painting the layout with a paint brush. In your case, fences can be trace through marching squares
     
  9. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    I now use mesh combine studio which works wonders with dungeon architect :)
    https://www.assetstore.unity3d.com/en/#!/content/101956

    most demos are also made with dungeon architect :)
     
    Sehee26, hopeful and AliAkbar like this.
  10. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    GridCellInfo is used internally by the builder for faster lookup and with some extra metadata. It is not meant to be public. You should be using Cell which is available from the grid model
     
  11. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    Yeah it looks awesome :) I grabbed it a while ago. Didn't get around to playing with it yet
     
  12. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    @francescobr I'l add tutorials for the snap builder soon
     
  13. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    I did some work on level streaming. There are some pending issues though (e.g. adjacent rooms share a wall on both sides so streaming it out causes an empty space to show up)

    It should be available in the future updates.
     
  14. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    @AliAkbar please help me, why does this happen?
    In the meanwhile could you tell me how prefabs should be made? The snap builder creates just one or two rooms and connects them by merging them in the wrong way. Doors aren't connected at all.
    I tried to make them like the example in the DemoBuilder_Snap folder but mine don't work.

    And man I've got to tell you, you should really make some better docs for your tool, as it is now I'm sorry but support is very poor :(
     
  15. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    I've working on a new dungeon rasterization system where the builders can first paint their layouts on a texture, then apply various filters on top of it. Then emit the markers off of it for the theme files to pick it up. This opens up lots of possibilities for creating more organic dungeons, as opposed to being restricted to a grid based or geometric system.

    Here are some early results from the new circular city builder that uses the rasterization framework.
    The roadmap is first painted on a texture. This splatmap would then be used to drive the marker emission so your buildings, trees, walls etc can be placed.







    The framework lets the builders create as many splatmaps as it wants (e.g. more texture maps for population, theme overrides, etc) that can be populated by code logic (like the roadmap), through a noise or by a paint tool by the user

    The progression...

    Start by drawing the ring roads


    Draw the rays


    Start filling up the nearby empty space based on weights. This is good for creating thick lines later on



    Add intermediate lanes



    Randomize the angle of the side lanes to create a more organic look and adjust the rasterization with a curve for better defined boundaries




    Next steps:
    • Add house markers around each blocks
    • Road decorations (lamp posts, side walk etc)
    • Spline roads
    • Tooling
     
    rubble1, Sehee26, Guile_R and 4 others like this.
  16. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    Snap Builder seems to work if I load your scene, but not in my scene, even if I copy paste your prefab and click on Build Dungeon. It just builds the starting room (the 6x2 room in your example). Why?

    EDIT : I was finally able to make it work, connections HAVE to be as direct children of the prefab gameobject. If they're nested than it's not gonna work. Man we need documentation for this!!!
     
    AliAkbar likes this.
  17. Shawn67

    Shawn67

    Joined:
    Jan 2, 2014
    Posts:
    2,196
    This sounds AWESOME! Is it safe to assume that it will end up being able to be used for underground labyrinths or dungeon systems as well? It would be awesome to be able to take a texture with a basic layout to feed into the system and have build rooms, corridors, etc to build out the space, regardless of shape.
     
    AliAkbar likes this.
  18. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    @francescobr Snap builder is a work in progress :) I'm working on the docs for the snap builder and will have it shortly
     
  19. emperor12321

    emperor12321

    Joined:
    Jun 21, 2015
    Posts:
    50
    AliAkbar would you please check your email? I am having a serious issue.
     
  20. Snow-Dragon

    Snow-Dragon

    Joined:
    Sep 15, 2014
    Posts:
    2
    @AliAkbar
    Hello AliAkbar. I'm new user of your Dungeon Architect and I found BSPDungeon doesn't have a SpatialConstraint support. Can you add some support to that?
     
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,926
    Wow! This could possibly also enable use of real world roadmaps with DA ...?
     
  22. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    It looks like snap builder does not remove or disabled doors from prefabs when snapping them together, so the result is you get 2 doors. For the moment I've been removing all my doors, so that snapping is more fluid, but I wonder, how would I readd them later? Is there any suitable way?
    And another question for @AliAkbar, would it be possible using a grid builder on top of a snap builder or viceversa? Like theme overrides but with builders instead of themes?
     
  23. davidseth8

    davidseth8

    Joined:
    May 8, 2016
    Posts:
    13
    @AliAkbar can you provide more info on the Mario Builder? I'm trying to get it to work by creating a new scene, dragging in the DungeonMario prefab and creating a new theme, but nothing happens and no errors.

    I'm looking to see how this can be used in my side scroller game so wanting to see what you've done.

    This is a terrific asset!
     
  24. Arcan-Studios

    Arcan-Studios

    Joined:
    Mar 12, 2015
    Posts:
    49
    hi, its posible to use ceilling with diferent size and geometry of the floor?
     

    Attached Files:

  25. jlocke

    jlocke

    Joined:
    Dec 16, 2017
    Posts:
    62
    Hey .. we used last year the unreal version . nice asset ...
     
  26. DanVioletSagmiller

    DanVioletSagmiller

    Joined:
    Aug 26, 2010
    Posts:
    123
    Anyone know how to get the prefab it associated post build from the cell? or vice versa? The game I'm using is grid based, and I'm trying to wire it up. I'm having trouble figuring out how to associate a cell, post build, with the game object that was added.

    Here is the code I'm already using:

    public override void OnPostDungeonBuild(Dungeon dungeon, DungeonModel model)
    {
    if (model is GridDungeonModel)
    {
    var grid = model as GridDungeonModel;
    var builder = dungeon.GetComponent<GridDungeonBuilder>();
    foreach(var cell in grid.Cells)
    {
    /// how do I get the prefab added for this cell?
    }
     
  27. Muhamad_Faizol

    Muhamad_Faizol

    Joined:
    Jan 21, 2017
    Posts:
    43
    @AliAkhbar, sorry for noob questions, but has the script been included in the latest version of DA? The script would be helpful for me to test run time mesh combiner with DA and to stream the assets.

    Thanks.
     
  28. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    How can we visualize the intermediate in-memory dungeon layout as shown in your user guide documentation? Do you have a tool that can visualize the list of PropSocket and color them by type as well?

    I am enjoying the asset so far.
     
    Last edited: Dec 26, 2017
  29. Francois31360

    Francois31360

    Joined:
    Jan 3, 2018
    Posts:
    1
    Hi everyone, I've just bought this plugin, i have installed it, but i can't use it because of this error :
    error 0246 : The type or namespace 'NavMeshBuildSource' could not be found.

    Could you help me please ?
    My version of Unity is 5.5.4p4
     
  30. jlocke

    jlocke

    Joined:
    Dec 16, 2017
    Posts:
    62
    Hello .. is the asset still active . I have not seen reply from the author . we would but for a new project
     
  31. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,926
    As you can see above, the author commented in this thread about two weeks ago.
     
  32. Snotface

    Snotface

    Joined:
    Jun 3, 2015
    Posts:
    7
    Requires Unity 5.6.0 or higher
     
  33. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    595
    Hi everyone,
    I've been working on finalizing the circular city builder. I ended up using the geometric approach (instead of rasterization in the earlier update) for more control
    I also added a road network framework. It creates nice roads with arbitrary width with intersections. I'll be integrating this with the other city builder later. The texturing needs more work.




    Added a script to make the buildings near the center taller



    A larger city



    The road network


    Since this is a graph in memory, path finding and traffic can be simulated
     
  34. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,926
    Just curious, but would it be possible with small tweakings of your code to get different shapes, like hexagon, pentagon, etc.? Or perhaps semi-circles of varying degrees? Ovals and/or ellipses?

    And would it be possible to set a circular city region inside of another city region, with the circular overwriting / displacing the underlying random city?

    Not trying to bedevil you, just thinking this might be a point in development where an opportunity might exist for more options, and if so, to ask for them. :)
     
    Shawn67 likes this.
  35. Sovogal

    Sovogal

    Joined:
    Oct 15, 2016
    Posts:
    87
    @AliAkbar Not to derail the incredible work you're doing on alternate builders, but I was wondering whether I could make a couple of quality-of-life requests for the theme editor.

    1. Node connections. I would love to be able to see node connections between marker and emitter nodes. For example, if I highlight an emitter node, highlight the corresponding marker node in the editor, possibly with a directional arrow if the marker node is off-screen. If I highlight the marker, highlight the emitters that emit the marker. This will both help me learn better from example themes AND allow me to better manage my own themes.
    2. Node title width scaling. For longer names or similarly named nodes, the width limit obscures the name.
    3. Colorizing nodes. Playmaker has this functionality and it also helps visually conceptualize large graphs. An example would be coloring wall decorations differently from floor decorations.

    I'm coming back after about six months and I'm loving the changes I see. Thanks for your hard work and continued support.
     
  36. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    280
    @AliAkbar

    would you already see the snap builder as production ready? or are greater changes incoming?
     
  37. levi777l

    levi777l

    Joined:
    Mar 13, 2014
    Posts:
    14
    Do you have a roadmap of upcoming features?
     
  38. progys

    progys

    Joined:
    Aug 26, 2014
    Posts:
    1
    Hi,

    What is the point to do a website on Dungeon Architect, if you never show how to start from the very beggining ?
     
  39. Arcan-Studios

    Arcan-Studios

    Joined:
    Mar 12, 2015
    Posts:
    49
    please reply to this i need to know if its posible
     
  40. Sehee26

    Sehee26

    Joined:
    Mar 13, 2014
    Posts:
    19
    Hi @AliAkbar, when can we expected the next update?

    Thanks.
     
  41. Heavy_D

    Heavy_D

    Joined:
    Apr 30, 2013
    Posts:
    1
    Hi @AliAkbar, I have a question on DA and playmaker... I am not a programmer and so I use playmaker to make games, I just would like to access the seed property in the grid dungeon config script through playmaker but can't find it when I use set property.

    Is there maybe time for you to look this up and create maybe a small tutorial on how to do this. I think a lot of playmaker users could use it.
     
  42. StevenChand

    StevenChand

    Joined:
    Jan 24, 2018
    Posts:
    1
    Hi @AliAkbar, amazing tool you have here!

    I have two questions:

    1. Is it possible to get a Collection of rooms, after the dungeon has been created?

    Such collection might have the bounds of a room, array of references to prefabs contained within the room, etc.
    I was hoping to create a monster spawner object, covering the bounds of a room, after the dungeon has been created.

    2. Would it be possible to add layer overrides for MeshNodes?

    For example, it would be great if I could create all "ground" marker mesh nodes on the "Ground" layer, "wall" marker mesh nodes on the "Walls" layer, etc. This would be helpful when performing layermask raycasts on the dungeon
     
  43. MystiqueGaming

    MystiqueGaming

    Joined:
    Feb 15, 2017
    Posts:
    35
    Can it be used to create other procedurellay generated terrain as well??
     
  44. Hellwaiker

    Hellwaiker

    Joined:
    Jan 8, 2016
    Posts:
    73
    Hey!
    What is the best way to add Ceilings? I added them to ground node but ran into problem on stairs area
     
  45. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Any idea when we will get the Cellular Automata mode for Unity?
     
  46. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    10
    Hello
    I am making a 2.5d game, i need a floor and wall on one side, Please tell me how i can do that. i have tried mario builder but it is creating only the floor .
    Thanks in advance
     
  47. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I am curious if anyone has tried calling another dungeon prefab from some sort of listener script?

    For example a snap dungeon prefab has a floor planner prefab in it and then it can randomly decide to spawn that floor planner (pre-set up to fit inside properly). The trick I can't figure out is how to actually get it to spawn / activate that floor planner.
     
  48. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    When do you plan to have this update in as well?
     
  49. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    The way he got around this is in an example somewhere. I think his FPS candy demo. He would create a ceiling specific to stairs and use a selection rule(?) to tell it to only apply that to stair pieces placed.

    Or he was attaching the special ceiling piece to the stairs.
     
  50. Verbanski

    Verbanski

    Joined:
    Aug 17, 2016
    Posts:
    1
    Hi my friend, i've bought your dungeon arquitect engine but i have a doubt:
    how can i change the width of corridor between room?

    PS: i'm using the DungeonSpatialPartition

    thank you!