Procedural Dungeon Generator in Unity [TUTORIAL]

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 พ.ย. 2024

ความคิดเห็น • 149

  • @searingeyes
    @searingeyes 4 หลายเดือนก่อน +1

    I know this is a relatively old tutorial so I wanted to drop a comment to let you know your work is still being immensely appreciated! I have been ripping my hair out for the last week trying to figure out how to generate my dungeon! the way you explain things makes it so easy to see how it applies to my own project! so amazing job!

  • @nielshenriksen1043
    @nielshenriksen1043 2 ปีที่แล้ว +19

    You can make a giant maze by only making rooms as you come to them. The same way as minecraft is creating terrain. I would prefer in code to refer to North, South, East, West instead of Up, Down, Left, Right. Your ideas is something I will look at :) thank you

  • @braydenroberts8821
    @braydenroberts8821 2 ปีที่แล้ว +9

    man this really inspired me to generate dungeons like in Runescape. It's going pretty well. thanks for the guide.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +1

      Good luck on your project!

    • @shakob4875
      @shakob4875 2 ปีที่แล้ว

      Hey, did you manage to add keys and locks like in Runescape? If so, how'd you tackle the key and lock generation? I'm working on something inspired by the same system

  • @SethBlack999
    @SethBlack999 2 ปีที่แล้ว +7

    This is a really nice tutorial.
    I'm starting my journey into Unity and the dungeon generation is a thing I really wanted to do. Thanks for sharing this !

  • @906robot9
    @906robot9 4 หลายเดือนก่อน

    Effective, concise and clear. 10/10 tutorial

  • @abhirutmeherishi5738
    @abhirutmeherishi5738 2 ปีที่แล้ว +4

    coding beginner here👋 I am getting this , you are good at explaining stuff, thank you. Please cosider covering how to spawn monsters in the dungeon and the combat as well.

  • @juleswombat5309
    @juleswombat5309 หลายเดือนก่อน

    Well that was pretty awesome. Thanks so much for a clear description.

  • @reck_er5003
    @reck_er5003 ปีที่แล้ว +2

    Going to be using this an academic project. Thank you so much for sharing this, you are a real life saver.

  • @cyberpunkdenton9497
    @cyberpunkdenton9497 2 ปีที่แล้ว

    impressive. I was looking at GTFO rundowns and how the team at 10 chambers does it. Can't find anything but this will help in understanding the algorithm. Thanks.

  • @64jcl
    @64jcl 3 ปีที่แล้ว +10

    Great tuturial. Btw you could likely have simplified this with a twodimensional array instead of a long list. var board[ , ] = new Cell[width,height]; and access each cell using board[x,y]

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +2

      I prefer working with one dimension arrays, but multidimension arrays can be just as valid. If it's working for you, it sounds great! :D

  • @twirlyvibes
    @twirlyvibes 10 หลายเดือนก่อน

    Loved the tutorial, this channel deserves more subs.❤

  • @thebestcelep6358
    @thebestcelep6358 2 ปีที่แล้ว

    I failed to do this (my algorithm sucks ) but I will try again in a month, I must get good :). Thanks for the excellent tutorial

  • @ricardoesparza7969
    @ricardoesparza7969 2 ปีที่แล้ว +1

    Busque por muchos lados este tutoria....es el mejor...

  • @leaskstudios5446
    @leaskstudios5446 3 ปีที่แล้ว +1

    This is great! Waiting for part 2!

    • @ricardoesparza7969
      @ricardoesparza7969 2 ปีที่แล้ว

      To do it in 2d you just replace the 3d objects of the walls and doors... with sprites, from there the code is the same

  • @Toshyo
    @Toshyo 3 ปีที่แล้ว +10

    thanks i'm using this to create a game about The Backrooms

    • @ahoksure
      @ahoksure 2 ปีที่แล้ว +1

      Hey hey that’s what I was thinking of doing!

    • @Toshyo
      @Toshyo 2 ปีที่แล้ว +1

      @@ahoksure pretty sure many people searching for this were

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +2

      Sounds great! I hadn't heard of it, I'll take a look into it though!

    • @Toshyo
      @Toshyo 2 ปีที่แล้ว +2

      @@SilverlyBee It's interesting :)

    • @BaconJeezbrgr
      @BaconJeezbrgr 2 ปีที่แล้ว

      omfg thats what i also wanted to do

  • @rupnil_mondal
    @rupnil_mondal 3 ปีที่แล้ว +1

    Your tutorials are really great

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว

      Thanks! Glad you liked it :D

    • @rupnil_mondal
      @rupnil_mondal 3 ปีที่แล้ว +1

      @@SilverlyBee keep it up👍🏻👍🏻

  • @tryan0
    @tryan0 2 ปีที่แล้ว +3

    She’s programmed so much that she’s learned to program her entire voice box.
    In C#
    In unity
    In VS2019.

  • @lowbrown4206
    @lowbrown4206 3 ปีที่แล้ว +2

    Thank you! Looking forward to more :)

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว

      Glad you liked it! :D

    • @lowbrown4206
      @lowbrown4206 3 ปีที่แล้ว

      Also, how can you generate different looking rooms? (instead of just the same one) Thanks again!

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว

      @@lowbrown4206 Hey, that's exactly what I'll be covering on the next one! Basically I use a GameObject array and randomly select one.

  • @elitewatermelon6453
    @elitewatermelon6453 2 ปีที่แล้ว +3

    I am not expecting to get a reply as this video is 8 months old but I am getting the error:
    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Thank you in advance

    • @daridore4673
      @daridore4673 2 ปีที่แล้ว

      did you put a stop for the 'for' loop ? if not that there could be a mistype on the Index condition -note: I'm a complete beginner on C# but a similar problem happened to me too ,and that's how I fixed it

  • @crashman3281
    @crashman3281 3 ปีที่แล้ว +8

    This was really helpful! I'm very new to programming and all this stuff, so I wanted to ask, Is there a way to make that the rooms that are generated to be randomly chosen to generate between different prefabs of rooms? so that the rooms don't look all the same?
    If so, I also would like to ask, how can I make that the last room can contain a boss, but not on the other rooms, or for example, how can I have enemies in each room except the starting one?

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว +3

      Hey, there's a follow up video where I cover exactly that th-cam.com/video/gI6G49t--RY/w-d-xo.html

  • @martin.k240
    @martin.k240 2 ปีที่แล้ว +1

    Please help, for some reason only the doors all open in one line along the x and all the other door are closed

  • @Kejody53
    @Kejody53 8 หลายเดือนก่อน

    thanks, really nice tutorial!

  • @eli1525
    @eli1525 ปีที่แล้ว

    Super helpful thank you!

  • @Agnes1439
    @Agnes1439 2 ปีที่แล้ว

    this is great, thank you so much

  • @raidoukuzunoha9874
    @raidoukuzunoha9874 2 ปีที่แล้ว +2

    Thank you for this tutorial. Can I know how to make the last instantiated room an exitroom?

  • @thinkingonyx847
    @thinkingonyx847 24 วันที่ผ่านมา

    Thats so cool, How does this algorithm assert that the same maze hasn't been generated previously?

  • @fuscarebaixado5135
    @fuscarebaixado5135 ปีที่แล้ว

    Hey, the code is working well but, after implementing the last thing instead of a nice shape dungeon, mine is just a strait line with 2 rooms width, pls help me!

  • @victorbesa6121
    @victorbesa6121 2 ปีที่แล้ว +2

    How can i get the possition of the fathest or the last generated cell?, i want to create an exit. And also, how can i get a random position of a cell?, to spawn a key in a random cell that you need to open the exit.

    • @ralphrowbotham8137
      @ralphrowbotham8137 28 วันที่ผ่านมา

      yoiu should make a stack that stores the dead ends or because you make a list you can use a randomiser to select a random object in that list

  • @shakob4875
    @shakob4875 2 ปีที่แล้ว

    I'd like to apply Keys and Locks to this, but i'm having troubles figuring out the way the room order is specified. I need to make sure that all locks can be unlocked by obtaining their key before reaching the point where the lock is. So if the locked room is room no. 12 the key would have to be in any room before that. Have you got any application of this?

  • @youssefanastas1773
    @youssefanastas1773 3 ปีที่แล้ว +2

    Thank you very much

  • @Jaron-Wilson
    @Jaron-Wilson 10 หลายเดือนก่อน

    Thank You Very Helpful

  • @andreychumakov8952
    @andreychumakov8952 11 หลายเดือนก่อน

    That was really really helpfull!

  • @rkplanet4079
    @rkplanet4079 2 ปีที่แล้ว

    The drag and drop for the room prefab doesn't show up in my case using the code from github

  • @jackyancey4956
    @jackyancey4956 2 ปีที่แล้ว +1

    Is there a way to make it spawn in all different door directions? Like, have a starting room with 4 doors, they then branch off into a random direction for a certain amount of rooms.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      Sure, you just need to change the algorithm a bit, but it's entirely possible.

  • @bluefrogmaster
    @bluefrogmaster ปีที่แล้ว

    How do I make it 2D? I tried implementing the code as it is and the rooms generate across the x and z instead of x and y.

  • @glassstallion
    @glassstallion ปีที่แล้ว

    Great tutorial but is there away to create more than one room like make them bigger, smaller, l shape ect

  • @karun7275
    @karun7275 2 ปีที่แล้ว

    hi, how would i randomly spawn items that can be collected within this randomly generated dungeon?

  • @Fedex5
    @Fedex5 หลายเดือนก่อน

    I cant make it work... the door are all messed up

  • @Doorlock06
    @Doorlock06 2 ปีที่แล้ว

    Is it easy to make the generator generate vertically up or down using stairs

  • @jiajundeng9461
    @jiajundeng9461 2 ปีที่แล้ว

    Wonderful pure voice

  • @hardwyn2electricboogaloo904
    @hardwyn2electricboogaloo904 ปีที่แล้ว

    is there a way to do something like this built with all rooms being prebuilt?
    like instead of them all using the same room asset, with the doors toggled

    • @lukeallen5458
      @lukeallen5458 ปีที่แล้ว

      I thought a little about this, and unsure if it would work but theoretically you could have an array of room prefabs that are prebuilt and then when instantiate is called in the MapGeneration Function, have it randomly choose a number corresponding to the index of one of the random rooms in the array of prefabs you made.

  • @SWFGaming
    @SWFGaming 2 ปีที่แล้ว

    I have tried to find out how c# works, and im very familiar with the basics, but there are no videos explaining anything above that. Im really interested in finded out what that i means and what it does. Do you know any videos that explain this well?

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      Hey, I'd advise you to look into basics and more advanced programming concepts and maybe just search the concept+ c# and you'll probably find what you want to learn. Solving problems are also a great way to learn and there are many platforms out there for that.

    • @SWFGaming
      @SWFGaming 2 ปีที่แล้ว

      @@SilverlyBee ok, thanks for the advice!

  • @MocuchaToribash
    @MocuchaToribash 2 ปีที่แล้ว

    Hello i'm pretty new to unity, i already did a simple 2d plateformer to see how it works in general. Now i'm trying to follow your tutorial, i have some issues : When i'm putting the different kind of grounds in the "empty object", they all appears in the main window, the game one, how to avoid this ? When you are creating your rooms, it seems that you are copy/paste each floors, walls, etc and they all automaticaly put close to each other, i dont have the same and just for the grounds parts, they are in random places. How to fix it ? Thanks !

    • @ashitanojoefan98
      @ashitanojoefan98 ปีที่แล้ว

      So, when you're adding different types of ground to that "empty object," they're unexpectedly showing up in the main game view, right? It might be because you accidentally dragged them from the hierarchy panel directly into the scene or game view. To avoid this, make sure you're arranging everything within the scene view itself. If you want to prevent accidental movements, you can lock or hide layers that you're not currently working with.
      In the tutorial, you're seeing that the floors and walls are being copy-pasted and automatically placed close to each other to form rooms. But when you're trying this, things are ending up in random places, especially with the ground parts. This could be due to the pivot points of your objects or how they're aligning. Take a moment to check where the pivot point is on your objects - that's the point they rotate or scale from. If it's off, it could lead to unexpected placements when you copy-paste. You might need to adjust the pivot point or use snapping settings to make sure everything lines up properly.
      How to Fix It:
      Always work within the Scene View when arranging and duplicating objects to have better control.
      Keep an eye on the pivot point of your objects - it's like their anchor point. If it's not where you want it, things might get wonky when you copy-paste. Adjust it if needed, or use the snapping feature to help align things to the grid.
      Remember, Unity has a learning curve, especially when you're just getting started. It's normal to run into these hiccups, but with a bit of practice, you'll get the hang of it.

  • @alpha3836
    @alpha3836 2 ปีที่แล้ว +1

    Does this generator generate a completely random dungeon everytime? or does it generate the dungeon with a single pattern? If it generates it randomly can I make it so that it generates it in a single pattern everytime?

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +1

      It currently generates it randomly, you can look into seeds to generate it in a single pattern

    • @alpha3836
      @alpha3836 2 ปีที่แล้ว +1

      @@SilverlyBee okay thank you!

  • @evanorsak6390
    @evanorsak6390 2 ปีที่แล้ว

    I want to add a pillar in the middle of the room if all the doors are open in that particular room. there is only one pillar, it's always in the center. Please help, i'm basically an absolute beginner with C#. I'm also having another issue. I Finished the Room behavior script, attached it to the room, made the empy object (Generator), got the dungeon generator script from github, pasted it there, attached it to the empty object, and it is saying this error: "Assets\Scripts\DungeonGenerator.cs(90, 161): error CS0246: The type or namespace name 'RoomBehavior' could not be found (are you missing a using directive or an assembly reference?)" Thank you if you at least try to help.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      It's probably just a difference in spelling, mine is "RoomBehaviour" and yours is "RoomBehavior" so when you imported the script it has my spelling. To spawn the pillar in the middle you can create a pillar prefab, get a reference for it on the RoomBehaviour and check if all the doors are open, if they are you can use Instantiate to spawn.

  • @bellehuberty9457
    @bellehuberty9457 ปีที่แล้ว

    hello! thank you for your video. i am trying to use it a year later, and the line:
    var newRoom = Instantiate(room, new Vector3(i*offset.x,0,j*offset.y), Quaternion.identity, transform).GetComponent;
    is returning this error:
    CS8773 Feature 'inferred delegate type' is not available in C# 9.0. Please use language version 10.0 or greater.
    Does anyone know how to fix this? Thank you in advance!

    • @lukeallen5458
      @lukeallen5458 ปีที่แล้ว +1

      Upgrade to C# version 10.0, I think you can do it in Visual Studios settings. Do a quick google for updating the language version.

    • @DayMoniakkEdits
      @DayMoniakkEdits ปีที่แล้ว

      Never forget to add your parentheses when you call a method, in your case "GetComponent" -> var newRoom = Instantiate(room, new Vector3(i*offset.x,0,j*offset.y), Quaternion.identity, transform).GetComponent();

    • @bellehuberty9457
      @bellehuberty9457 ปีที่แล้ว

      @@DayMoniakkEdits thank you!! i'll try that and let you know how it goes.

    • @bellehuberty9457
      @bellehuberty9457 ปีที่แล้ว

      @@lukeallen5458 thank you! i'll do that.

  • @tommedenney
    @tommedenney 2 ปีที่แล้ว

    Hey there! im running into an issue where my game is infinitely generating without stop and eventually crashes due to lack of memory -- any idea what could be causing this?

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +1

      You're calling the function infinitely. Check where you're calling it, it shouldn't be on update, if you're using a while function, that could be your problem. Just make sure that you don't have a never ending loop calling the function.

    • @tommedenney
      @tommedenney 2 ปีที่แล้ว

      @@SilverlyBee what would you replace the while loop with? I’m a beginner at coding so not to sure about what to do one o remove the while loop.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      @@tommedenney Depends on the loop. You could still use it and have a max counter for like 1000 loops so it doesn't exceed it.

  • @ARMADA-oz6we
    @ARMADA-oz6we 2 ปีที่แล้ว

    Would it be possible to change the roombehaviour script to destroy the wall or door instead of disabling it? I want to do this because of it causing possible conflicts with how i want to do dynamic occlusion culling so as to get larger size dungeons to not lag as much.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +1

      Just use the Destroy() function instead of setting it inactive.

    • @ARMADA-oz6we
      @ARMADA-oz6we 2 ปีที่แล้ว

      @@SilverlyBee so instead of doors[i].SetActive(status[i]);
      walls[i].SetActive(!status[i]);
      i should do this instead?
      doors[i].Destroy();
      walls[i].Destroy();
      (and also a big thanks for the quick reaction)

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +1

      @@ARMADA-oz6we It would just be if(status[i]) Destroy(walls[i]) else Destroy(doors[i])

    • @ARMADA-oz6we
      @ARMADA-oz6we 2 ปีที่แล้ว +1

      @@SilverlyBee ah, i understand now. thank you for the explaination.

  • @csongorszanto7567
    @csongorszanto7567 2 ปีที่แล้ว

    Hello very nice tutorial. But I have a question is there any way to add a NavMesh to the generated dungeon so our character can walk on it ?

    • @raidoukuzunoha9874
      @raidoukuzunoha9874 2 ปีที่แล้ว

      i think u can, by adding the navmesh in each rooms prefab

    • @lukeallen5458
      @lukeallen5458 ปีที่แล้ว

      It is possible but requires an additional package for it to work as there isn't a default way to calculate NavMesh at runtime. The previous comment wont work due to the NavMesh being broken off in each room which means the character cant go from room to room through the doors.

  • @ashitanojoefan98
    @ashitanojoefan98 ปีที่แล้ว

    continue to cook so i can learn🔥🔥🔥🔥🔥🔥🔥

  • @pixelb0i255
    @pixelb0i255 2 ปีที่แล้ว

    Do you mind continuing the series with elevation in mind? Like stairs connecting rooms, etc.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว +1

      Hey, maybe in the future I'll make something of the sort (I have no plans though), but it would just be adding a 3rd dimension and 2 more neighbors to each cell. It wouldn't be that hard to expand on that

  • @gustavovela8560
    @gustavovela8560 2 ปีที่แล้ว

    wow great! is it possible to use more than one prefab to have more varied dungeons?

    • @daredeflon662
      @daredeflon662 ปีที่แล้ว

      Yes! You can even write conditions where there isn't a doorframe to another room, and not even a wall, giving the illusion of a longer corridor room, but this involves a bit more Coding. Imagine the rooms as some Tiles. And from there, let your mind go free.

  • @mxhirh
    @mxhirh 2 ปีที่แล้ว

    amazing video

  • @caetanoo4867
    @caetanoo4867 2 ปีที่แล้ว

    Great tutorial! Everything is good but there is a problem that I am suck on. Whenever I generate the dungeon the entrances arent in the right places and some rooms have doors and walls enabled at the same time. I downloaded the scripts from the github and followed every step and even watched the video twice but I have still not found the issue. Any help would be much appreciated. Thanks!

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      Be sure that you have selected the right doors/walls on the slots. You can do so by trying to open/close doors in only one room.

    • @caetanoo4867
      @caetanoo4867 2 ปีที่แล้ว +1

      @@SilverlyBee Thanks for the help but I looked over all the doors and walls and they are in the right slots in the RoomBehaviour script. When I ran the game all of the rooms were still facing the wrong directions and for some of them the doors and walls still were both enabled at the same time. For example in one of the cells the door enabled should have been the Up door but instead the Right door was enabled. I have no idea why this is happening but thanks for trying to help

    • @caetanoo4867
      @caetanoo4867 2 ปีที่แล้ว +1

      I even made the exact same room that you made but the issue still occurs

    • @Odisbey
      @Odisbey ปีที่แล้ว

      Having the same issue. Wrote all scripts to develop more practice, the room board works, but the doors / walls both spawn. So I went back and copied from GitHub. Part of the fix for me has been to fix the prefab. Make sure the prefab you're spawning in, is working and the transforms are reset before prefabbing.
      Additionally, when I wrote back in the debug status in RoomBehaviour, then tried and tested it out. I disabled the status and the rooms finally generated.

  • @RealKyklops
    @RealKyklops 2 ปีที่แล้ว

    I initially just went along with the video, but for some reason had the problem that there was indeed a full grid, but the entrances were facing outside so that I can fall off into the void.
    Then I copied the code from the description and now all of a sudden the entrances are still facing outside, but also now it's not in a grid and there's absolutely no possible way to get from one room to another.

    • @diegolopez5924
      @diegolopez5924 2 ปีที่แล้ว

      I had the same isue, make sure your top and bot walls are in the z value, and left and right in the x value of the world space

    • @xlunyl
      @xlunyl 2 ปีที่แล้ว

      @@diegolopez5924 Still does not work by the way

  • @diliupg
    @diliupg 3 ปีที่แล้ว +1

    That's a nice one. New sub from me!

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว

      Thanks! Glad you liked it!

  • @LirusNeon
    @LirusNeon ปีที่แล้ว

    I tried! doors and walls not working!

  • @danc01
    @danc01 2 ปีที่แล้ว

    Which version of Visual Studio are you using? My code coloring looks different than yours, and it's driving me nuts. I recently upgraded to VS Community 2022 and that could be the reason the code coloring is different.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      I'm using the 2019 version, that's probably it.

    • @danc01
      @danc01 2 ปีที่แล้ว +1

      @@SilverlyBee Thank you - Great tutorial. It was exactly what I needed to get me over the procedural generation hump. Keep up the great work you've won a new sub.

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      @@danc01 Thanks :D

    • @danc01
      @danc01 2 ปีที่แล้ว

      Moving from this tutorial to the next, now when I run no new rooms will generate.

    • @danc01
      @danc01 2 ปีที่แล้ว

      Now I get the 3 x 3 grid of rooms but it continuously stacks 3 x 3 grids of rooms on top of each other

  • @ranina.ultradream30
    @ranina.ultradream30 ปีที่แล้ว

    I don't understand the logic of checking neighbors in its function. How cell-size.x is the top neighbor cell? and how cell -1 is the left neighbor?

    • @SilverlyBee
      @SilverlyBee  ปีที่แล้ว +1

      It's because I'm using a single array (1 dimension) to work with the cells. If you want to, you can use multidimension arrays to make it more intuitive.

  • @YiXin-gi1kt
    @YiXin-gi1kt 2 ปีที่แล้ว

    i cant put room prefabs into the Dungeon Generator Script Component, can some one help plssss

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      Have you watched the second video? It goes into detail about generating different types of rooms.

    • @YiXin-gi1kt
      @YiXin-gi1kt 2 ปีที่แล้ว

      @@SilverlyBee ummmm the dungeon generator(script) component, that has a rooms that u can drag room prefabs into it right, but my one can’t drag anything into the rooms.😂

    • @YiXin-gi1kt
      @YiXin-gi1kt 2 ปีที่แล้ว

      @@SilverlyBee it’s not showing like element 0, element 1 etc and None(Game Object) beside or below the Room in the dungeon generator scripts component

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      ​@@YiXin-gi1kt Make sure the variable is public(or serializable), then it should show up in the inspector

  • @322ss
    @322ss 3 ปีที่แล้ว

    Thanks. Dungeon generation is a neat topic. BTW why not use Vector2Int instead to avoid those int conversions? Also one thing about those dungeon room models. I understand this tutorial is mostly about explaining and visualizing an algorithm, but in real world use those overlapping walls would be not ok.

    • @bigblue489
      @bigblue489 3 ปีที่แล้ว

      In games it is ok to overlap walls, this is made for game ya know?

    • @322ss
      @322ss 3 ปีที่แล้ว +1

      @@bigblue489 Nothing prevents you from doing it. My point was pointing out a technical choice. You'll run into problems when two set of faces overlap exactly facing the same direction... you'll get z-fighting and it also is waste of geometry and causes overdraw. In this case there is no point having 4 walls on each cell (unless using half walls). You also seem to assume I made a comment not knowing about this being for games... but this is a channel about game dev. I have no idea why you assume something like that.

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว +2

      Hey, Vector2Int is a good alternative. As for overlapping walls, the tutorial was meant to be as simple and easy as possible. The overlapping walls/doors would have to be fixed for a bigger game and there are many alternatives for fixing it (from checking collision/distance to using a single generator to create the walls and doors). The tutorial is meant to be taken as the basis to build your own. The focus would be the relations between each room (the grid/board of cells), since I believe someone would be using a different type of room I decided to leave the walls as is. I'm currently making a video expanding a bit on this sort of dungeon, if you'd like I could include a section about how to clear the overlapping walls.

    • @322ss
      @322ss 3 ปีที่แล้ว

      @@SilverlyBee Thanks for the reply. Like I said "I understand this tutorial is mostly about explaining and visualizing an algorithm". Really liked the use use 2D to 1D conversion of the grid data. I've used similar 1D array system myself but those border column rules were pretty ugly in my solution. I've personally used old school west/south facing wall setup, but I wouldn't mind seeing another take on wall placement, not too many videos on that topic, could be interesting!

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว

      @@322ss Yeah, the south/west could be a solution but in the case of the video you'd also have to create the east/north border walls. If it were a 2d dungeon (top down) you'd have to increase the space between the rooms and use a "bridge". I'll probably use a generator to create the walls, since the rooms follow a similar pattern. These 2d to 1d conversions can be quite challenging, if I ever use it again in a tutorial I'll try to explain it a little better, I feel like I went a bit fast on this one.

  • @mehdimounjid2294
    @mehdimounjid2294 2 ปีที่แล้ว

    thw that helped me a lot

  • @tiefighter7216
    @tiefighter7216 2 ปีที่แล้ว

    It's okay if I use your algorithm with a game that has backrooms style? , I'm currently working on it

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      Sure!

    • @tiefighter7216
      @tiefighter7216 2 ปีที่แล้ว

      ​@@SilverlyBee i have a room that doesn't have any doors to open. it's okay if I don't write the door element in your script ?.
      I'm afraid that it when I will finish the entire script and go be to unity, it might say that there's gonna be an error where I didn't assigned an object to the door component.
      So for the final question: I have a room that doesn't have any doors, just walls, I am worried about messing up with the code because your script has is focused on a room that has a door. What am I supposed to do.
      Thanks for reading this and hopefully I will find the solution! Thanks!

    • @SilverlyBee
      @SilverlyBee  2 ปีที่แล้ว

      @@tiefighter7216 If it's the walls work like the doors to be openings into the room then you can just remove the doors from the script.

  • @rato5611
    @rato5611 ปีที่แล้ว +1

    I'm brazilian and I have a strange ease of understanding what you say, are you brazilian too?

    • @SilverlyBee
      @SilverlyBee  ปีที่แล้ว +1

      Sim :D

    • @rato5611
      @rato5611 ปีที่แล้ว +1

      @@SilverlyBee Q legal :)

  • @bebeninc9208
    @bebeninc9208 2 ปีที่แล้ว

    Thank you

  • @fly_popas
    @fly_popas 2 ปีที่แล้ว

    Thanks

  • @NamTVP
    @NamTVP 3 ปีที่แล้ว

    can you make a bubble shooter game tutorial!

    • @SilverlyBee
      @SilverlyBee  3 ปีที่แล้ว +1

      Maybe in the future. Currently I have no plans for it.

  • @blank1694
    @blank1694 2 ปีที่แล้ว

    not me trying to make the backrooms

  • @hhcdghjjgsdrt235
    @hhcdghjjgsdrt235 2 ปีที่แล้ว

    damn. boom. sub++;