Tiles | Farming RPG Tutorial: GMS2 [4]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys so today we're going to be importing some art assets like for the grass and buildings and we're going to be playing around with tiles so we're going to import our tile sprites so going to create two new sprites import this is where mine are saved so we're going to import this sprite right here I'm going to call it SVR tile terrain this is the sprite for the tile set that we're going to create here all right and it's create the second one to SP our tile cottage crepe and we'll import don't want to and then we're going to create the corresponding tile sets I'm going to call this tile terrain and we select our terrain sprite and same for this one cottage and select that one so we're going to just change one thing here and then I just want to show you how tools work we'll explore all these a bit more in a second but we just have to change the width and height of the tile so it will default to 16 but our ones are 32 by 32 there we go and you can see at the top left-hand corner the very first tile if kind of it's not counted we can't use it so just keep that in mind don't put anything that you need there and we'll do the same for the terrain so change it to 32 by 32 call n we'll come into the room we can get rid of actually this hideous thing though because we're not going to need it for the player anymore and we don't need a background delete it virtually don't need this background layer either and we're going to create a new tile layer and let's assign this to the terrain so now we come over here we can use a tile to kind of paint onto our game world and this is cool because we can have as many different squares that look exactly the same but they're all using just the same sprite here and up here we can change the brush size let's just fill in the whole room and you can see our players have disappeared and our NPCs have disappeared that's because the tile layer right now is above our instances layer so if you check its depth it has a depth of zero whereas our instances they have a depth of 100 so stuff at the lower depth actually appears closer to the screen so if we drag this above it it's going to change its death to be zero and this to be 100 and they're going to be closer to the screen so if it doesn't quite make sense to you just picture yourself let's say in a field and if you look off into the distance maybe about ten meters away I'd say that you can see a couple trees and then much much further than that on the horizon you can see a mountain lines so those mountains are far deeper in your view they have a depth that is very high and the trees their depth is much lower so exactly the same the lower your depth the closer you will be and the higher your depth the further back you're going to be in the game world all right so let's create another tile layer and I'm also going to assign this to the terrain and let's draw a little path so if you click and then drag you can select multiple sprites and then you can paint on like that so this isn't a great-looking path right there are these holes in between them and wouldn't it be really nice if we could get it so that we can just kind of draw a perfect part and we can actually do this using something in the tile set called Auto tiling so let's quit this and that's come to the terrain spray and so over here there's a couple things we can do so the brush builder it's kind of like before when we are dragging over multiple sprites so if I maybe select all of these sprites and then click onto it here this is going to treat this tree as a brush so that if we come back into the room and come into brushes right here if we click this we can place whole crease and you can just you know do that yourself by doing this but you know that's all there if you want it I'm just going to delete this so I'm going to erase it and when I hit E and erase and I'll just close out this okay so that's the brush buildup now another thing that we can do is make tile and emotions so if we click that and let's add an animation so we'll just make it four for now let me just come down maybe to this water so let's click here for the first frame for the second frame let's make it this one so the third frame we'll make it that one and we'll go back to the water now let's preview this so we've got some bubbling water or something so if I come back to the room again and here and I come into libraries the animations library and I click this if I run the game or actually we can actually just preview the game world here you play we can see our little animation so you can have animated tiles like this I'm just going to tell you all those because they look a bit odd get rid of this but if you want you can have a look around or you can import other assets and build animated tiles in this way but the one I'm most interested in doing is the Auto tiles okay so again let's add a new one and I'm going to make two so I'm going to make a grass one and a dirt one so the way that we do this is you have some match the template to the corresponding tile that you want here so this completely white one is going to be the tile that's completely filled in so for us for the grass that's going to be this one and then here it's going to be orbit filled in except for the top-left corner so here that's going to be this one and then the same for that that's going to be this one that one and we just keep filling it in like this so we don't really have one that's exactly like this so I'm just going to make that one okay and this one come on we go and we're just going to need a blank I'm going to bake that one because it's entirely blank okay and let's call this order tile grass actually this is cool it Katy grass all right and let's make another one okay any tea that and again so the one that's completely filled in that's this one that one's going to be there and we hold it in exactly the same you alright so the Sun will come back to the room and now if we come to libraries here are Auto tile so if we click the dirt one and we start a paint you can see that we can start making a perfect path now this isn't working perfectly because we're missing a couple of the sprites so you can see here when we have a sort of Junction it's just using that placeholder one I kind of put in so if that happens you might just have to go and fix it up yourself and just as a note I think for making a path it looks better when the dirt is beneath the grass if we just drag this one over there and then we'll erase where the pathway so hit E and I'm going to increase this to three we just get rid of some of this grass like that and I'll fill it in yes that you can see it looks better okay so I'm going to have I'm going to try and keep a lot of my tile layer separate so I'm going to have specific layers for the grass and then anything beneath the grass I'm going to have one foot like buildings and stuff like that and I'm going to organize them in a really specific way so I'm going to set up some folders and some tiles and I want to show you why it's important to do this because your project can quickly become cluttered if you don't do something like this so I'm going to go the four folders that I'm going to have we're going to have one called terrain this is where will a grass and our paths are going to be and then I'm going to have level one this is going to be everything on top of the terrain so all of the objects if we have barrels or chests or anything the first level of any building it's going to be in this alright and now for another one because I'm going to have two storey house some have level two and also going to have a level three but this is just going to have the roof all right so we can drag these two into the terrain and this one into here and we call this one key for terrain underground once and T ground one so here I'm going to have this is going to be the building so this is going to be L one building I'm going to create another one and this is going to be L 1 decoration so so these decorations are kind of going to be anything that will be on top of the building but still part of the building so something like a window so it'll look something like this and finally we're going to have on level one we're going to have objects so these won't be part of buildings these are just going to be like you oops any chests or barrels or any of these kinds of things that we're going to place so for example we just put this here so this is just to show you how things are going to be layered so you can see these barrels they appear in front of the house alright so moving on in level two we're going to have cell two building again so cottage we're going to have L 2 decorations so again for windows so let's just put a window and I'll put a little building and finally l2 roof and this is kind of the roof that will be here and then we'll have another roof up the top so I'm going to put this on the bottom sign this to the cottage and I'll just put one to show you like this all right and finally in level three we'll just have the very top roof like that okay so one last thing you probably notice our plays and everything you disappeared I want the players to always be in front of all the buildings but when we walk up to them we appear in front so we're going to put them in front of the terrain and also in front of the buildings but because people are quite short they're going to be under anything on level two so if you're walking behind this here you can see that we'll be behind anything on level two but we'll come in front of everything on level one so this kind of gives us an illusion of depth so if we're ever passing under a roof or anything it's going to make them appear beneath it and we can do a similar thing with treetops so they'll have the trunks that the players can walk behind or in front of but they'll always be pinned needs the treetops but we'll probably do things like trees and things a bit later all right so that's what we need to do to start growing so you can start building up your farm this is your chance to get creative you can increase the room size I'm just going to keep mine as it is we can also just change it later so take as long as you want on this I certainly take a while to do this kind of thing so I'm just going to do a little time jump in the video so that you don't have to watch me for hours so I will see you in a bit cute I'm done so after all that this is what I've got I'll just quickly show you all all of my different layers so the cool thing about this is we can hide different layers or we can hide whole folders by clicking this so you can see for my terrain for my grass that's covering most of this and then underneath this I've got a path here and then if I come up to level one this is where my objects and cows are so if I hide the objects you can see that's everything I had in my object line that's my house so if I hide level two that's my little houses and just level two and the roof so now if I just run the game let's see what that looks like okay if I walk around you can see I don't have any collision up but if we come under the house like this you can see that moving under the roof that's exactly what we want and at the moment so we're moving in front of objects but if I go behind though it's not like my player disappears behind forests or anything we'll be doing that in another video but for now I want to set up some basic collision to prevent our player from moving behind objects so what we're going to do is come up here and we're going to create another instances layer and I'll put it above this one so remember that object that we've made we've actually already set up collision and what we can do is drag this object into here and we'll call this layer collisions and we'll drag this object into our little world wherever we want the player to collide so for the little building here I'm going to make it about this much and we'll just approximate like this at the moment it's snapping to the grid so if you want to be more precise about it you can click that off or you can just turn off the snap and so you can pick and drag and make it precisely around the things I'm just going to make it a bit quicker for you so something like that and we can even do the same for the pond to prevent the player from moving into the water like that all right so now if we turn off the collisions layer if we make it not visible then that's not going to come up in the game and we'll just have a sort of invisible barrier so now have you run the game and we try and move into the house but collusion setup and we can't do that all right so that's about it for today I'd love to see what everyone else has done so if you've made a project and you've spent a bit of time doing up your little file be sure to share that in the comments I'd love to see it and I'm sure everyone else would too or if you found any other assets on something like urban game ax and you want to share that with everyone else that would be great too so I hope it's helped and I'll see you guys next time
Info
Channel: FriendlyCosmonaut
Views: 42,201
Rating: undefined out of 5
Keywords: farming rpg tutorial gamemaker studio 2, tiles gamemaker studio 2, tiles tutorial gamemakerstudio 2, tiles gms2, autotiles gamemaker studio 2, autotiles gms2, autotiles gamemaker, autotiling gamemaker, rpg tiles gamemaker, rpg tutorial gamemaker, rpg tutorial gamemaker studio 2, gamemaker tutorial, gamemaker studio 2 tutorial, gms2 tutorial, game maker studio 2 tutorial, gamemaker, tiles farming rpg tutorial, friendly cosmonaut, friendlycosmonaut tutorial
Id: 0_KrTYAuCus
Channel Id: undefined
Length: 16min 37sec (997 seconds)
Published: Thu Jul 20 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.