Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  5. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[RELEASED] Dungeon Architect

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

  1. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    42
    Hello @AliAkbar or anyone with the knowledge!

    I'm trying to make my own DungeonBuilder using the SimpleCity example builder. The user will draw the dungeon layout themselves so the layout phase is just making the data structure and initial Markers. The layout phase is working fine, I can change the cell.CellType easily afterwards and update the Markers (I have this working already).

    The problem is, I can't find a way in code to get the Theme to refresh in Play Mode. The cell.CellType changes I'm doing are working, if I fiddle with the Theme Node editor it updates. I just need a chunk of code to do that theme update without having to run through the whole layout process (which is not needed for my app).

    I'm using Bolt for most of my programming logic but I can read and hack C# scripts when needed (I'm not a great coder). I can follow most of whats going on in the different DA scripts.

    I found a ReapplyTheme method in Dungeon.cs but it needs an objectInstantiator as an input and I can't quite figure out what that even is, its going a bit beyond my coding ability at that point.

    Thanks in advance!
     
  2. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    271
    Hello,

    @AliAkbar is this asset still supported? didn't see creator's activity for some months now...

    I have an issue in Unity 2018.1.7 and Net 4.0

    upload_2018-7-13_3-38-46.png

    I believe this is due to Net Framework version. This is blocking compiler.

    I need Net 4.0 in my project and deleting /thirdparty/sharpnav just throw hundreds of errors, so I guess it's necessary.

    My second question is regarding the Mesh Merging tool. I saw you said it was added in April but the Unity store says the last release is from March. I believe no updates happened since then
     
  3. Appminis

    Appminis

    Joined:
    Apr 12, 2014
    Posts:
    119
    Is there an example for the Circular City using sidewalks, lamp posts, etc.?
     
  4. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    I'll create a sample for this
     
    rubble1 and S4G4N like this.
  5. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @hugopok that would be the way to go. I do something similar in the unreal multi-player demo
     
  6. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @Mohamed-Anis you are right. that flag is not needed. I've removed it
     
    Mohamed-Anis likes this.
  7. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    I'm working on that and have a graph grammar framework built. I'm testing this out in unreal and will port it over to unity when done.

    Here's a very early build in ue4 (hope I'm not breaking any rules by posting non-unity stuff here :D)


    That was from an early build. It can create more advanced graphs like you mentioned. Here's a screen with further along the development



    The graph rules create a random mission graph that have a Mini boss (bm) that requires 3 keys (km) to open a multi lock (lm). A bunch of other stuff in the middle and a final lock (lf) that requires a key (kf) that leads to the level boss (bl) and eventually the goal

    This will work nicely with the snap builder and other types of builders. I haven't come around integrating this with the layout yet

    You can design your own graph rules to generate infinite mission graphs of a certain theme (like the one above) or use the ones I'll provide as samples

    If anyone's interested in knowing more about Graph Grammars and generating mission grammars like this, check out the papers written by Joris Dormans

    • Generating Missions and Spaces for Adaptable Play Experience
    • Adventures in Level Design: Generating Missions and Spaces for Action Adventure Games
     
    Sehee26, StevenPicard, Ryiah and 5 others like this.
  8. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    Thank you @Nevrosis. It should be possible with the snap builder in the future with the graph grammar I've mentioned in the previous post. I'll keep this in mind and add it as a feature
     
  9. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @Elfinnik159 It will be available in the next update soon
     
  10. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    Hey @Darren-R ReapplyTheme would be correct. for the object instantiator, simply pass one of the two depending on if you are in the editor or at runtime: EditorDungeonSceneObjectInstantiator or RuntimeDungeonSceneObjectInstantiator

    The Editor version uses PrefabUtility to instantiate the objects so the prefabs are created properly in the scene view (with the correct Select / Revert / Apply buttons) but requires UnityEditor namespace. If you don't care about that simply pass a new instance the runtime version (new RuntimeDungeonSceneObjectInstantiator())
     
  11. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    I've fixed the issue. I'll have an early access update for your guys soon
     
  12. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    gameObj.transform.SetParent() seems to be breaking physics (the physics transform is reset to 0,0,0) in Unity 2018.2.
    This happens when you try to place all the dungeon items under a certain game object to avoid clutter (i.e. when you assign a game object to the Pooled Dungeon Scene Provider's ItemParent)

    I'll investigate this further
     
  13. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    Yep, just confirmed it with a simple spawn script. The physics doesn't get transformed properly
     
  14. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    I've fixed the 2018.2 physics parenting issue by first setting the parent then assigning the transform. The SetParent's worldPositionStays flag doesn't do anything
     
  15. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    3,754
    You should also check his works on cyclical level graph:
    http://ctrl500.com/tech/handcrafted...nexplored-explores-cyclic-dungeon-generation/

    Apparently it yield the most believable (handcraft) feel to generation.

    Other thing to consider (also suggested by Joris):
    - a graph for movement access (traditional)
    - a compound graph for visibility (you can see a key but not access, or vice versa, it for example)
     
  16. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    12
    Hey Ali! Is there a way to combine meshes by room limits? Would improve my occlusion culling solution so much...
    And this feature you mention, when will be available?
     
  17. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    271
    Thanks a lot, I've sent you a mail for that (you replied already) - can you sent me the update when it's available?

    thank you
     
  18. Appminis

    Appminis

    Joined:
    Apr 12, 2014
    Posts:
    119
    Is there an example for the Circular City using sidewalks, lamp posts, etc.?
     
  19. Sedgr

    Sedgr

    Joined:
    Jun 15, 2013
    Posts:
    1
    Im having occasional issues with the cliff theme and wondering how I would go about resolving it. It produces unnavigable maps sometimes. As shown here.

    https://imgur.com/a/ohiEpwm

    Using the special room finder as the player start point.
     
  20. hugopok

    hugopok

    Joined:
    Mar 30, 2016
    Posts:
    32
    Hi ali , There are some news for random house generated with your plugin? Thank you
     
  21. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    I'll need some more time for polishing and adding more features to the existing builders before the next update. In the mean time I've create a early access build and sent it the following users: @ivanmotta, @Necka_, @Mohamed-Anis, @hugopok, @wolfen231, @Nevrosis, @Sedgr

    Let me know if anyone else needs it

    Version 1.8.0-ea1
    * Made compatible with .NET 4
    * Fixed physics issues with 2018.2
    * Mesh Combining framework
    * Async Build Support
    * Infinite dungeon building framework
    * Infinite Cave Builder (with Async Building)
    * Maze builder (Experimental)
    * Room designer framework (Early WIP)
    * Theming engine code is isolated to a separate reusable library
    * Changed the underlying datastructures that store the markers, to allow for custom filter passes on the stored markers
    * Fixed a GUI style bug that was changing the font colors of the rest of the unity UI system
    * Theme Override volumes can fallback to base theme for missing markers
     
  22. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @Appminis The sample doesn't create sidewalks and its decorations
     
  23. Appminis

    Appminis

    Joined:
    Apr 12, 2014
    Posts:
    119
    Is it possible to have a sample that does generate the typical city elements? Just trying to understand the circular generation vs regular city generation.
     
  24. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    759
    got this message when use -langversion:experimental on mcs.rsp file

    Assets/DungeonArchitect/ThirdParty/SharpNav/AreaIdGenerator.cs(29,16): error CS0104: `Tuple' is an ambiguous reference between `System.Tuple<T1,T2>' and `Eppy.Tuple<T1,T2>'
     
  25. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    Submitted a new version to Asset Store for review

    Version 1.8.0
    =============
    * Made compatible with .NET 4
    * Fixed physics issues with 2018.2
    * Mesh Combining framework
    * Async Build Support
    * Infinite dungeon building framework
    * Infinite Cave Builder (with Async Building)
    * Maze builder (Experimental)
    * Room designer framework (Early WIP)
    * Theming engine code is isolated to a separate reusable library
    * Changed the underlying datastructures that store the markers, to allow for custom filter passes on the stored markers
    * Fixed a GUI style bug that was changing the font colors of the rest of the unity UI system
    * Theme Override volumes can fallback to base theme for missing markers
     
    antoripa, Snotface, Sehee26 and 3 others like this.
  26. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @Appminis I haven't implemented sidewalks yet. I'll try to get it in on the next update
     
  27. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @kilik128 I've sent you a PM with the latest version. it fixes this .NET 4 error
     
  28. ArkadiuszR

    ArkadiuszR

    Joined:
    Jan 21, 2016
    Posts:
    7
    Could You make make more tutorials? :/
     
    AliAkbar likes this.
  29. xCrochaNx

    xCrochaNx

    Joined:
    Jun 20, 2013
    Posts:
    3
    Hello everybody!

    I'm having an issue with Snap builder. The End Modules and Branch End Modules are not working properly. I'm always getting End Modules placed and never Branch End modules. I saw that this exact issue was fixed by Ali for UE version of Architect, and was wondering if the same fix exists for Unity version.

    Did anyone experience this issue? Any solutions out there?

    Thank you.

    EDIT:

    I can confirm that the problem persists with version 1.8.0
     
    Last edited: Aug 3, 2018
  30. Appminis

    Appminis

    Joined:
    Apr 12, 2014
    Posts:
    119
    Is there any documentation or examples of the new Room Designer?
     
  31. Appminis

    Appminis

    Joined:
    Apr 12, 2014
    Posts:
    119
    Also, any examples for generating a complete house? Bedroom, bathroom, living room, etc.
     
  32. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @xCrochaNx I've fixed the issue and will be available in the next update

    StartModule = Green
    EndModule = Blue
    BranchEndModule = Red

    Before


    After
     
    hopeful likes this.
  33. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @Appminis The room designer is an early WIP for interior decoration. I'll have more updates in the near future
     
  34. lordzardeck

    lordzardeck

    Joined:
    Jun 6, 2017
    Posts:
    8
    @AliAkbar I'm trying to create a VERY basic usage of DA. I assigned a wall, ground, and door to the theme and all looked well out of the box. Then I added fences, and I noticed that that the fence separators are offset out of the ground. Can you explain to me how to adjust them so that they exist on the ground elements, and not hang off?

    2018-08-14_21-25-52.png
     
  35. chaenator

    chaenator

    Joined:
    Jun 29, 2017
    Posts:
    2
    Is anyone else having a spawning problem with dungeon survival shooter example with Unity 2018.2.2f1?

    The character spawns below the dungeon grid and falls through the floor. This didn't happen in Unity 2017.v+ in all the survival shooter example...
     
  36. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    @lordzardeck Please make sure the ground tiles are first aligned. (You can do this by enabling Debug draw from the inspector). The other walls and fences will align correctly.
     
  37. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    2018.2 changed something that made the physics spawn incorrectly when done in a certain way. I've released a new update to fix this. Please update to the latest version (1.8.0) and reimport DA again
     
  38. lordzardeck

    lordzardeck

    Joined:
    Jun 6, 2017
    Posts:
    8
    I'm pretty sure they are all aligned. The dungeon ground seemed perfectly aligned with the walls and stairs.
     
  39. lordzardeck

    lordzardeck

    Joined:
    Jun 6, 2017
    Posts:
    8
    @AliAkbar it appears this might be an issue since the beginning. Looking at one of your videos: 2018-08-16_14-25-41.png
     
  40. lordzardeck

    lordzardeck

    Joined:
    Jun 6, 2017
    Posts:
    8
    @AliAkbar here as well (which demonstrates exactly my issue): 2018-08-16_14-28-32.png
     
  41. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    241
    I think I reported similar behavior in march through email, and have been ignored.
    Are you seeing problems with vertical offset or horizontal offset?
     
  42. lordzardeck

    lordzardeck

    Joined:
    Jun 6, 2017
    Posts:
    8
    @rasto61 This is without offsets. If I try to manipulate the offsets, things just get worse
     
  43. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    241
    I meant, are the problems, that the items are offset vertically or horizontally?
    I had problems when setting up a theme that some prefabs would be offset horizontally only in some places, even though I had not set any horizontal offset.
    This is what was in the demo manufaktura k4 moba scene:
    Screenshot (23).png

    So it seems that there is a bug in the placement agorithm somewhere.
     
  44. lordzardeck

    lordzardeck

    Joined:
    Jun 6, 2017
    Posts:
    8
    That's not exactly what my issue is. I appears that the algorithm is designed to place supports at cell intersections, and of course the fences between those 2 points. This causes them to hang out the edge when there aren't adjacent cells. The problem is that in order for the algorithm to keep the fences within the cell, you'd have the issue with sometimes the fences having to stretch in some places, or having 2 fence supports
     
  45. lordzardeck

    lordzardeck

    Joined:
    Jun 6, 2017
    Posts:
    8
    @AliAkbar Is there anyway I can hook into the layout of DA and base runtime logic off it? For example, in my game, the user moves around by click adjacent cells (like in chess). I want to prevent them moving through walls, even if there is an adjacent space on the other side of the wall that would be valid to move to if they were in that room (essentially forcing the player to move to the ground cell at the door, and then move through the door. To do this, i'd like to check if the user's path would move through a DA wall. Is there anyway to query the layout to know what obstacles there are?
     
  46. Sehlor

    Sehlor

    Joined:
    Feb 10, 2012
    Posts:
    180
    @AliAkbar There is a bug in random generation with Multistory Dungeon theme, if i use the same seed ( 100 ) and click generate after it generated it generates another dungeon ( not the same even if the seed is same ).
     
    AliAkbar likes this.
  47. reinaldf

    reinaldf

    Joined:
    Nov 24, 2017
    Posts:
    2
    @AliAkbar or anyone with more experience in using DA,
    Hi! I'm just a beginner here. Is there a link or solution in making random spawn of player inside the dungeon (not just the farthest)? I want player character to spawn randomly on any room of the dungeon, even on the middle.
    I have a player character with Navmesh agent attached on it. Dungeon is created by RegenerateDungeonLayout script. and the Navigation is created by the DungeonGrid prefab. When I test run to have different "Seeds" of dungeons, I get lucky sometimes to make my player character spawn inside the dungeon and walk inside the specified navigation path with no problem. But when I spawn outside the space of dungeon, everything is messed up and I just float and walk freely around until I reload a new scene with new seed, new dungeon layout.
    It seems my Player Character doesn't really spawn randomly and stays on same position and just adjust when inside dungeon. Is there a solution to this problem? Please enlighten me. PlayerSpawnGood.PNG PlayerSpawnNotGood.PNG
    When I click the Navigation Tab, It seems that the previous Navmesh is not deleted. and I still keep on stepping on it.
    Does it have to do with scripts? But I haven't modified any of the scripts yet.
    NavmeshFail.PNG
    Am I missing something? or did I skipped a step? Please help. Thank you in advance.
     
  48. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    537
    Ah I misunderstood you. I'll have a closer look
     
  49. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    12
    Hi @AliAkbar ! I've upgraded my game to the version you sent inbox, and getting some errors with the Volume Spawn Example Listener. I just installed the 1.8 available at the asset store, but got the same result. It seems that it is related to Boss and Spawn Room, and I don't need them to be different, to be honest... Could it be a boolean for when this feature is needed?
    upload_2018-8-31_17-43-52.png
     
  50. ivanmotta

    ivanmotta

    Joined:
    Jun 19, 2013
    Posts:
    12
    Just to clarify, I have some smaller levels with 12/15 Num Cells that build perfectly, but when I raise this number - on 1.7 was 22/23 Num Cells - almost 90% of the seeds I try give this error. Now, if I lower to 19, I don't always have an error, but if I keep getting random seeds and trying to buid, something around 10% still throws it. Any idea?