Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

World Building [RELEASED] Dungeon Architect

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

  1. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Added mesh merging feature to reduce the draw calls for your mobile games

    A large dungeon with ~12,500 meshes (using the same material) rendered in just 35 draw calls. It supports merging of the level objects in patches so it works nicely with your camera's frustum culling. You can control the patch size. It also takes care of the 64K vertex limit per mesh. So if the combined patch mesh contains more than 64k vertices, it would split it into multiple meshes as needed within the patch

    With Merging [35 batches]:


    Without Merging [948 batches]: (using unity's internal static and dynamic batching)
     
    Arkade, ivanmotta and wolfen231 like this.
  2. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Early prototype of the maze builder

     
    rubble1, hopeful and neoshaman like this.
  3. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Still no progression on flow designing?
     
  4. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    188
    That would be great. actualy i use QMaze but i want to buy your asset so that i can use keys and custom rooms.
    Nice to hear that you will implement that. :)
     
    AliAkbar likes this.
  5. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    very nice. will it automatically work with multiple materials and combine only objects with the same material, or is atlasing neccessary?
    what about the thing I emailed you about the doors? have you had a chance to go at that?
     
    AliAkbar likes this.
  6. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    It will combine objects only with the same material and will not create atlas. A good art asset should have shared materials with a texture atlas

    I'll have a sample for the doors soon
     
  7. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    352
    Hi,
    I dont mean that DA will atlas the textures, I just mean that if I have objects with different materials if DA will still just merge the objects with corresponding materials?
     
  8. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Yep, It merges them based on the material. If there are 1000 objects in a patch area with 8 different materials, they will be merged into 8 different meshes with those corresponding materials applied to them
     
    Sehee26 and rasto61 like this.
  9. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    98
    Hi, it is possible to extend the Mario Builder example to create a vertical game level.

    The mario builder works to create an horizontal level, but I want to know if it is possible to extend the Mario Builder example to create horizontal and vertical level in the same scene?
     
    AliAkbar likes this.
  10. LeeJiHoon

    LeeJiHoon

    Joined:
    Aug 4, 2016
    Posts:
    14
    If Random seed is the same, we know that the dungeon model should always be the same. And I need this.

    PC, Android and MacBook all had the same dungeon model.
    However, on the iPhone, the dungeon model was different.

    I am sad that the release date is approaching soon.


    Triangulator.Geometry.Point pt1 = new Triangulator.Geometry.Point(-4.06781053543091, 10.0734958648682);
    Triangulator.Geometry.Point pt2 = new Triangulator.Geometry.Point(-2.04473757743835, 3.91056537628174);
    Triangulator.Geometry.Point pt3 = new Triangulator.Geometry.Point(6.0913290977478, -4.95926904678345);
    Triangulator.Geometry.Point pt4 = new Triangulator.Geometry.Point(4.90002870559692, 0.00240080268122256);
    Triangulator.Geometry.Point pt5 = new Triangulator.Geometry.Point(4.09875822067261, 2.98428869247437);
    Triangulator.Geometry.Point pt6 = new Triangulator.Geometry.Point(10.0985336303711, -1.01706039905548);
    Triangulator.Geometry.Point pt7 = new Triangulator.Geometry.Point(-2.91148900985718, -0.953461825847626);

    List<Triangulator.Geometry.Point> nodePositions = new List<Triangulator.Geometry.Point>();
    nodePositions.Add(pt1); nodePositions.Add(pt2); nodePositions.Add(pt3);
    nodePositions.Add(pt4); nodePositions.Add(pt5); nodePositions.Add(pt6);
    nodePositions.Add(pt7);

    var triangles = DungeonArchitect.Triangulator.Delauney.Triangulate(nodePositions);
    Debug.Log("### triangles Count = " + triangles.Count.ToString());



    ## result ##
    pc, android, macbook : ### triangles Count = 7
    iPhone : ### triangles Count = 1

    I have not found why the results are different......
     
    Last edited: May 2, 2018
  11. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @LeeJiHoon This is because I'm using .NET's random function which is different in iPhone. I'll add a custom implementation of a random stream in the next update soon
     
  12. LeeJiHoon

    LeeJiHoon

    Joined:
    Aug 4, 2016
    Posts:
    14
    I solved the problem.

    Delauney.InCircle function
    if (System.Math.Abs (p2.Y - p1.Y) < double.Epsilon)

    Modified
    if (System.Math.Abs (p2.Y - p1.Y) <= double.Epsilon)

    Reference URL
    https://bugzilla.xamarin.com/show_bug.cgi?id=8747
     
    AliAkbar likes this.
  13. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @LeeJiHoon Thank you for the update! I've updated the code
     
  14. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Asynchronous Build

    Added support for asynchronous dungeon building, so you can build your dungeons across multiple frames (both in editor and runtime)

    You can specify the amount of time DA should take per frame (in milliseconds) while building the dungeon. You can also specify a build origin point from where the build starts. You can set this to the player location so objects near this point will be built first. In the demo video below, I've set it to the default (0,0,0).

     
    Last edited: May 3, 2018
    tapawafo and hopeful like this.
  15. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    Are you working on "streaming the dungeon" ? That seems like a logical next step from this new feature !
     
    AliAkbar likes this.
  16. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Razmot yep I'm working on that. Did major refactoring on the theming engine to move it out to a separate reusable library so other parts of DA can use it.

    I'm working on a framework for infinite dungeons, which will build chunks on demand asynchronously for infinite worlds
     
  17. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    For testing the infinite dungeons, I'll make a bunch of new builders. I'm thinking of the following:
    • Endless Runner - (for games like subway surfer)
    • Infinite Side scrolling Cellular automata
    • Minecraft like blocky voxel builder?
    Let me know what you'd like to see
     
  18. Arcan-Studios

    Arcan-Studios

    Joined:
    Mar 12, 2015
    Posts:
    58
    action rpg, or third person
     
  19. evamariah

    evamariah

    Joined:
    Apr 23, 2018
    Posts:
    14
    Whoa, this is pretty sick! I'm working on a game right now that might be able to use this! cool product.
     
  20. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    A blocky Voxel builder that is able to mix blocks and various shapes defined in themes would be quite interesting, if it produces an optimized mesh. It would be even better if it can mix cubes and wedges, removing the hidden faces of wedges in the final mesh.

    Also some integrations with infinite terrain unity assets would be good too :
    mapmagic + voxeland
    maybe this free asset (infiniterrain) https://www.assetstore.unity3d.com/en/#!/content/46241
     
    Last edited: May 7, 2018
  21. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    I'll probably have a full fledged voxel library as a separate asset, as it is out of the scope of DA

    I'm working on Landscape Architect in Unreal engine. I'll be bringing it to Unity later


     
    rubble1 likes this.
  22. jKessinger

    jKessinger

    Joined:
    Jan 21, 2016
    Posts:
    8
    Has anybody else tried using DA with Unity 2018.1? When I open the theme editor it just shows up blank with no errors in the console.
     
  23. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    I'm using 2018.1 for development and it works fine. Could you try closing the window and double clicking on a theme file? Which OS is this on?
     
  24. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Infinite Dungeons

    Dungeon architect now supports infinite dungeons. These are great for exploration games. The framework allows the layout algorithms to generate the infinite levels along a single axis (like endless runners), along 2 axis (e.g. along the XZ, XY or YZ plane) or on full 3D

    I've added a new Infinite Cave algorithm. Some more work is pending (like drilling holes on blocked areas to make it accessible)

     
    hopeful and Razmot like this.
  25. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    Is it multithreaded or coroutine based ?
    Any plans to do an optimised version of DA for u2018 and it's multithread job system ?
     
  26. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    - Is it possible to stream a big - but not infinite- dungeon ?
    - Is it possible to implement a wrapping / circular Dungeon ?
     
    neoshaman likes this.
  27. sanuvin

    sanuvin

    Joined:
    Feb 11, 2014
    Posts:
    61
    Does this support a dungeon with multiple entrances? Perhaps all entrances equal distance from a center room where a boss mob is located.
     
  28. jKessinger

    jKessinger

    Joined:
    Jan 21, 2016
    Posts:
    8
    I'm on Windows 10. Double clicking a theme file just opens a blank window. I've tried it with several different themes and also on an empty new theme and got the same result.

    I also have Odin installed and I think that might have something to do with it, but I disabled Odin inspectors for Dungeon Architect classes, but I'm not sure what interaction that might have with editor windows.
     
  29. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Can I recommend something like this?


    Basically it's inspired by worley noise, since you can generate a cell data based on his position hash, you can use that as a seed to get a random position inside a cell, by generating adjacent cell seed you access their generated point or data inside, you can abuse this to create infinite connectivity.
     
    AliAkbar likes this.
  30. hugopok

    hugopok

    Joined:
    Mar 30, 2016
    Posts:
    46
    Hi ali, i have bought your plugin on unity assets store, i wanted to know if is possible to create a dungeon similar an house builded with standard unity workflow, if I have the assets for create an home is possible with dungeon architect reach this final result with stairs and more floor :











    in this two linked is possible see some examples, i will have assets like these : https://assetstore.unity.com/packages/3d/environments/vintage-house-98229



    I am waiting for an email thank you very much



    Best regards,



    Matteo
     
  31. Culrich

    Culrich

    Joined:
    Sep 24, 2014
    Posts:
    17
    @AliAkbar Hey there! We're about to release our game, tomorrow actually, and I was wondering if you would like to have yourself or Dungeon Architect to be credited in our credits. If you want Dungeon Architect credited, do you have a logo or image you would like us to use? If you can't get back to us soon, we can always patch you in later!

    Thanks again for all of your help and your work on Dungeon Architect!
     
    rubble1 and AliAkbar like this.
  32. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Hey
    @Culrich I'm really happy to hear that and congrats on the release! I'd be happy to have DA credited in your game

    Is there a link from where I can purchase it from?
     
  33. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    The bottleneck is always spawning the game objects in the scene (layout generation is fast and doesn't require multi-threading)

    Since game objects need to be spawned from the engine's game thread, it has to be done in the Update function and is done over multiple frames. I could use co-routines but chose to manage it manually (in a similar way) since co-routines don't work in the editor
     
  34. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    You can control the layout of your dungeons using platform volumes
    Here's an example
     
    JuanFLZ likes this.
  35. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @hugopok The floorplan builder needs work and I'll be improving it in the future
     
    hugopok likes this.
  36. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    I'm working on a Room layout designer. This is a procedural and designer friendly tool for decorating the rooms of your dungeons. I'll have more info soon
     
    Mohamed-Anis and Razmot like this.
  37. Culrich

    Culrich

    Joined:
    Sep 24, 2014
    Posts:
    17
    Here's a link to our Steam store page, feel free to check it out!
    https://store.steampowered.com/app/492410/Rogues_Like_Us/

    When we credit Dungeon Architect, do you have a logo or image to use or is just the name alright?
     
    Last edited: May 14, 2018
  38. hugopok

    hugopok

    Joined:
    Mar 30, 2016
    Posts:
    46
    Ok thank you @AliAkbar , i will waiting i need of this feature for my game, if you have some tricks for make a dungeon similar an house can you explain me ? thank you and sorry for my request
     
  39. IsntCo

    IsntCo

    Joined:
    Apr 12, 2014
    Posts:
    146
    Are there any methods or samples for using run-time generation in a multiplayer (preferably Photon) capacity? Meaning, first player that enters the level generates the dungeon. All other players first get that layout from the host and build the same dungeon.
     
    AliAkbar and rubble1 like this.
  40. hugopok

    hugopok

    Joined:
    Mar 30, 2016
    Posts:
    46
    I am doing the same thing, maybe we should to generate the seed from server and then send the number at all clients connected in the same lobby.
     
    AliAkbar likes this.
  41. IsntCo

    IsntCo

    Joined:
    Apr 12, 2014
    Posts:
    146
    Yeah sounds like that would work best
     
    AliAkbar likes this.
  42. Mohamed-Anis

    Mohamed-Anis

    Joined:
    Jun 14, 2013
    Posts:
    94
    @AliAkbar believe PropSocket.IsConsumed is being assigned to false but
    (1) it's never assigned to true.
    (2) it's not being used anywhere
    At least according to the Visual Studio IDE... is it intentional or is the feature unimplemented? Thank you!
     
    AliAkbar likes this.
  43. SeanPollman

    SeanPollman

    Joined:
    Jul 10, 2012
    Posts:
    55
    Does this support any kind of level flow? Such as I want to make sure there is a mini boss at the end of every level and a boss room and a hidden treasure room, every 3rd level for example.
     
    AliAkbar likes this.
  44. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    No. Though the author long ago said he was working on a flow system of some kind. Hasn't updated about it in a very long time though.
     
    AliAkbar likes this.
  45. Nevrosis

    Nevrosis

    Joined:
    Nov 30, 2016
    Posts:
    3
    I bought Dungeon Architect 2 weeks ago and I love it very much, amazing asset.

    I wounder if I can do the following with the asset's settings :
    1 = To have the option to set the minimum length of a corridor.
    2 = To have the option to set the minimum space between 2 rooms so they do not touch each other.




    Have a great day !
     
    Last edited: May 31, 2018
    AliAkbar likes this.
  46. Sehee26

    Sehee26

    Joined:
    Mar 13, 2014
    Posts:
    19
    Hi, I'm trying to use spatial constraint with floorplanner. Has anyone got it? Can anybody help me?
     
  47. Sehee26

    Sehee26

    Joined:
    Mar 13, 2014
    Posts:
    19
    I already have it, it was easier than I expected.
     
  48. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    Hi!
    In May, I saw video demonstrations with a asynchronous generation and it looked pretty good, but in the Asset Store the March version.
    Tell me please, when it will be possible to use asynchronous generation?
     
    Last edited: Jun 19, 2018
  49. Mohamed-Anis

    Mohamed-Anis

    Joined:
    Jun 14, 2013
    Posts:
    94
    @AliAkbar any update on the above? Looking forward to using it tks!
     
  50. ashwinFEC

    ashwinFEC

    Joined:
    May 19, 2013
    Posts:
    48