Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Dungeon Architect

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

  1. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Last_Imba Assuming you are using the grid builder, you can get this from the GridDungeonQuery script. This script is attached to the dungeon game object and you can grab a reference to it like you usually do in unity.

    grid_dungeon_query.png

    Here's a sample script
    Code (CSharp):
    1.  
    2. using namespace DungeonArchtiect;
    3.  
    4. public class MyClass : MonoBehaviour {
    5.     public GridDungeonQuery query;    // Assign this from the editor
    6.  
    7.     void MyFunction() {
    8.        if (query != null) {
    9.             Cell targetCell;
    10.             if (query.GetCellAtPosition(MyWorldPosition, out targetCell) {
    11.                   // found. do something with targetCell
    12.             }
    13.             else {
    14.                   // not found.
    15.             }
    16.        }
    17.     }
    18. }
     
  2. iamdanhenry

    iamdanhenry

    Joined:
    Jun 20, 2019
    Posts:
    2
    Hey everyone, purchased dungeon architect yesterday and experimenting with it.


    I'm trying to use the Grid Flow editor to build an incredibly simple dungeon. A room in my setup has 4 possible connections. As you can see in my screenshots I have an incredibly simple setup, but occasionally I get a result that has 5 connections to a room. What is the appropriate way to prevent this, or how should I change my workflow to make this not possible?

    Edit for more information:
    My goal is to have a dungeon where I can randomly iterate the "ExpandRooms" rule to tune dungeon size between the mini boss and main boss.

    Thanks in advance for your time and effort!


    Start Rule:
    da1.PNG


    Complete Graph:
    da2.PNG
     
  3. Last_Imba

    Last_Imba

    Joined:
    Feb 25, 2017
    Posts:
    30
    Hi @AliAkbar

    I am trying to use snap flow builder from this tutorial:
    https://docs.dungeonarchitect.com/unity/tutorials/builder_snap_flow.html
    I created a super simple flow


    And one simple Room and Corridor. So, when i use your room and corridor prefabs, everything is nice. Even when I use my Room and your Corridor, everything is nice too.

    But if I use my Corridor, nothing happens. I see no error. Just nothing happens when I hit build
    Here is my corridor:

    Can you help me? May be it is something special what I should do with corridors?
     
  4. iamdanhenry

    iamdanhenry

    Joined:
    Jun 20, 2019
    Posts:
    2
    It's possible that things aren't lining up perfectly with your corridor. Try bumping up the collision test contraction. I've had to bring this up to 20 or more before. Note: This will make a completely unusable dungeon, but at least you will know that there is an issue with your corridor.

    collision.PNG
     
    AliAkbar likes this.
  5. Last_Imba

    Last_Imba

    Joined:
    Feb 25, 2017
    Posts:
    30
    Will this work with GridFlowDungeonBuilder? If not, what should I use instead?
     
  6. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    I think because I updated my unity version I am now unable to update my Dungeon Architect version. I'm on 1.9.0 and latest version in the store is 1.10.1 but my unity version says I'm up to date. because the tutorials are all for 1.10.1 I can't use the cooler editors and some of what the tutorials tell me doesn't exist.
     
  7. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    382
    Try to remove dungeon architect and then reinstall it via asset store or through package manager. But before that back up your project.
     
  8. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    120
    That's a sensible thing to try but, having not made any great progress on the project, I've already started over in a new project. So that should have already helped.
     
    TextusGames likes this.
  9. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    183
    Oh wow just learned about this asset today.. It looks like a must have..
    One pre buy question, can i use it for FPV rather than Top down? can i get it to generate roofs ? ;)
     
    AliAkbar likes this.
  10. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    I put roofs by making another floor node, input the ceiling prefab, and offset up the Y-axis by like 5 or 10 or whatever.
     
    AliAkbar, Vaupell and TextusGames like this.
  11. farazk86

    farazk86

    Joined:
    May 31, 2017
    Posts:
    78
    Hi @AliAkbar ,

    I just installed the plugin in hopes of using it for a top down 2D dungeon. Is the documentation updated for this? I see that in the launchpad there are no 2D examples yet, only 3D.

    Would I be able to create 2D dungeons like one in your quoted message. If so, can you please direct me to the documentation for this.. as I dont want the jackrabbit2d type layout but like the one showed in your message that I quoted.

    Thanks
     
  12. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @iamdanhenry This has be incorporated in the grammar level. You could design you rules so they don't generate 4 outgoing links, or you could have a rule that detects a node with 4 outgoing links and turns it into 3 outgoing links (and attach the 4th one to one of the 3 child nodes). Run this rule a few times (using iterate method) and it should convert everything to only 3 outgoing max. Let me know if you need an example
     
  13. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Was this issue resolved? If not, could you elaborate how you corridor is not working? It seems to work in the first screen shot. Are you using another graph that is causing the issue? If so, a screen of the graph would help
     
  14. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Sure, just add your roof prefab to the ground node (with a bit of an offset to move the object up). There are samples in the launchpad with indoor dungeons

    sample_candy_05.jpg
     
  15. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @farazk86 I'll give you a sample soon
     
  16. Zoryth

    Zoryth

    Joined:
    Dec 5, 2016
    Posts:
    61
    Hello.

    How can I add a cieling for every floor, except if it's above stairs?

    I add the cieling quad as "decoration" to the floors, but it's added to every floor, including the ones that have stairs, which makes the stairs untravesable. I will add a special cieling to the stairs (a diagonal cieling obviously).

    Thank you for your time.

    EDIT.- nvm, I figured a way. :)
     
    Last edited: Mar 9, 2020
  17. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    382
    Theme markers have rule based constrains. You need to add ceiling to tiles that contains floor marker but NOT contains stair marker. You can do it in theme in marker settings. Add new marker after floor ground marker. Then in transform constrains set that central tile does not contains marker called "Stair".
     
  18. chaenator

    chaenator

    Joined:
    Jun 29, 2017
    Posts:
    8
    so sorry for a silly question but i recently switch my dev computer from mac to windows and for the life of me, can't figure out how to remove a market in dungeon theme window.... which button to delete a marker?
     
  19. Zoryth

    Zoryth

    Joined:
    Dec 5, 2016
    Posts:
    61
    delete works for me, select then delete
     
  20. Rabbito

    Rabbito

    Joined:
    Apr 5, 2015
    Posts:
    13
    I am a little bit confused about the Navigation Agents. In the user guide, you write that we have to use the "NavigationGrid" prefab and the DungeonNavAgent3D and that the demo game uses this too. I checked but the Demo game doesn't seem to use it. It uses the Unity Navigation and the Unity Nav Mesh Agent. So which is the correct approach?
     
  21. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @chaenator in mac it's option + backspace (I haven't coded it this way, this is how mac picks it up) Please let me know if it works for you
     
  22. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Rabbito Please use the unity nav agent like in the samples. I'll kept the custom navigation system around for 2D (since unity doesn't support 2D navigation along XY)
     
  23. gbkim

    gbkim

    Joined:
    Dec 12, 2019
    Posts:
    1
    Hello.
    I'm now making a rogue-like game with the Gird Flow Dungeon Builder, like Enter the Gungeon style.

    When a player enters each room, I want to create an object that creates enemies in that room. I need to know the size and type of each room to create enemies in the room. Is there an easy way to approach it? Thank you for your time.

    I've tried some methods
    1. Check that the generated object has information about the room
    2. Using the Selection Rule in the GameObject node
    3. Check the code that generate Tilemap (I didn't fully understand. But if there's no way, I'm going to get the value for the room size and type from this code.)
     
    Last edited: Mar 25, 2020
  24. Zoryth

    Zoryth

    Joined:
    Dec 5, 2016
    Posts:
    61
    Hi, I'm sorry I didnt quite get it xd, can you show me some screenshots and/or code I need to use? Thank you.
     
  25. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Zoryth there's a sample in the launch pad that shows you how:

    01.jpg 02.jpg
     
  26. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @gbkim I'm making a query system along with a game sample that demos most of these features. I'll have this in the next update soon
     
    gbkim likes this.
  27. TreseBrothers

    TreseBrothers

    Joined:
    Jan 14, 2016
    Posts:
    13
    I'd love to see the Grid Flow dungeon outputting the same basic markers as Grid -- fences, wall separators, fence separators. It would be powerful to be able to use the same theme as a starting point, also making scripting marker gen simpler.

    Also, has anyone been able to get GridFlow add elevation to create rooms on different levels with stairs in between?
     
    TextusGames likes this.
  28. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    93
    can the selectorRule.CanSelect( get more data passed in such as nodeData.Affinity or just the nodeData? so we can do more things with it, my issue right now with selector is there is no way to data tune selector, and it's annoying when I can't use the probability tuning in the node when selector is on.
     
  29. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    382
    Stairs alongside room elevations are currently not supported in grid flow. As for markers I hope He will bring future and naming parity with original grid builder markers.
     
  30. TreseBrothers

    TreseBrothers

    Joined:
    Jan 14, 2016
    Posts:
    13
    @TextureGames that is unfortunate but we can hope for expanded support in the future! GridFlow is so powerful but pushes you down a route to create your own marker scripting in much bigger ways. Thx
     
  31. Zoryth

    Zoryth

    Joined:
    Dec 5, 2016
    Posts:
    61
    I get
    "Assets\DungeonArchitect\Scripts\Core\UI\Widgets\Panels\GraphPanel.cs(9,77): error CS0246: The type or namespace name 'GraphEditor' could not be found (are you missing a using directive or an assembly reference?)"
    in the latest version.


    upload_2020-4-13_10-48-37.png

    any ideas why?
     
  32. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Zoryth If you've upgraded to a different engine version, please remove dungeon architect and download it again from the asset store page. I've uploaded different versions of the asset for each engine version for better compatibility
     
  33. GreenImp88

    GreenImp88

    Joined:
    Apr 10, 2020
    Posts:
    1
    Did you find a solution for this? I've just created a new Unity project, using Unity v2019.3.10f1 and when I go to the package manager, it says Dungeon Architect is version 1.10.0.
    package-manager.png
    How can I get the latest version 1.10.1?

    Also, if I try and import it, I get a warning message saying that an API Update is required because the asset uses obsolete APIs:
    API-update-required.png

    I'm going to try clicking "Go Ahead" and see if anything breaks, but it would be good to know how to get the latest version and see if that warning goes away.
     
  34. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    540
    Hello,

    is it posible to create one floor houses with several different rooms, not necessarily with corridors? Just to make some top down buildings?

    thanks a lot!
     
  35. Zoryth

    Zoryth

    Joined:
    Dec 5, 2016
    Posts:
    61
    I deleted DA folder and reimported it. All good now. Thank you.
     
  36. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    98
    I see a post from @Yunori that talks about the bug on the InfinityCave Builder. I was experiencing the same bug. Do you an idea when a new update to fix that will be released? Or can publish the fix here?
     
  37. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @GreenImp88 I've uploaded about 7 different versions of DA to the asset store, one for each engine version so these import errors can be avoided. This requires you to download the asset form the Unity Editor's Asset Store window (and not package manager). The editor will then download the correct version from there based on the version you are in

    Also please make sure you've deleted your existing DungeonArchitect* folders

    I've tested this with a blank 2019.3 project and it works fine (its safe to hit upgrade when asked). If you face any issues, please let me know.

    We have a 1k strong discord channel with a large community of DA users. Please consider joining there as well. I'm available there most of the time so we can chat: https://discord.gg/N3rHt4h
     
  38. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Danirey did you get a chance to look at the floorplan sample? You can access it from the menu Dungeon Architect > Launch Pad > Samples > Floor Planner

    fp.jpg
     
    Danirey likes this.
  39. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    @Zoryth good to know it's resolved. Let me know if you face any issues
     
  40. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    188
    I have came across two errors. 1) is from importing the sample content. 2) the other one is generating a dungeon from the 3DForge Sewer sample scene.

    https://pastebin.com/80dP7Nqp

    I'm using Unity 2019.3.9f1
     
    Last edited: Apr 28, 2020
  41. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    I fixed an error where grid flow dungeon builds were failing when the grid flow graph doesn't contain tilemap nodes yet.
     
  42. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    188
    I'm new to dungeon architect. Can you give me a little more information please?
     
  43. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
  44. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    I've added options to disable cave / corridor generation in the grid flow
    gridflow_disable_caves.gif


    The tilemap node size is a (width, height) instead of a number. so you can create rectangular stretched rooms like this:
    tilenode_size_1.png

    tilenode_size_2.png

    These could be great for fitting them inside a spaceship
     
    meanme and TextusGames like this.
  45. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Progress on support for edge walls (grid flow builder)

    gridflow_wall_edge.gif gridflow_wall_edge2.png
     
    Forrest195 likes this.
  46. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Added edge wall/fence support along with their seperators to the grid flow builder. You can now use the grid themes with the grid flow builder

    wall_sep_m.jpg
     
  47. Danirey

    Danirey

    Joined:
    Apr 3, 2013
    Posts:
    540
    Ups, Thank you. I did not see that. :)
     
  48. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    I've added new samples to the launch pad:
    gridflow_samples.jpg

    isaac_samples.jpg


    There are new Grid Flow templates for your to clone from:
    gridflow_templates.jpg
     
    gearedgeek and Danirey like this.
  49. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    382
    Thank you.
     
  50. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    715
    Submitted a new version to the asset store. It should take a few days to show up

    Version 1.11.0
    • New: Grid Flow builder supports Edge Walls. This allows you to place your walls on the edge of the tile, instead of the wall taking up the entire tile. This mode will emit a WallSeparator marker as well and will allow you to reuse the grid builder's theme with the gridflow builder
    • New: Grid Flow builder supports Fence and Fence Separator markers. They are emitted around the caves
    • New: Disable Caves and Corridor generation in the grid flow builder
    • New: Grid Flow's tilemap room size is changed from a number to a size value (width, height). This allows rectangular room creation instead of square rooms
    • Fix: Fixed a gridflow minimap error which was causing the gridflow dungeon generation to fail from the editor when the tilemap exec nodes were not created yet
    • New: Launchpad Sample - Grid Flow Edge Walls: Demos the new 'Walls as Edge' feature
    • New: Launchpad Sample - Grid Flow Game Edge Wall: Game demo using a theme that has walls as edge
    • New: Launchpad Sample - Grid Flow Simple Candy: A simple gridflow scene using the candy theme
    • New: Launchpad Sample - Grid Flow Game Edge Wall: Game demo using the simple candy theme
    • New: Launchpad Sample - Isaac Room Emitter: Demos a marker emitter used with the Isaac builder. It emits RoomCenter and RoomCorner markers
    • New: Launchpad GridFlow Template - No Caves: A template that has caves and corridors disabled
    • New: Launchpad GridFlow Template - Walls as Edge: Walls are placed on the edge of tiles, instead of taking up a full tile space
    • New: Launchpad GridFlow Template - Edge Simple: A simpler version of the grid flow graph, with all the overlays and backgrounds removed
    • New: Launchpad GridFlow Template - Isaac: Generates a level like in the game Binding of Isaac
     
    farazk86, meanme, hopeful and 3 others like this.
unityunity