ROGUE LIKE RANDOM LEVEL GENERATION - INTERMEDIATE C#/UNITY TUTORIAL - #1

Поділитися
Вставка
  • Опубліковано 29 чер 2024
  • This is episode 1 of a new unity and C# tutorial series on how to make an epic level generation system similar to the one found in the game SPELUNKY ( spelunkyworld.com/ )!
    ---------------------------------------------------------------------------------------------------------
    SUPPORT ME : / blackthornprod
    ---------------------------------------------------------------------------------------------------------
    MARK BROWN'S SPELUNKY VIDEO : • How (and Why) Spelunky...
    SPELUNKY LEVEN GEN BLOG POST : tinysubversions.com/spelunkyGen/
    ---------------------------------------------------------------------------------------------------------
    DOWNLOAD the FINISHED PROJECT : github.com/BlackthornProd/Spe...
    FOLLOW ME on TWITTER : / noacalice
    JOIN the BTP DISCORD SERVER : / discord
  • Ігри

КОМЕНТАРІ • 161

  • @CouchFerretmakesGames
    @CouchFerretmakesGames 5 років тому +153

    Finally some Intermediate Unity stuff on UA-cam! Thanks!!

    • @Blackthornprod
      @Blackthornprod  5 років тому +6

      Hey :) ! I'm really glad you liked the video :) ! Stay tuned for episode 2 mate :) !

    • @theladcalledizzy1109
      @theladcalledizzy1109 5 років тому +3

      CouchFerret makes Games Yoire doing really great so I subbed to help out!! 👍🏼

    • @CouchFerretmakesGames
      @CouchFerretmakesGames 5 років тому +2

      Thanks, I appreciate it! :)

  • @randolipe9056
    @randolipe9056 5 років тому +97

    I can't even make my player to move smoothly, why am I watching this?

    • @chronoabi
      @chronoabi 4 роки тому +6

      try putting a circle collider on the feet of the player and check on freeze rotation on z axis . That may help you walk smoothly and also may be use Tile editor to make your rooms . If that helped then i am happy to help you

    • @brianpelfrey5788
      @brianpelfrey5788 3 роки тому

      ChronoABI Great advice!

  • @pudgystump
    @pudgystump 5 років тому +2

    You know, I was watching this video simply because I really enjoy watching your videos and seeing how you do things. I'm currently working on my capstone project in college and I was having an issue with the A* pathfinding algorithm not dynamically updating (or being really janky when I did try an implementation). As I was sitting here watching this video I realized that the fix for my issue was totally simple and right here in this very video! Using your timer function to space out the room generation and ensuring that the enemy is not within an "attack range" I now have enemies that will pursue the player, avoiding obstacles, and able to update the path on the fly in case the player moves!
    Keep up the good work! Your video literally just saved me a couple of hours of testing and troubleshooting!

  • @studioprimitive
    @studioprimitive 3 роки тому +7

    I have to just remind myself that he's not programming and doing all of this in real time.. on first watch, I envision this guy literally flying through game design with a smile on his face while narrating what he's doing.

  • @tyelork
    @tyelork 5 років тому +4

    I love the use of your music from Evolution like that in your videos*. Makes me crack up every time!

  • @victoonix2802
    @victoonix2802 2 роки тому

    That's exactly what I needed for my game AND it's for unity/c#, which is the engine/language I initially chose!
    Thanks a lot, I couldn't imagine what I would go through if I didn't have this video!!

  • @dragonchang4979
    @dragonchang4979 5 років тому

    This is something that i've been looking for a while. Thanks, Noa

  • @Sylfa
    @Sylfa 5 років тому

    Excellent tutoring style, crisp, clear and intuitive. Better than a bunch of payed courses I got through a humble bundle recently. I'm definitely subscribing to see more!

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Thanks so much for the support :) ! I'm really glad you liked the video ! Stay tuned mate :) !

  • @styxrakash4639
    @styxrakash4639 8 місяців тому +8

    If anyone is reading this you'll need to use a composite 2d collider to merge individual wall colliders into a single collider for performance. Otherwise the level will be flooded with many colliders quickly - especially if you want larger levels

    • @devalt1
      @devalt1 7 місяців тому

      I read this and appreciated it! Thanks!

  • @haxures_8978
    @haxures_8978 5 років тому +28

    I watched that video by Mark Brown yesterday and was really fascinated on how Spelunky worked. The next day you upload a video on the same topic about that video.

    • @Blackthornprod
      @Blackthornprod  5 років тому +4

      HAHA That's some great timing :) ! Hope you enjoy the series mate :) !

  • @DeXoteric
    @DeXoteric 5 років тому +1

    Great tutorial! I will totaly try this in my Top-Down Shooter game I'm working on.

  • @sfadsgdsgsfd8754
    @sfadsgdsgsfd8754 5 років тому

    perfect timing! i just started making rouglile game and this vodeo came out! Thank you alot!

  • @SethEden
    @SethEden 4 роки тому +1

    Great base algorthim for building a maze! To make a more complex maze off of such a system could add critical path room dividers and set the start and end points as path-decision points in a more complex labyrinth. Of many critical paths and the setup an ultimate start and ultimate finish. :-D Thanks for sharing!!

  • @allabouteverything4925
    @allabouteverything4925 2 роки тому

    Exactly what i was looking for! Awesome.

  • @gwacstore5406
    @gwacstore5406 5 років тому

    super well made and informative thanks for posting this made my day better you have a good eye

  • @AuliyaasGames
    @AuliyaasGames 5 років тому +1

    This is so awesome! I'm going to try to use your tactics to do a 2d sidescroller level gen! Already getting ideas....

  • @Norbingel
    @Norbingel 5 років тому +28

    Oh yeah, after I spend months figuring out how to make mine you finally upload this...

    • @wignermatos1470
      @wignermatos1470 5 років тому +5

      Believe this was good, in these months trying to create this system you certainly should have learned and evolved a lot. Sorry for bad english :(

    • @Blackthornprod
      @Blackthornprod  5 років тому +11

      As Solitario said, you probably learnt A LOT by trying to make this system by yourself :) !

  • @kitthekat6844
    @kitthekat6844 5 років тому +4

    Cool to have some intermediate stuff :)

  • @vishnuramesh2514
    @vishnuramesh2514 3 роки тому

    You are amazing. So concise and clear.

  • @brianpangburn5573
    @brianpangburn5573 5 років тому +1

    I found this completely by accident and will come in handy for when I do game jams. You do a great job. Very succinct. My favorite part is that, unlike most, you first show WHAT you are going to do, so people know within the first minute if this tutorial is what they need. A lot just start without giving the user any clue in the beginning what the end result should be. Again, great job. Definitely going to sub your channel

  • @gwacstore5406
    @gwacstore5406 5 років тому

    thanks for posting this made my day better you have a good eye

  • @NaughtyDuck
    @NaughtyDuck 5 років тому

    Instant LIKE, before watching the video,. After watching: LOVE IT. KEEP IT UP.

    • @Blackthornprod
      @Blackthornprod  5 років тому +1

      Thanks so much mate :) !! Stay tuned for episode 2 !

  • @SupJameson
    @SupJameson 5 років тому

    Very nice! Episode 2 please!

  • @robstaaa
    @robstaaa 5 років тому

    I LOVE your stuff and style

  • @Endermerlin
    @Endermerlin 5 років тому +2

    I think it's cool that you're doing such a random generator now. I've also made a spelunky-like level generator and mine finally works flawless, but it's really complicated ^^ Still, your video is great! (unfortunately that does not help me that much anymore ...)

  • @TheGuardianSteel
    @TheGuardianSteel 5 років тому

    This could not be any better timing. jesus christ you are insane.

  • @samueldovbenyuk2137
    @samueldovbenyuk2137 5 років тому +6

    First of all, great video! (as always), Second in your how to hold to jump higher video you said that you could combine double jumping with it
    (I think), and if you can then could you please make an extension of that video to show how to do that because right now I can figure out how to
    do it (Sorry if i'm being a bother)
    -Thanks!

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Hey Sam :) ! I'm really glad you liked the video !
      How about you join the BTP Discord server ( discord.gg/MyG8aC9 ), there me or some other member from the community could show you how to solve your problem :) ! Hope to see you there, cheers mate :) !

    • @samueldovbenyuk2137
      @samueldovbenyuk2137 5 років тому

      @@Blackthornprod Ok, I will thanks!

  • @DawnosaurDev
    @DawnosaurDev 5 років тому +1

    Looks cool

  • @simoncodrington
    @simoncodrington 5 років тому

    You sounded a bit flat, hopefully all is well for you and it's just an off day.
    The content as great though man, exactly what I was looking for, thanks again :)

  • @leloukoz
    @leloukoz 5 років тому +1

    nice tutorial

  • @camushushuaia
    @camushushuaia 5 років тому +1

    Amazing Tutorial! Helped me A LOT!
    Maybe could you do a revamped version of this but with tilemaps? I'm bursting my head arround and i cant adapt this to use it on tile maps :(
    Thanks in advance! I'love your tutorials!

  • @aradarbel4579
    @aradarbel4579 5 років тому

    Good video! Very nice idea!! ;D

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Thanks mate :) ! I'm so glad you liked the video, stay tuned for episode 2 :) !

  • @javhm1611
    @javhm1611 3 роки тому

    i love u man. Thanks to you i can improve.

  • @haanimirza4090
    @haanimirza4090 3 роки тому

    me: searching up how to do pseudo-random level generation because I want to make levels like spelunky's
    Blackthornprod: allow me to introduce myself

  • @restasbeats
    @restasbeats 5 років тому +5

    Instant like

  • @Taubsen
    @Taubsen 5 років тому

    Really good Video :)

  • @rabbitpirate
    @rabbitpirate 5 років тому

    Great video and a great expansion on your last random level series. I was wondering if you or anyone else knows how to do random level design using scenes rather than game objects? I want to have enemies and the like only become active when my character enters that part of the map. The obvious way to do this is with different scenes that are loaded when the player exits the previous one. Now I’ve worked out how to load a random next scene, but making it so the player can travel back and forth between scenes, as well as making a set map of these random rooms, is beyond me. Any suggestions? Thanks :)

  • @JunJun_
    @JunJun_ 3 роки тому

    ngl this is pretty epic

  • @wignermatos1470
    @wignermatos1470 5 років тому

    Thank very much for the video !

    • @Blackthornprod
      @Blackthornprod  5 років тому +1

      No problem :) , I'm really glad you liked it :) !

  • @SoyoCraft
    @SoyoCraft 4 роки тому

    Your drawing is awesome

  • @femioyelade879
    @femioyelade879 5 років тому

    You simply amaze me

  • @jmun3688
    @jmun3688 3 роки тому

    thank you, very cool

  • @cacomonkey
    @cacomonkey 5 років тому +1

    Thanks!

  • @jakepearce4949
    @jakepearce4949 5 років тому +1

    First!
    Great video, I was actually thinking about this sort of thing recently.
    Ps: Noa, you are the best unity tutor on UA-cam keep it up ; )
    And I'm really hyped for the game jam it's going to be my first one ever.

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Hey Jake and thanks so much for your support :) !
      I'm delighted to hear you'll be taking part in the first BTP game jam ! I'm also really excited and can't wait to see what all you guys come up with :) !

  • @canuniverse3367
    @canuniverse3367 3 роки тому

    thank you so much 💕

  • @nitras.design
    @nitras.design 5 років тому +10

    Please add an option to also enable a passage on the extra rooms. It’s much more flexible and it wouldn’t be relying on ‘bombs’ to avoid spelunky clones :). Also I am a bit amazed why you don’t create a grid system for the whole level, this would make bigger levels so much more flexible. I hope you show people a
    More flexible method near the end of your video list as a bonus. This is much better code and practice.

  • @jerowns
    @jerowns 3 роки тому +1

    How amazing would it be if there were rooms created by the community (with strict rules) and all would be put in the RNG and it forms an endless rougelike dungeon runner

  • @tushargupta764
    @tushargupta764 5 років тому

    Yes yes i need more intermediate stuff

  • @CompilerZ
    @CompilerZ 5 років тому

    As usual Thumb up :)

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Thanks Joseph :) !! This series is going to be pretty challenging so best of luck :) ! And don't hesitate to ask me any further questions if need be :) ! Cheers !

  • @luciacover9909
    @luciacover9909 5 років тому

    Great Vid! Don’t tell anyone but I’m planning on using this for a rpg.... don’t tell anyone

    • @ian-qo8fq
      @ian-qo8fq 3 роки тому

      ye no one knows buddy is not like 115k people saw the comment section

  • @MauryRedfield
    @MauryRedfield 5 років тому

    I would like to see a tutorial made by you with the theme of tactic game

  • @TaylorBramble
    @TaylorBramble 5 років тому

    Blackthornprod keeps my game momentum going like no one else (>'-')>#

  • @duuuuuuuuuh135315
    @duuuuuuuuuh135315 5 років тому +1

    Hey, what's a good canvas size inside PS for making tiles for this sort of level generation? Any tips or links to guides would be much appreciated!

  • @somnia3423
    @somnia3423 5 років тому

    great!!!!

  • @pannukakku4168
    @pannukakku4168 5 років тому

    You're slowly turning into Edmund McMillan

  • @AaronAsherRandall
    @AaronAsherRandall Рік тому

    Whoa! Do you have an explanation on how to do the bomb and effects for that?

  • @baldchessman
    @baldchessman 5 років тому

    u r the best like ur channel

  • @mastergamerx
    @mastergamerx 5 років тому

    So for games like binding of isaac they just predesign the look of the rooms then setup mob spawners then make it a prefab then populate the map like this?

  • @3Katapa
    @3Katapa 3 роки тому

    found what i need. Be back in 4 month when I can understand it.

  • @HelpingPanda
    @HelpingPanda 5 років тому

    The Move function could be simplified a lot by not storing the new position and just setting it directly like this:
    if(dir == 1 || dir == 2) // Move Right
    {
    transform.position += Vector3.right * moveAmount;
    }
    else if(dir == 3 || dir == 4) // Move Left
    {
    transform.position += Vector3.left * moveAmount;
    }else if(dir == 5)
    {
    transform.position += Vector3.down * moveAmount;
    }
    Otherwise, great tutorial!

  • @kerhabplays
    @kerhabplays 4 роки тому

    Welcome To Blackthornprod IAM kerhab!!!!LOL

  • @tushargupta764
    @tushargupta764 5 років тому

    Hey please put your art assests on some website, like the shades you use to make light, character animations etc for us !

  • @teemoguides9033
    @teemoguides9033 5 років тому

    Hey you probably wont see this but could you let me know what you use for drawing? Which model of drawing tablet or whatever else. Also is it at all possible to create designs similar to yours with just a mouse for students trying to learn this that cant afford much?

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Hey :) ! I'm using an intuos pro medium wacom tablet (great quality :) ), I got it two years ago for roughly 300 euros + it came with a one year subscription to photoshop !
      You can definitely create amazing art just with a mouse (for example try pixel art or vector art). However if you try other art styles (like mine) you'll need a drawing tablet. If you're really into game art and animation it will be worth it :) !
      Or you could draw and paint on paper and then scan that art to animate it on your computer, it could make for a very unique art style :) ! Anyway best of luck mate and have a good day :) !

  • @nolediganamimadre5714
    @nolediganamimadre5714 5 років тому

    Hi. What about to make piano tiles example!!!? please! yours tutorials are fantastic!!!!!!

  • @pratikbaid1
    @pratikbaid1 4 роки тому

    Are you using unity tile system or are these just square sprites? I tried with square sprites and the player gets stuck between any two sprites due to very minute spacing.

  • @TolgaDurman
    @TolgaDurman 5 років тому

    can you make audacity tutorial for some cool mic effects?

  • @rpgtogether7022
    @rpgtogether7022 4 роки тому

    5:18 Hey Noah.. IK this is pretty old but for better details rather than doing a random.range a probablity system would look better. Like making cracked variants of that tile appear less often.

    • @LopinDev
      @LopinDev Рік тому

      easy fix just add more numbers and extra conditions

  • @okumano1912
    @okumano1912 5 років тому

    Could you please make a second part for the ranged wapon tutorial.

    • @okumano1912
      @okumano1912 5 років тому

      Or a tutorial about combo attacks, that would also be nice!

  • @ahmzyA
    @ahmzyA 5 років тому +1

    Kewl

  • @cameronshearer6941
    @cameronshearer6941 5 років тому

    Hi there, what syntax theme are you using? Thanks in advance.

  • @Shadow_Ben
    @Shadow_Ben 2 роки тому

    what can i do if i only want to spawn on room and not more? cant find videos for that

  • @ahalamma55
    @ahalamma55 5 років тому

    9:00 For Random.Range, did you mean "remember that the last number is *not included* (excluded)?

    • @jacknelson7786
      @jacknelson7786 5 років тому

      Yeah, he mispoke. The int overload for Random.Range is (inclusive, exclusive] while the float overload is (inclusive, inclusive).

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Hey :) ! Yep I said : "isn't included", it sounded a bit like "is included" I must admit, sorry about that !

  • @DustinjBailey
    @DustinjBailey 3 роки тому

    How do you set up visual studio with those colors and to recognize unity items.?

  • @AlexVoxel
    @AlexVoxel 5 років тому

    Noce spelunky tutorial

  • @Josh-zt9dj
    @Josh-zt9dj 4 роки тому

    Hey I couldn't get the spawn object script to work I'm using the 2017.4.22f1 version of Unity I don't know if that's the issue and I've checked my script several times but I think it may have something to do with the prefab.

  • @chronoabi
    @chronoabi 4 роки тому +1

    Hey i have a problem where camera doesnt show the first room that is spawned .

    • @mdnafieuhossainalif1628
      @mdnafieuhossainalif1628 3 роки тому

      I don’t know if you’ve figured it out or not, but if your camera doesn’t show the rooms, try changing the camera’s Y rotation to 180. It worked for me. Also if you want the camera to follow every starting room, try making the camera a child of Level Generation gameobject

  • @bluegru
    @bluegru 5 років тому

    9:06 Is included? Isnt the last number not included with integers?

  • @8978martin
    @8978martin 5 років тому +1

    please tutorial tatic system battle

  • @lux1855
    @lux1855 5 років тому +1

    Could you do a tutorial like this for a platformer

    • @Blackthornprod
      @Blackthornprod  5 років тому

      Hey :) ! As I said at the start of the video this level generation is for a platformer type game ! But it also works for a top down project :) !

  • @firefly9228
    @firefly9228 3 роки тому +1

    'GameObject[]' does not contain a definition for 'Lenght' and no accessible extension method 'Lenght' accepting a first argument of type 'GameObject[]'
    I checked the script looks all good can someone please tell me where did i do wrong?

    • @brianpelfrey5788
      @brianpelfrey5788 3 роки тому +1

      I'm having a similar issue, ill let you know if I figure it out.

    • @brianpelfrey5788
      @brianpelfrey5788 3 роки тому

      So if you’re like me, you’re probably using the wrong version of unity. I had to go back and install Unity 2018.1.8 like he’s using In the video.

  • @merry6671
    @merry6671 5 років тому +7

    6:47 The black dots freak me out

    • @Blackthornprod
      @Blackthornprod  5 років тому

      They look like prison cells I guess ! Or tiny claustrophobic boxes... ;D !

    • @nikhilkadiyan4847
      @nikhilkadiyan4847 5 років тому

      @@Blackthornprod no pause the video there and moves your eyes around the corners the squares FAST

  • @lux1855
    @lux1855 5 років тому

    And a pixel game art tutorial in gimp

  • @alexv9607
    @alexv9607 4 роки тому

    hope someone will answer me. How can you make it so you can throw bombs and destroy terrain so you can get in other rooms? and how to make a AI that can patrol free in a chamber and if the player comes close the the AI the AI attacks the player and if player leaves the chamber the AI goes back to patrol. plz help thx

  • @lhenardabraham9068
    @lhenardabraham9068 5 років тому +1

    Why did you use direction numbers range to 1 to 5? Instead of 1 to 3? Since you only have 3 directions needed(Left, Right and Down)

    • @Blackthornprod
      @Blackthornprod  5 років тому +1

      Hey :) ! This way there's MORE chance that the level gen moves left or right than down ! But of course you can just set it to be a random number between 1 and 3 if you want an equal chance :) !

    • @lhenardabraham9068
      @lhenardabraham9068 5 років тому

      Noted. Didn't expect you'll respond. You inspired me to continue this game making journey! Thanks alot Noah!

  • @savacatalin9195
    @savacatalin9195 4 роки тому

    Help, my tiles spawn in scene view but not in game

  • @PhilDeveloper
    @PhilDeveloper 3 роки тому

    is there a way to make the randomly generated levels to tile themself... for example: it has grass on the top then dirt beneth?

  • @GORNK
    @GORNK 4 роки тому

    Can this be modified to work in a 3D world?

  • @chenariana3482
    @chenariana3482 4 роки тому +1

    8:38 when I pressed play, the startingpoints were cloned as well...I did not know why...

    • @chenariana3482
      @chenariana3482 4 роки тому +1

      And there was nothing showed on my game scene...

    • @beaverjoe9171
      @beaverjoe9171 4 роки тому

      算不算偶遇。。。。

    • @chenariana3482
      @chenariana3482 4 роки тому

      @@beaverjoe9171 不算!!hhhh 不问你你就跳过了!

  • @eriknilsson3556
    @eriknilsson3556 5 років тому

    how did you make the bomb??

  • @davidsupolik1860
    @davidsupolik1860 6 місяців тому

    im coming late, but i cant figure out how to implement difficulty based on players amount. I would like to make the game coop or even mp, but i would like to use this method for one player only and increase the difficulty based on how many players gonna play, so it will be challenging in all aspects.. Any ideas or something where to start please?

    • @OmniCroissant
      @OmniCroissant 11 днів тому

      i'd make a DifficultyManagerer GameObject with a DifficultyManager script that other scripts refers to in their formula. For example the damage of an enemy could be 10 * DifficultyManager.difficultyModifier (where difficulty modifier varies according to the number of players in game).
      Does that answer your question ?

  • @protagtom
    @protagtom 4 роки тому

    I create a second prefab it doesn't generate

  • @5daydreams
    @5daydreams 4 роки тому

    Is the Random.Range() thing still working? Anyone knows the 2020 solution for it?
    I found something that works:
    Random rnd = new Random();
    rnd.Next(0, startingPositions.Length)
    But I don't know _why_ it works, could anyone explain?

  • @crazydev2084
    @crazydev2084 5 років тому

    I'm not an expert so I would ask something, in which case I use this random generation map? And why?

    • @fiona9891
      @fiona9891 5 років тому

      When you want a map that works like that. It depends on what kind of game you're going for.

  • @lakew4928
    @lakew4928 5 років тому

    According to the Random.Range() Documentation Here:
    docs.unity3d.com/ScriptReference/Random.Range.html
    "Returns a random float number between and min [inclusive] and max [inclusive] (Read Only)."
    Random.Range() in the case coded above will return a 6 sometimes.

  • @govindsuthar5882
    @govindsuthar5882 5 років тому

    Make video related it please.

  • @sosasees
    @sosasees 5 років тому +2

    Where's Episode 2?
    I need all Episodes, but I can only find this one!
    Can someone Reply to this Comment with the Links to all Episodes, please?

    • @Blackthornprod
      @Blackthornprod  5 років тому +1

      Hey :) ! This is a very new tutorial series ! Episode 2 is actually coming out today so stay tuned mate :) !

  • @alexandersedig3143
    @alexandersedig3143 2 роки тому +1

    Stops after Generating the first room, not sure what is happening.

  • @WorstDeveloper
    @WorstDeveloper 4 роки тому

    This feels VERY inefficient. If I want to add more tiles to the object arrays I will have to add them to ALL spawn points in every room.

  • @govindsuthar5882
    @govindsuthar5882 5 років тому

    How to make wrestling game ?

  • @JavierMorales-qo4ok
    @JavierMorales-qo4ok 4 роки тому

    I wanna comment a thing, Spelunky isn't a Rougue-Like is A Rogue-LITE

    • @Jonathan-jc4ef
      @Jonathan-jc4ef 2 роки тому

      No one cares + ratio + L + touch grass