Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[RELEASED] Dungeon Architect

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

  1. alexhales123

    alexhales123

    Joined:
    Oct 1, 2019
    Posts:
    1
    Dungeon Architect Cards because I became in the consideration segment for the Dyson’s Deck of Delves task. The cards arrived inside the mail in the starting of July and sat in the console of the truck for some months earlier than I eventually introduced them inside and commenced messing round with them.

    Each card is sided and each aspect has a discrete dungeon phase (a room or hall) related by using doors to different sections, and a listing of 12 “trappings” for the phase. Like some other random dungeon generator, it requires a bit of twisting, bending and personal adjudication (and just getting rid of a number of the exits from most of the sections) to transition from a set of playing cards to a very last dungeon. It does provide a reasonably quick machine to prepare a dungeon at the fly whilst lacking for suggestion, and the reality that you could customize your deck ahead of time (flipping cards within the deck so particular room shapes are up, doing away with others absolutely, etc) way you've got some manipulate over the very last design.

    The stop result is a very stable, grid-primarily based dungeon full of little loops and interconnections and simplest a unmarried actual chokepoint in which you may reduce the dungeon in 1/2 via securing a single door.

    On the alternative hand, it is a bit huge for a random dungeon. Generally K & T BARNES BUILDERS once I want a huge dungeon, I’ll pull out considered one of my series of huge dungeons (I have a folder full of them… which have to come as no marvel to anyone). So my next strive with the Dungeon Architect Cards can be a smaller structure to peer the way it seems with less room for a lot of these interconnections to show up.

    This map is made available to you beneath a unfastened license for private or commercial use thanks to the splendid supporters of my Patreon Campaign. Over three hundred high-quality consumers have come together to fund the website and those maps, making them free on your use.
     
  2. Raika01

    Raika01

    Joined:
    Dec 19, 2015
    Posts:
    3
    Is the cave generator fully working? If not, is it somehow possible to use Dungeon Architect with Sebastian Procedural Cave Generation?
     
  3. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    50
    @AliAkbar or anyone else, is there a way to copy and paste the spatial constraint rules in the Dungeon Theme editor?
    Having to add them all by hand is sooo many more clicks its going to take a huge amount of extra time for me.

    edit: When I say copy/paste I mean keep the spacial constraint settings when I copy an GameObject node.
     
    Last edited: Oct 17, 2019
  4. claudiorodriguescampos

    claudiorodriguescampos

    Joined:
    Jun 23, 2017
    Posts:
    97
    I know that DA can make platform areas in 2d Mario style, but is it possible to create something in 2d Metroidvania style using DA?
     
    Last edited: Oct 11, 2019
  5. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    50
    @AliAkbar
    Hello! I am getting an error when trying to copy a node in the spacial constraints editor. It is when you add a removal rule to the node.
    Easy to replicate. Just try to copy/paste a node with a removal rule.

    ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds

    Cheers.
     
  6. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    506
    Hey, I am trying to add some exits to my room and i used the FloorPlanRoomMarkers.cs as a base. currently it looks like this:

    upload_2019-10-23_10-48-50.png
    as you can see, the exits are a) a bit off and b) also in the middle of the rom. here is the code, maybe you can spot what i did wrong


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using DungeonArchitect;
    5. using DungeonArchitect.Builders.FloorPlan;
    6.  
    7. public class FloorPlanRoomMarkers : DungeonMarkerEmitter {
    8.  
    9.     public override void EmitMarkers(DungeonBuilder builder)
    10.     {
    11.         var floorModel = builder.Model as FloorPlanModel;
    12.         if (floorModel == null)
    13.         {
    14.             return;
    15.         }
    16.  
    17.         var roomChunks = new List<FloorChunk>();
    18.         foreach (var chunk in floorModel.Chunks)
    19.         {
    20.             if (chunk.ChunkType == FloorChunkType.Room)
    21.             {
    22.                 roomChunks.Add(chunk);
    23.             }
    24.  
    25.         }
    26.  
    27.         var hallChunks = new List<FloorChunk>();
    28.         foreach (var chunk in floorModel.Chunks)
    29.         {
    30.             if (chunk.ChunkType == FloorChunkType.Hall)
    31.             {
    32.                 hallChunks.Add(chunk);
    33.             }
    34.  
    35.         }
    36.  
    37.         var gridSize = floorModel.Config.GridSize;
    38.         foreach (var roomChunk in roomChunks)
    39.         {
    40.             DecorateRoom(builder, roomChunk, gridSize);
    41.         }
    42.         foreach (var hallChunk in hallChunks)
    43.         {
    44.             DecorateHall(builder, hallChunk, gridSize);
    45.         }
    46.     }
    47.  
    48.     void DecorateRoom(DungeonBuilder builder, FloorChunk roomChunk, Vector3 gridSize)
    49.     {
    50.         var bounds = roomChunk.Bounds;
    51.         var x0 = bounds.Location.x;
    52.         var x1 = bounds.Location.x + bounds.Size.x;
    53.         var y = bounds.Location.y;
    54.         var z0 = bounds.Location.z;
    55.         var z1 = bounds.Location.z + bounds.Size.z;
    56.  
    57.         EmitChunkMarker(builder, "RoomCorner", new Vector3(x0, y, z0), 0, gridSize, roomChunk.Id);
    58.         EmitChunkMarker(builder, "RoomCorner", new Vector3(x1, y, z0), -90, gridSize, roomChunk.Id);
    59.         EmitChunkMarker(builder, "RoomCorner", new Vector3(x1, y, z1), 180, gridSize, roomChunk.Id);
    60.         EmitChunkMarker(builder, "RoomCorner", new Vector3(x0, y, z1), 90, gridSize, roomChunk.Id);
    61.  
    62.         EmitChunkMarker(builder, "RoomCenter", new Vector3(x0 + x1, y + y, z0 + z1) / 2.0f, 270, gridSize, roomChunk.Id);
    63.     }
    64.  
    65.     void DecorateHall(DungeonBuilder builder, FloorChunk roomChunk, Vector3 gridSize)
    66.     {
    67.         var bounds = roomChunk.Bounds;
    68.         var x0 = bounds.Location.x;
    69.         var x1 = bounds.Location.x + bounds.Size.x;
    70.         var y = bounds.Location.y;
    71.         var z0 = bounds.Location.z;
    72.         var z1 = bounds.Location.z + bounds.Size.z;
    73.  
    74.         EmitChunkMarker(builder, "Elevator", new Vector3(x0, y, z0), 0, gridSize, roomChunk.Id);
    75.         //EmitChunkMarker(builder, "Elevator", new Vector3(x1, y, z0), -90, gridSize, roomChunk.Id);
    76.         //EmitChunkMarker(builder, "Elevator", new Vector3(x1, y, z1), 180, gridSize, roomChunk.Id);
    77.         //EmitChunkMarker(builder, "Elevator", new Vector3(x0, y, z1), 90, gridSize, roomChunk.Id);
    78.  
    79.         //EmitChunkMarker(builder, "Elevator", new Vector3(x0 + x1, y + y, z0 + z1) / 1.0f, 270, gridSize, roomChunk.Id);
    80.     }
    81.  
    82.     void EmitChunkMarker(DungeonBuilder builder, string markerName, Vector3 gridPositionF, float angle, Vector3 gridSize, int cellId)
    83.     {
    84.         var worldPosition = Vector3.Scale(gridPositionF, gridSize);
    85.         var matrix = Matrix4x4.TRS(worldPosition, Quaternion.Euler(0, angle, 0), Vector3.one);
    86.         var gridPosition = new IntVector(gridPositionF);
    87.         builder.EmitMarker(markerName, matrix, gridPosition, cellId);
    88.     }
    89. }
    90.  
     
  7. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    506
    is there any better place/contact to get an answer for this?
     
  8. antsonthetree

    antsonthetree

    Joined:
    May 15, 2015
    Posts:
    61
  9. DropNodes

    DropNodes

    Joined:
    Jun 11, 2019
    Posts:
    28
    hey @AliAkbar any updates on the new release? last time you posted that an update is coming was 2 months ago
     
  10. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    282
    He also has a discord
     
  11. DropNodes

    DropNodes

    Joined:
    Jun 11, 2019
    Posts:
    28
    Can you post an invite link please?
     
  12. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    282
    Rahd likes this.
  13. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    Hello friends, I've been working hard on a major new update that takes DA to a whole new level. I'll need a week or so to polish it up. I'll post more details and a video soon

    Check this out:
    2019-11-12 10_12_59-Window.png

    This was inspired by Joris Dormans' talk on cyclic dungeons:
     
    Sehee26 and hopeful like this.
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,607
    Yeah I mentioned it earlier, glad you look it up! You'll soon be the most sophisticated pcg level editor out there :cool:

    Also thanks for the video I wasn't' aware he made a talk.
     
    AliAkbar likes this.
  15. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    Lava, water etc as background overlays

    lava.png lava2.png
    lava.png
    lava2.png
     
  16. unity_Lb2lDqR5J9MXZw

    unity_Lb2lDqR5J9MXZw

    Joined:
    Dec 5, 2017
    Posts:
    4
    @AliAkbar
    Hi I have an issue using PlatformVolumes.
    I'm using the GridDungeon and 2 PlatformVolumes, highlighted below in BLUE, but this particular seed ran and the Dungeon is no connected, I'm hoping that this isn't a bu I need to track down, I thought that the PlatformVolumes would guarantee a connection, can anybody help with this, what to look at? is there a proximity thing that's failing? I have not delved int othe code yet to try to find out what's going on, kind of hoped that DA would be pretty stable and I don't mind it being a black box if it works.. but this means my Entrance Volume (bottom Left) is now a broken dungeon :(

    Cheers

    upload_2019-11-13_16-11-55.png
     
  17. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    @unity_Lb2lDqR5J9MXZw could you confirm if that platform volume is set to a room and not corridor? Only rooms will connect to the main dungeon and not corridors by design
     
  18. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    Added an elevation map
    da_elevation.png
     
    Sehee26 likes this.
  19. unity_Lb2lDqR5J9MXZw

    unity_Lb2lDqR5J9MXZw

    Joined:
    Dec 5, 2017
    Posts:
    4
    @AliAkbar Yes both volume are set to Room.

    I am using Fast Cell Distribution, becuase I need to conatin my dungeon within 40x40 Units (Unity). I tried using a Negation Volume, but the problem is that the actual dungeon can generate a loop outside the volume and therefor hav cut off areas, I need a fully "secure" dungeon within 40x40 units with a Entrance Volume and Exit volume, here are the settings I'm using on the GridDungeonConfig - this is the seed: 549846781

    The small pink box in the bottom left of my initial image is a MarkerReplace volume where I swap the ground (using Spatial contstraints) to an entrance door

    Would you have any advice on where to debug, I need to get this sorted as it's integral to the game, so willing to delve into the code and provide info where need be.

    Cheers

    upload_2019-11-14_10-16-39.png
     
    Last edited: Nov 14, 2019 at 4:13 PM
  20. unity_Lb2lDqR5J9MXZw

    unity_Lb2lDqR5J9MXZw

    Joined:
    Dec 5, 2017
    Posts:
    4
    Last edited: Nov 14, 2019 at 10:19 PM
  21. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
  22. farazk86

    farazk86

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

    I bought your awesome asset quite some time ago (last year i guess) and wanted to make a great game with it but life got in the way and I had to put my plans on break.

    I'm back now and want to start on that game I planned last year but I read the review mentioning that a lot of your used functions are deprecated now. Do you have any plan on updating this and fix the deprecated functions?

    Also if I am to start a new game now, which Unity version would be best to use. Can I use the latest version 2019.2 ?

    Thanks
     
  23. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    Hey @farazk86 Thank you for using DA. I'll be releasing a major update soon (5-10 days). I also suggest you have a look at the new Grid Flow builder I posted above as it opens up lots of possibilities
     
    farazk86 and Mohamed-Anis like this.
  24. Nevercallmebyname

    Nevercallmebyname

    Joined:
    Nov 18, 2013
    Posts:
    97
    is this a purely 2D update or will we get to see it's effect on 3D dungeons eventually?
     
  25. farazk86

    farazk86

    Joined:
    May 31, 2017
    Posts:
    59
    Thank you. Thats great to know :)

    I'm following the documentation here: http://coderespawn.github.io/dungeon-architect-user-guide-unity/stage/html/user_guide_1.4.0.html

    is this still up to date? Will you be adding the new grid flow cyclic generators to the documentation?

    Thanks :)
     
  26. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    @farazk86 Sure, I'll be making detailed docs and video tutorials for this
     
    farazk86 likes this.
  27. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    @Nevercallmebyname It works on both 3D and 2D
     
  28. AliAkbar

    AliAkbar

    Joined:
    Jun 30, 2014
    Posts:
    604
    Added lots of usability improvements in the editor. You can see the execution state of each node and errors if any

    2019-11-19 18_54_07-Window.png

    I've added support for overlays, They can be useful for overlaying stuff on top of your dungeon layouts (like trees, rocks etc)
    The following dungeon layout has trees (green dots) and rocks (red dots). These overlays do not block the main path and the level is always playable (i.e. key/locks/enemies and other items are placed in accessible locations that are not blocked by these overlays)

    You generate these overlays using noise or specify your own script and generate them as you like

    2019-11-19 18_55_08-Window.png
     
    farazk86, StevenPicard and Sehee26 like this.