Unity 2D - RPG Tutorial 2023 - Part 01 Adding Background

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and this is a the first tutorial on how to build a 2d RPG using Unity so we the goal here we're gonna try to be as simple as possible very short videos just for you to get a grasp of the concepts and then go in and apply in your own game so I'll put a link in the description but you will need to download unity and once you download you're going to download something called Unity Hub which is basically it's going to hold all of your projects it's going to hold all of the instances of unity so let's go ahead and click new project once I click on your project I get to select where I want to place all of the folders and files there so for me I like to create a folder called code and this is where I kind of keep all of my projects so I'm going to name it tutorial and let's do it actually oh here I'm just going to put it in code and here I'm going to name it tutorial now for the type of game as you can see there are a lot of options I would suggest you just choosing here 2D but you can if you want to do a 3D game you can do it in here there are a lot of different things there are even some projects that you can create that are learning projects that kind of our tutorials I really like doing them as well so anything that you can do to grasp the contact the content and grasp the concepts of unity I would definitely recommend it so let's go ahead and create the project so as you can see it's going to take a little bit of time so I'm just going to pause the video Until It's completed okay so my project has been fully loaded and I'm going to walk you through basically what this is here on this side it's basically all of the objects so all of the pieces of your game they're going to be here on this side if I click for instance in this main camera which is basically what the the player will be seeing I get all the details and this is what the inspector is so I got some details just like there's a camera details section there's a transform section there's an audio listener section so this is basically whenever I click I get to see all the details here on this side I have the folders so there is the assets folder that has the scenes folder there are some other stuff here and here in the console it's if is where any errors will be displayed so um just basically those two parts right here and on this side is basically your scene so basically the world or the your actual game this is where you're gonna build your background on this tab you have game and if you click play this is basically you can play and see what happens in your game so like if I click play right here uh I'm playing the game but basically it's an empty project so nothing will show uh now let's move into adding some background so the first thing that you're gonna need is some assets right so there are a lot of tutorials on how to create your own and a lot of people are very artistic and they like to do that uh on my end I just like to do more of the coding the programming and this is what this tutorial is so for this time we're going to just download a free asset I'm going to link the description but it's a very cool um sort of 2D 16 by 16 pixels tile map that you're we're going to be able to kind of build upon so once you download you're gonna get a folder and in this folder you're going to have this file called Cloud tile set this is where if I double click I get to see this is where all of the little tiles that I need to paint my game will be provided so let's go let's go ahead and let's add them to Unity I'm going to click here these are my files but I want to organize this so I'm going to click here I'm going to click create and I'm going to select a folder and I'm going to call that art and that way I'm a little more organized on my files under art I can even go ahead and create another folder called floors or background whatever you want and then inside this folder I can go in and I can drag my cloud tile set great so one step done now once I click on my cloud tile set file there are a couple of things that I need to do in order to use it in my game the first thing you notice here under Sprite mode you can see it's set as single that means that basically they're taking the entire file and they're making it one block so I want to move it to multiple so I can break this down because there are more than just one block in this file I'm going to change the pixels per unit to 16 and don't worry too much about it but there are a couple of options too to increase the quality this is the filter now mode you can set it to point or no filter and then compression I put it to know don't worry too much about this this is just for quality purposes um yeah it's just a good practice let's click apply done and now let's break down this block into multiple blocks so I'm going to click on Sprite editor and this will appear and now as I can see if I click through nothing happens if I click on slice then I get to slice this there is this automatic feature I don't think it's going to work for this so let's change to grid by cell size and let's change this to 16 by 16. now you can see that oh let's click slice now as you can see every time I click let me zoom in I actually broke down this file into little boxes so super helpful for us when we decide to start painting things so I'm going to hit apply and voila if I click on this Arrow to expand my file I get to see that every single little block has been created and broken down for me so let's get to work now let's add our background and the way we do it is we click over here a 2d object a tile map rectangular and I'm going to call this background so basically this is the background of my game as you can see this is empty we need to basically oh and by the way this is a good example it's right here back in the scene so now that I clicked background it's displaying it right here and now let's paint this but in order to paint this we need a basically a palette of um all of those little squares that we're going to paint it so you can think of it kind of like a an actual palette and this is basically what we have to do in order to paint our background so I'm going to click window and I'm going to open up one more of these little tabs and this window is going to be the 2D tile palette and it's right here if I click on it I can drag all the way to right here this is where I personally like to keep it and this is the tap that's going to display all of my tile palettes so let me click next I mean let me click new I'm going to create a new tile palette and I'm going to call it background and I'm going to hit create it's going to ask me for a file a folder to put this in I'm gonna put it under assets I'm going to create a folder and I'm gonna call it tiles again just to organize your code and once I click here this is the file that I'm going to select great so it's called background now let's drag and drop this file into the tile palette background again it's asking me to select the folder I'm going to select the tiles folder I'm going to click next this will basically import all of those little uh uh little squares into my tile palette might take a little bit great so now that my tile has been created I can see here under background that all of my little squares have been added to my palette which is really good so I can click here uh and I can start painting my um my scene my game a couple of options for you to be aware this one will paint one at a time so if I click kind of go in and I paint it like this this one will do sort of a drag and drop where I can do kind of a ton of those one will kind of select a color this is to delete so if I do this it's my Razor and Etc I think those are the main ones that you're going to need um let's for you a couple of options you can select more than one so you can paint you know more than just one tile and then there's also um yeah this it kind of looks weird like the first time I saw this was kind of in complicated to understand basically it takes a little bit of time but eventually you get to build your whole game based on your experience so basically it takes a little bit of time that's what I'm trying to say to learn and to get good at it uh one good thing to do is to always look for inspiration so one thing that I always do is I look at an image that is done so let's something like this and then I try to go in and I copy it that's usually one of the best ways to do it uh and so yeah let's kind of do something like this this oh let me use this one and just add something like this right here uh uh great so now if I click play my game I get a scene that does kind of display partially what I've created so I'm gonna pause the video right here and please try to do this remember creating the background creating the pot tile palette and then painting it and we'll see you in the next video thank you
Info
Channel: EPICALUX - Game Dev
Views: 150,934
Rating: undefined out of 5
Keywords: Unity tutorial 2023, Unity tutorial, 2D game development, 2d rpg game development, Unity Tutorial 2D rpg, Unity basics, unity tutorial basics
Id: Ts9JzLo6zII
Channel Id: undefined
Length: 12min 1sec (721 seconds)
Published: Sat Nov 05 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.