Search Unity

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
    I've added more features to the city builder example and will be available soon in the next update

    I'm also thinking of creating another theme using ManufacturaK4's awesome Top-Down Graveyard assets. I'll do that after publishing the update
     
    hopeful and Teila like this.
  2. Cdngater

    Cdngater

    Joined:
    May 29, 2014
    Posts:
    65
    @AliAkbar

    Way back Feb 25, 2016 you had the following post. I was wondering if this was ever implemented? I see no posts saying it was or was not. Note: I have NOT purchased DA YET, so I don't know if this was done. But it would sure help me decide on purchasing if it was.

    Thanks


     
    Last edited: Nov 3, 2016
    Xepherys likes this.
  3. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Fabulous! I am busy with terrain and characters at the moment so will look forward to the update and the time when I can play with it. :)
     
  4. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    I sent to you my class library for the Random generation. (check the conversation)
     
  5. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Thank you @Magic73, I'll check it out
     
  6. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Teila and antoripa like this.
  7. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Cdngater I haven't worked on that
     
  8. Cdngater

    Cdngater

    Joined:
    May 29, 2014
    Posts:
    65
    That's a shame, ok thanks for letting me know. Hopefully one day.

     
    Last edited: Nov 4, 2016
  9. Ankaman

    Ankaman

    Joined:
    Feb 14, 2014
    Posts:
    37
    when are you gonna release the update?
     
  10. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    soon
     
  11. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Has this been tested with MapMagic with infinite terrain? Also can any prefab be instantiated.
     
  12. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @pixelsteam I haven't tested it with MapMagic. It can instantiate any prefab
     
  13. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Added a fast navigation builder (that provides the navigation data directly from the city's layout)

    Also added waypoint system generation for the city layout



     
    hopeful and syscrusher like this.
  14. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    antoripa and pixelsteam like this.
  15. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Runtime Native Unity Nav Mesh support

    Unity finally supports building navigation meshes during runtime. The roadmap says 5.6 to finalize this but I've been playing around with 5.5.0b11 along with their open source library to control the navigation mesh and it works very well. Lets hope this makes it to 5.5 and I'll drop SharpNav for Unity's superior navigation framework


     
    syscrusher, hopeful, Griffo and 2 others like this.
  16. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    wow .. that's really cool ....
     
    AliAkbar and pixelsteam like this.
  17. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    I have a new build available. I'll submit to Unity after testing further tomorrow. In the mean time, you can PM me if you want it right away

    It contains major improvements to the City builder. There are also 3 sample city theme files to create levels like these:

    Graveyard Theme (Top-Down Graveyard by ManufacturaK4)


    Desert Theme (Top-Down Desert by ManufacturaK4)


    Toon City Theme (Cartoon Town and Farm by ManufacturaK4)
     
    Ankaman, Inspeinre, Astarorr and 2 others like this.
  18. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Added a Survival Shooter demo variation using the City builder. It spawns waypoints, NPCs and navigation on a dungeon created by the city builder

     
    Inspeinre and Magic73 like this.
  19. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    About the city builder, is it possible to create a non grid block size?
    from what I see, the city builder use a grid like, in order to create the city. it defines row and column, and then build the internal cells.

    Using, instead or as alternative option, something like "voronoi diagrams": https://en.wikipedia.org/wiki/Voronoi_diagram
     
    Griffo likes this.
  20. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    I don't plan to add that any time soon. It started out as a simple sample to demonstrate how to create your own builders. I've created more advanced city builder like this but this is out of the scope of dungeon architect

     
    antoripa and Griffo like this.
  21. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    But I was thinking at something more simple than that. :)

    voronoi diagrams use generic polygons, but I mean to use square/rectangle only.

    in order to have city like this:

    upload_2016-11-10_12-51-29.png
     
    Griffo and AliAkbar like this.
  22. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Hey @Magic73 that should be possible. I'll try to add that in the future update :)
     
    antoripa, Magic73 and Griffo like this.
  23. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Submitted a new version to Unity for approval

    Version 1.4.0

    • Procedural Terrain painting support on the City builder. You city can be built on a terrain with roads, parks and houses painted with custom textures
    • Procedural Foliage support on the City builder. Add multiple foliage types automatically on various tiles with blending. This can be used to add grass / flowers on parks, house and road tiles
    • The city builder promotes house tiles to parks if they are not accessible by nearby road tiles
    • Created a Survival Shooter demo variant that runs on a city dungeon created using the city builder
    • Added a Navigation prefab for dungeons created using the city dungeons. Refer the CityShooter sample demo
    • Updated the sample way point generator code to generate waypoints for city dungeons created using the city builder
    • Refactored the namespaces to better organize the code in each builder. This changes now requires you to add (using DungeonArchitect.Builders.Grid) in your custom code if you used the grid builder
    • Added an example demonstrating theme override volumes with the city builder. This enables you to assign different looks on various blocks of your city
    • Fixed all compiler warnings
    • Added tooling support on the theme editor. You can now create your own tools and they would automatically show up in the theme editor's tool menu (Example: DungeonArchitect/Editor/ThemeEditor/Tools/CommonThemeEditorTools.cs)
    • You can now create default markers in your theme file for various builder types (e.g. grid, city, floorplan etc) from the Tool menu of the theme editor
    • Added a Marker Replacement Volume. This volume gives you a lot of low level control on the generated dungeon. You can use this to replace walls with doors at selected places. Refer the user guide for more details
    • Added three new third party demos to create beautiful procedural maps using the City builder (Graveyard, Desert and Cartoon Town). Refer the quickstart guide for more details
    • Moved the Stronghold Wall emitter code into the main city builder itself and the marker emitter is no longer need and should be removed from the dungeon actor to avoid redundant markers

     
    Magic73, antoripa, daschatten and 2 others like this.
  24. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Can you send me a pm with a download link ?Thanks
     
  25. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    painting support on the City builder is very interessing but demo scene look broken
     
    Last edited: Nov 15, 2016
  26. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    1.4.0 is released in the asset store

    @kilik128 Thanks for pointing it out. The paint mode for city builder is not implemented yet. I'll add it in the next build. The prefab has a paint tool attached to it which should not have been there.
     
    Magic73 and antoripa like this.
  27. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    cool others question on Interiors demo wall deco node look not take in consideration
    one idea about that's other sample is very appreciate thanks
     
  28. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    @AliAkbar

    Can I add stairs to the floor plan and ceilings?

    Then up the Y size, say to 4 and have the floor plan generate 4 floors connected by stairs?

    Thanks.

    Screen Shot_00.jpg
     
  29. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Griffo The next update is for the floorplan. I'll add lift and stair support
     
    syscrusher, Griffo and antoripa like this.
  30. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    WIP .... Dungeon Architect is the best tool on Unity Asset Store ...

    @AliAkbar ... I look forward more amazing features ..
    upload_2016-11-17_17-17-12.png
     
    Xepherys and AliAkbar like this.
  31. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    @AliAkbar

    Any idea when that update will be?

    Thanks.
     
    AliAkbar and Razmot like this.
  32. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    It's not complex ...DA is really a framework and you can write your generator .... Immagine.jpg
     
    AliAkbar likes this.
  33. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    It's not the same that I asked for... don't you see, that you have a vertical roads??? and also.. the horizontal one, are unrealistic too...

    you have a fixed number of rows, each of them with the same width.
    for each row, you have a fixed number of columns, each of them with the same height.

    you can't achieve what I asked for :)

    I asked for a tesselation of the map, with square and rectangular shape, in order to create a more realistic city (Manhattan's like)
     
  34. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    I apologize, but what your comment is wrong. It looks like you are not getting what is showed the map and how is generated. What is showed in the inspector is not used ( in this stage data are hardcoded ) Map is really large so you have that appareance. There is no number of column or row in the algorithm, just the maximum size of each rectangle. So, algorithm start to split the root rectangle randomly horizontal or vertical and so each new rectangle until reach out the maximum size of each rectangle ...You can have Manhattan style area ...
    Btw I do not want to achieve what you asked, but just to share how it's possibile create new generator ... have a nice day
     
    Griffo and AliAkbar like this.
  35. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    May be this give a better idea ... @Magic73 ...
    upload_2016-11-22_10-48-0.png

    upload_2016-11-22_10-50-44.png

    upload_2016-11-22_10-52-42.png
     
    Magic73 and AliAkbar like this.
  36. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Your game is looking very nice antoripa! Looking forward to seeing more :)
     
  37. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    antoripa likes this.
  38. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Your tool is a solid base to create procedural enviroments likd dungeons or cities ( and I fell more ) ...that's awesome .. without that I had to work 100 times more and I could not concentrate just on new generators creation ...
    I look forward to see Snap generator on Unity ..
     
    Razmot likes this.
  39. Magic73

    Magic73

    Joined:
    Jun 23, 2015
    Posts:
    132
    antoripa likes this.
  40. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Thanks.
    I consider the layout fully random.. Number and size of areas are always different. Behind there is even and advanced random number generator that use the latest algorighm ( not using .net or unity one ). Considering huge area, you will never get same layout.

    Yes, it is not in Dungeon Architect included in the Dungeon Architect package. I am just sharing a result that you can achieve building your custom generator.
     
  41. Xepherys

    Xepherys

    Joined:
    Sep 9, 2012
    Posts:
    204
    I'm trying to build a selector rule that will disallow similar props to be within a range of one another, but I can't seem to find a good way. Even if I convert the Matrix4x4 of the current propSocket, I can't seem to find a way to detect other propSocket objects in the vicinity.

    Has anyone had any success with a selector rule like this?


    Thanks!
     
  42. Xepherys

    Xepherys

    Joined:
    Sep 9, 2012
    Posts:
    204
    Did you ever come up with any methods for this? I scrapped my dungeon generator in favor of this simply because I had some critical issues with mine that I didn't want to spend a lot of time trying to fix. However, I can't seem to find a good method for tracking connectivity between places. Something like a spawn point and a boos room, then backwards from the boss room having some locked doors, and those doors having keys that are reachable prior to hitting the door - preferably with the spanning tree kept in check to avoid simply walking around it.
     
    Griffo likes this.
  43. Xepherys

    Xepherys

    Joined:
    Sep 9, 2012
    Posts:
    204
    And another question - is it possible to call the instance of DA's random inside scripts for objects placed via emitters?

    For instance, I have a creature spawner that will randomly instantiate a creature from an array of creatures specific to the biome. Rather than branching several options in the theme, I'd like to emit the spawner and use logic on the spawner to determine what/if a creature is spawned. However, on dungeon build, I'd like it to always present the same creatures when the same DA seed it used. Is there a way to pass this from the emitter into the object that is emitted? Is there a util call I can make to get a random value from the randomizer? I guess I could build that into utils, just wondering if I'm missing something.

    Same with a util call to scan for propSockets within a range of a cell's location using PropSocket.gridPosition - is there something already in utils? If not, I may have to build a method to check within an int-range of the cell's gridPosition value.
     
  44. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    Hi this looks intersting.
    How does this work with current navigation system. Will i be able to use asset with unity navmesh agent on runtime generated levels.
    How big is data of generated level. is it possible to send generated level data using a network so that all players has same dungeon layout
     
  45. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    @Xepherys I'll have a flow control graph for DA soon. I'm prototyping it with the UE4 version (because it is easier with the access to the engine source code). It will let you design a higher level flow of your dungeon. But it is a month or so away



    I'll have a 5.5 update out soon
     
    Xepherys, montyfi and antoripa like this.
  46. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Would having a post process script help? (i.e. after the dungeon is built) to check of nearby objects with certain tags and report them back to you. You can delete them then
     
  47. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    729
    Runtime nav mesh generation is not part of 5.5 :| We'll have to wait till 5.6
     
    antoripa likes this.
  48. Xepherys

    Xepherys

    Joined:
    Sep 9, 2012
    Posts:
    204
    That would be better than nothing for sure - I was considering creating a List<> of objects as they are created and comparing them on the fly as new objects are considered, but trying to get their cell location isn't as easy as I expected, either.
     
  49. Xepherys

    Xepherys

    Joined:
    Sep 9, 2012
    Posts:
    204
    I'm running into an issue I can't seem to solve when using the packaged AI and Nav assets. When the dungeon is built and the NavMesh is laid down, it gets to a point where it calls PositionOnNearestNavMesh() and I get a null reference exception on:

    var navPoint = navMesh.NavMeshQuery.FindNearestPoly(ToSV3(transform.position), ToSV3(Vector3.one * 6));

    The navMesh exists, but NavMeshQuery is null in it's nested information:


    Any thoughts?
     

    Attached Files:

  50. AlmostBearded

    AlmostBearded

    Joined:
    Nov 11, 2016
    Posts:
    2
    This is freaking amazing. I was about to dive into the code and try to implement something like this myself but seems like you'll be faster than me. My current project really depends on this feature so I'm gonna +1 this feature request. Thanks! ;)