Procedural Island Map Generation in Unity 2D - FREE project

Поділитися
Вставка

КОМЕНТАРІ • 34

  • @iiropeltonen
    @iiropeltonen 3 місяці тому +2

    Uuh! I really enjoyed your dungeon generation series. Was very educational, I've watched it several times to keep the knowledge fresh in my mind. Gonna watch this later this evening! Happy to see a proper tutorial from you again!

  • @amberlewis012
    @amberlewis012 3 місяці тому +1

    Damn.. I watched many of your tutorials like a few years ago but paused making games for a while due to exams. Now that they're over, I've finally started making games again - albeit I've switched to Godot. But still, I find your tutorials and videos as good references and I'm glad that the videos are still incredibly detailed and high quality.
    Thanks for all of this!

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому +1

      I really appreciate that! I hope that you can get back to making your game soon 🙂
      btw How do you like this "overview" format rather than a step by step tutorial ?

    • @amberlewis012
      @amberlewis012 3 місяці тому +1

      ​@@SunnyValleyStudio Thank you!
      from a normal viewer's standpoint obviously this format would be more convenient / sort of "easier" at a glance to learn and understand. For example you don't need to skip through a playlist of 10 videos and you can just use the chapters/sections (?) thing in this one video. And also sometimes (rarely but it still happens ;-;) you would find a tutorial series that you really like or need, but then something happened and the series stopped suddenly or whatever, so this type of "overview" video let's you get things clear that you will cover which topics and viewers don't have to worry like "I hope this series doesn't suddenly end midway through"
      Overall i still really quite like it, obviously I don't know whether you personally prefer this format or the older ones, or maybe this would take up more time to make each video and it won't be found by the algorithm that easily or etc... nevertheless I think if you don't really mind this type of video yourself, then you could definitely go for it!
      Additionally I also had an idea from before that is little bit similar with your other videos but not exactly: maybe you could somehow split individual mechanics/functions/code snippets into their own videos (But they don't depend on other videos), so for example a video about seed generation, and it can cover the different ways to do it so its more "modular"...?
      I dunno maybe this sounds stupid or I'm just describing other videos haha- because there's no way to cover every single use case/topic/genre in the world, but if it's modular enough, and also easy to understand + detailed (which your videos already are), then "maybe" it could let people learn themselves while not just directly copying code from the videos, who knows xD
      Sorry for writing a story I just noticed haha

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому +1

      @@amberlewis012 Thanks! I didn't think about making more granular videos. It might work well - short tutorials + bigger projects presented as an "overview". I will definitely try doing that 🙂

  • @PeterSchneider-e7f
    @PeterSchneider-e7f 2 місяці тому +1

    Hey, great video as always! I also have a few more ideas for maybe the next tutorials. You have a grid playlist that, in my opinion, is very well done, but since I don't really understand how to extend it, I was hoping you might make a video that includes new aspects, only if you want to. Some aspects could be that you can only place items using a currency, or that you can set some items so they cannot be deleted. Another idea is to have the system recognize parts that are generated on the land and then treat this grid as occupied. Additionally, it would be great if you could place carpets on the floor and then also place furniture on them.

    • @PeterSchneider-e7f
      @PeterSchneider-e7f 2 місяці тому +1

      I know this would take time, even if you already have other plans, I want to let you know how underrated your channel is. Your tutorials are of high quality, your voice is pleasant, and everything is available for free on GitHub. Respect! I hope you reach a million subscribers on UA-cam very soon.

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 місяці тому

      Thanks for the feedback! 🙂

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 місяці тому

      Thanks 🙂

  • @yurimoreira2064
    @yurimoreira2064 3 місяці тому +1

    I just say to you: thank you very much

  • @developmastery-if6si
    @developmastery-if6si 3 місяці тому +1

    thanks you for good project

  • @GrzegorzKiernozek
    @GrzegorzKiernozek 3 місяці тому +1

    How is the performance? Does it have a chance to run on mobile?

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому

      I have run it in WebGL and the generation took 2-3 sec. It is by no means optimized. I am planning a paid (5-10 $) version that uses Jobs + burst since those can work on mobile (but not in webgl). The layered approach works well for testing but many steps could be combined into a single for loop. Again I would prefer to use jobs system but in PCG usually optimization comes after you know that the generation works.
      Another thing that I don't plan to tackle is map streaming. If you want to have multiple islands you would be wise to separate the map into chunks and only render the visible part. Unless you are cratering an infinite word you can generate all the data at once and just integrate map streaming into the rendering process (which is separate anyhow). Just don't forget about the collider generation step since those 2 overlap. Sorry for making those tightly coupled!

  • @random_precision_software
    @random_precision_software 3 місяці тому

    I don't suppose you don't know how to create a HAIR shader for characters?

  • @In-N-Out333
    @In-N-Out333 3 місяці тому +1

    So why is the thumbnail a 3D island?

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому

      Sorry I just suck at making those thumbnail so I opted to use midjourney to generate one 😅

  • @ThatFrostMourne
    @ThatFrostMourne 3 місяці тому +1

    hello sir, im a little late for the party, but I would like to ask you sir a question that i can't find it documented anywhere, if I have a procedural generation world with ruletiles, with chunks of 16x16 tiles each, will i be able to connect neighboring chunks edges as if was on the same tilemap? thanks for this awesome video tho, keep up the good work!

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому +1

      If you use the default Rule tile you can define there the rules of what tile to put in on the edges where the rule tile connects with some other tile. This is problematic in case where we have an outer "water" layer to which sand needs to connect and "inner" grass layer that sand again needs to connect to.
      In my setup I have created a "custom" rule tile (you can copy the rules from your default one to the new one using copy / paste). The point of the new Rule tile is to assume that "Grass: knows how to connect to sand. If it is so "Sand" should treat "Grass" tiles as "Sand". So in my custom Rule Tile you give the "Sand" a "Grass" rule tile - preventing the "Sand" tile for creating the 'water edge' where it meets the sand.
      I know that it sounds pretty tricky when you would have 3 different tiles meeting up but that is when you can create a more advanced custom Rule tile or do as I did with water - create a "FixTilemap" and manually fix the places where the RuleTile has placed an incorrect tile.
      I hope it helps!

    • @ThatFrostMourne
      @ThatFrostMourne 3 місяці тому

      @@SunnyValleyStudio thank you for the reply, I'm currently working on it, and your system is helping me a lot, another question would be if tilemaps is optimal for handling a very large world, pretty much like terraria, would that be viable somehow? or i am better off just instatiating sprites in a grid?

  • @Magma-uw7yo
    @Magma-uw7yo 3 місяці тому +1

    I was trying to make the same thing, Is it possible to visualize the island before playing ? Because I don't see the modifications on live and it's not practical. Otherwise thank you a lot.

    • @Magma-uw7yo
      @Magma-uw7yo 3 місяці тому

      it's too complex for me, I try to implement that in my game but I can't change what I want. I want to use Tilmap instead of Tilebase for the ocean because I've got a material attached but I've got a lot of errors, so I will do it my-self. It's just for my project, otherwise Thank you for sharing,

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому

      Sorry about that. Yes Procedural generation can be a bit daunting. You could set the ocean tile to "None" in the renderer so that it does not render the ocean / shallow sea tiles (at least I think this would work in your case)

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому

      I think that you could use docs.unity3d.com/ScriptReference/ExecuteInEditMode.html on the Update() of the MapGenerator.cs (or MapGeneration.cs) and add there code like "if R key is pressed call GenerateMap() method". But a simple approach would be to just run the game and sizable / enable steps and regenerate the map at runtime. I will try to make it so that steps can be "disabled" from the inspector rather than that you need to click each separate checkbox for each step.

  • @lee1davis1
    @lee1davis1 3 місяці тому +1

    Very impressive Peter. How long did it take to finish polishing the code?

    • @SunnyValleyStudio
      @SunnyValleyStudio  3 місяці тому +1

      Thanks! Making it work took about a week (about 20-30 h). Coding this is pretty simple. Tweaking the values and adding sprites to handle edge RuleTile cases took the longest 🙂
      For example I still have to add a step to remove island of size 1x1 that sometimes appear after using circular mask in the base step. Finding and fixing those kind of things takes the longest.

  • @lihermit92
    @lihermit92 3 місяці тому +1

    I actually needed this video 🎉 sent from the heavens!

  • @あれくす
    @あれくす 3 місяці тому +1

    Oooo im excited for this!! Thank you!!