Procedural Generation In Unity 2D With Tile & Perlin noise

In the previous video we made a Procedural generation script which was a basic version and only useful to know the concept of procedural generation.In this video we will improve this script by using Tiles instead of game objects Which gives us more performance and we will use perlin noise instead of what we did in the previous video which gives us more flexibility on how we want to spawn our terain and lets us save a generation as well.
Script
Previous Script on Procedural Generation
Script is Here:hatebin.com/dwyksgwqtp
Final script is in my Asset bundle
Download for free
chronoabi.itch.io/procedural-...
You can also follow me on
Instagram : / chronoabi
KZread: bit.ly/2CReUlQ
Twitter : / chronoabi
Discord : / discord
You can Support this channel on patron to get the latest video as quickly as Possible
Paytron: / chronoabi

Пікірлер: 51

  • @FoxYTS
    @FoxYTS4 жыл бұрын

    I love your tutorials! If you could follow this tutorial with more episodes it would be great You deserve more recognition than you have :)

  • @philliam111
    @philliam1113 жыл бұрын

    thanks dude you got a great style of teaching, keep doing what you do!

  • @aspsoftwarelab
    @aspsoftwarelab3 жыл бұрын

    Thank you for your explaining the procedural generation so detailed. Your tutorials are very good. Thank You :-)

  • @octavianvonspitzbergen8561
    @octavianvonspitzbergen85613 жыл бұрын

    Loving it!

  • @fearlesskalsi
    @fearlesskalsi3 жыл бұрын

    Finally a good beginner friendly procedural generation tutorial. Hi ChronoABI, I am a huge fan of Terraria. Can you make tutorial on how we can make Terraria like game in unity?

  • @confused_beekeeper
    @confused_beekeeper3 жыл бұрын

    Fantastic videos. Will you make a video on adding a player with a collision box into these rand gen worlds? I spent an entire day figuring out how to add water pools to the world you showed. It looks great on my computer, and I want to have a player to be able o interact with the world.

  • @decidev
    @decidev3 жыл бұрын

    A quicker method to modify the script to set a tile map is to change up the spawn object function to this: (also make sure to change the gameobject variables to tilebase variables and add a tilemap variable) void spawnObj(TileBase obj, int width, int height) { tilemap.SetTile(new Vector3Int(width, height, 0), obj); } Thanks for the tutorial bro!

  • @ivangelium6348
    @ivangelium6348Ай бұрын

    Thank you, you like godsend for this stuff

  • @zanspl
    @zanspl3 жыл бұрын

    Awesome, thank you very much for the tutorial, at first it seemed a bit fast but once i slowed it down it was perfect :D

  • @chronoabi

    @chronoabi

    3 жыл бұрын

    Thanks bro and BTW the next video will also be about procedural generation. It's an improvement of this video and I am using rule tile for that.

  • @zanspl

    @zanspl

    3 жыл бұрын

    @@chronoabi i will deffinitly take a look at that too + the caves, i cant wait :D

  • @MrCrompz
    @MrCrompz3 жыл бұрын

    Good, but I couldn't add tiles... When i clicked create the tile option was not there

  • @marcos.driguez
    @marcos.driguez3 жыл бұрын

    amazing!

  • @Ahmed-ic9ft
    @Ahmed-ic9ft4 жыл бұрын

    could u please make another episode and continue this, it would be cool to see some rule tiles where something like grass adapts and fades in with its neighbour tiles also a simple building mechanic like placing and breaking tiles. btw awesome content!

  • @chronoabi

    @chronoabi

    4 жыл бұрын

    Yeah I am thinking of making that so stay tuned

  • @marcos.driguez
    @marcos.driguez3 жыл бұрын

    Great tutorial !, thank you very much for your help. I was wondering how I can add procedural caves in this type of terrain, if you can, help me please.

  • @Mainini35
    @Mainini353 жыл бұрын

    this is cool but how do you add a box collider for your game

  • @probujerysowac8515
    @probujerysowac85154 жыл бұрын

    Hi, I love your tutorials, and I have a question, could you make more tutorials about enemy attack, this will be really great, like when the player is in a range of the enemy and then the enemy is attacking the player, or something with animations. I really like your explanation and I'm looking to see more tutorials. :)

  • @solicity1785
    @solicity17854 жыл бұрын

    hey nice video but i have a question.It allways generates at 0,0 and i was wondering if there is a way to script it so it will generate somewhere in the world space other than default since my character is not in the canvas but it generates in the canvas instead

  • @tiagoandrade605
    @tiagoandrade6054 жыл бұрын

    Hi, great tutorial! I just started with this process (newbie) and I am wondering how to replace the tile color (e.g. green) to a real texture png file (e.g grass texture). How to do that? Thank you!

  • @chronoabi

    @chronoabi

    4 жыл бұрын

    In the sprite section where I put a white colored sprite and the changed the tiles color to dirt color. Instead of that white colored sprite put your own texture that your made for dirt or something then change the color back to white

  • @joaodeespartan228
    @joaodeespartan2283 жыл бұрын

    how can i put blocks under the predra block or put minerios scattered(i newbie)

  • @PK-se2jh
    @PK-se2jh2 жыл бұрын

    thankyouuuu

  • @zed8970
    @zed89704 жыл бұрын

    your videos are really very awesome. can i use this method with 'spriteShape' feature in unity to make the upper portion smooth like in the alto's adventure game?

  • @chronoabi

    @chronoabi

    4 жыл бұрын

    Maybe but I have never done that so I don't know😧

  • @AryanShahGamingMusic
    @AryanShahGamingMusic3 жыл бұрын

    Do u know how I could make a 2d rpg world made of tiled generate automatically?

  • @adeshrai3042
    @adeshrai30424 жыл бұрын

    Wow i like ur tutorial sir. Would u teach us more. Sic fi genre BTW SIR AM LUST IN Ur ENGLISH. SO beutibeutifulla

  • @chronoabi

    @chronoabi

    4 жыл бұрын

    Ha GAAAAAAY

  • @adeshrai3042

    @adeshrai3042

    4 жыл бұрын

    @@chronoabi 😘😘babyyp🤣

  • @gamerninjask6746
    @gamerninjask67463 жыл бұрын

    exist some way to transform this to 3d?

  • @eboatwright_
    @eboatwright_3 жыл бұрын

    How would I integrate little water pools at the surface with this system? Please help

  • @thezodiac8973

    @thezodiac8973

    3 жыл бұрын

    I think youd need a line of code to check neighbor tile and add a percentage chance to spawn water tile if it's neighbour tile is water

  • @eboatwright_

    @eboatwright_

    3 жыл бұрын

    @@thezodiac8973 Yeah. I figured it out. Thank you though! :)

  • @chronoabi

    @chronoabi

    3 жыл бұрын

    I am really sorry , I am out of town and don't have my pc that's why it sucks that I can't help but please share how you did that cause many people wanna know how to do that. Thank you in advance :)

  • @eboatwright_

    @eboatwright_

    3 жыл бұрын

    ​@@chronoabi It doesn't really perfectly, because it doesn't keep the water contained but, what I did basically is I had a bool called "lastBlockWater", an integer named "waterLevel", and an integer called "waterProbability". So when you set a block to grass in the script, I just put a if(Random.Range(0, waterProbability) == 0) then instead of grass put water. But if it wasn't 0 then put it to grass. but inside the if() brackets, I set lastBlockWater = true; Then the next frame in the loop it checks if the last block was water, then it increases the probability for water, and sets last block water = false. That's basically what I did, but I can put a script if you want it.

  • @thezodiac8973

    @thezodiac8973

    3 жыл бұрын

    @@eboatwright_ to contain the water I wonder if you store the previous tiles height and subtract it from the present... If it's greater than 1 I would spawn the water until it becomes less than one🤔

  • @chronoabi
    @chronoabi3 жыл бұрын

    Hey follow me on Discord. Link is here discord.gg/78q3HFnb69 You can ask for help , post what your working on and get motivated , show your funny bugs and memes and more.

  • @brettrogers4208
    @brettrogers42082 жыл бұрын

    apparently you can't make tiles in unity anymore making this tutorial old.... Found a work around !

  • @jooj_kk
    @jooj_kk4 жыл бұрын

    how to add collision to the tilemap?

  • @chronoabi

    @chronoabi

    4 жыл бұрын

    You can use tilemap collider component

  • @keventy6114

    @keventy6114

    3 жыл бұрын

    You can also set your tiles so that they won't use the tilemap collider he mentioned if you don't want it to for whatever reason. At around 4:20 in his tutorial, when he is showing creating a tile, the Collider dropdown box is in the Inspector. For example, if you apply what he taught to add decoration to your scene, not having that tree/rock/hut with collider could come in handy.

  • @squeakerboodle
    @squeakerboodle2 жыл бұрын

    Does anybody know how to generate colliders with this?

  • @plusplusgames

    @plusplusgames

    2 жыл бұрын

    Add A tile map collider 2d to the Dirt, Grass and stone

  • @squeakerboodle

    @squeakerboodle

    2 жыл бұрын

    @@plusplusgames already tried that, doesn't work

  • @plusplusgames

    @plusplusgames

    2 жыл бұрын

    @@squeakerboodle Did you add it to the grid

  • @isimsizanimator1291
    @isimsizanimator1291 Жыл бұрын

    pls update your totruial

  • @nno64209
    @nno642093 жыл бұрын

    How to made Biomes?

  • @nno64209

    @nno64209

    3 жыл бұрын

    *make

  • @blockhead7168
    @blockhead71682 жыл бұрын

    unity finally crashed when i tried to generated 60 million blocks lol

  • @adeshrai3042
    @adeshrai30424 жыл бұрын

    are waaa Lolo kto ko pragati 🤣🤣