[Gamemaker Studio 2] Turned Based RPG Tutorial Part 3: Tiles & Foliage

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone this is sniper ninja and welcome back to my turn based RPG tutorial in game maker studio 2 in this part we will be implementing tilesets decorations and an autodialer and on that note let's begin first create a new create a new group in sprite name this background not create a new sprite name this svr grass tiles import a new sprite and import grass tiles now create a second sprite and name this SBR grep pack tiles import path tiles now we're going to create some our foliage str grass and an image import strip image grass 5 frames per row 16 by 16 all right now Center the image to bottom Center and finally create SPR 3 at an image of don't have an edit image import and tree dmg and center at the bottom center now go to collision mask and change the mode to manual you want to set left to 8 right to 20 to top to 17 and bombs 31 before we are done here go back to svr wall edit the image and delete it now what we want to do is that when we edit our room we want to make sure that when we do that we can still see the tiles we can all still see the objects we handle this with transparency set the Alpha to 160 and then fill it with a black alright we are now done we are now going to set up the auto Tyler create a new tile set and name it TS grass set the strike to grass tiles and make sure the towel with some tile height is 16 by 16 now go to Auto tiling create a new 16 Auto tile basically how Auto tiling works is that first we want to click this here alright now what we want to do is that basically with Auto tiling the white tiles will be the tiles that have collision and me and the gray tiles will be the ones without collision in this case grass so to do auto tiling imagine that the part with collision is the brown part that is the part with collision so in this case we want to add in this corner these two corners here since we want the white part to be the collision we need adding the brown just make sure that the brown has white touching it and the white doesn't if you're doing that you're doing it right you now create another 16 Auto tile this time we will be using the water in this case make sure the water is being covered by the light in the Auto tile menu and the grass isn't you now tileset dirt will most likely be easier so I was right coupe SVR pass tiles actually we don't want this to be tile set dirt we want this to be tile set path make sure it 16 by 16 Auto tiling add 16 tile set and there should be the same we want to leave the on the great blank and then we want B and we want the white to be covered in the beige sand so where there is a so where there is like white you where there isn't white you want there to be an outline you all right we are now done tilesets you may have noticed that the graph says five different frames of animation and if we place it in the room our grass will switch frames which we really don't want create a new object and name this object graph select the sprite and change it to svr graphs and now add a create event at desc initialize image speed equals zero image in image image speed image index equals c equals ir end or in case if you don't know what bar ng is as as some people like to say it rng stands for a random number generator and basically that's how you determine randomness in game it picks a random number so we are picking a random between 0 and 5 and whichever one it is that's what the image is going to be so that way the grass looks different every time but it's gonna it's going to look diverse now add a step event I know this is uh not the mais but I add if I don't do this update depth depth equals negative Y and now we want to go and create a second object object 3 now we want to set this right to svr tree and remember how we change the collision mask that's because we want our player to collide with the tree just like as it would with an object we do that by sending the parent to object wall so that way the player will not only collide with the wall but it will also collide with the tree now I create a step event and just actually just copy paste the grass's step event because it's the same thing one thing I forgot to mention in the first episode is that if you are using game maker studio one change the Nate name of this room to RM grass zero game maker studio one doesn't support room inheritance so instead just name it RM grass zero but Simpson gate we're using game area to we're going to create a parent and now we immediately want to to delete everything like delete all of the instances and delete the background layer now create a new tiles layer rename this layer to tiles now the thing with the room parent is that you want to make these in game maker studio two if you plan on making a game with a lot of content so we just want to do I'm going to add a tile set tile set grass because we can only set one tile set to a layer which is why we have to make two tiles letters now tis no Paulo tiles work I'm right-clicking right now and right-clicking will add in not tiles which in this case is a be grass top those and adding in and left clicking which will add in wall tiles will add in the walls now with the with the room parent you just want to make it entirely graph so set the size to 40 right click and we're done you want to create another tiles layer and name this path and set and set the tile set the path we just want to do this so that way we don't have to do this for every room one thing you want to do is set your room to persistent this is important in an RPG because we want to keep the same properties make sure your few ports are all good doesn't want to make sure that we can scroll the screen and now I want to create a folder and this will be grass let the grass Sharon inside we want to do is right-click grass parent and click create child now as you can see everything from the room parent everybody will take after I name this rename this RM grass 0 now it will take after everything so that we don't have to set up all this stuff every time we do this now we want to start up I want to move this down here we want to start Auto tiling now as you can see Auto tiling makes things way easier here for making content and stuff like that so here's what I want to do with this here I want to create this little space back here because we might add a little path that goes to a village here later maybe in tips I want to add this here and I'm where we'll put like a room transition over here probably next episode now we want to place some water tiles over here just to make like a little pond alright now that looks good now I want to go to path create some path over here and now I want to go to instances add in some grass and on oh that's not too good that happens sometimes you just need to reflect the Auto tile now I'm going to add a little bit more dress over here here and down there up here there and over here now we're going to add in a couple trees we're just going to have some happy little trees over there there and up here now we're going to go to an add some walls make sure your make sure your rotation is always zero you'll get you'll have some really messy collisions if your rotation is not zero and you actually rotate your objects so make sure you don't do that you want to do it like this that we can save some object space notice one thing left the place in and that is the player I'm actually knocking out this folder anymore because I just realize that folder is actually useless now we want to try a new room we're going to make we're going to make this RMS initialize alright so the reason why you want to create this room is because the way game maker does things is that the first room it will start you in is the first room so it will put you in room grasped parent now what we could do is just go to creation code and set it to change to the first room now I want to put the player in the problem with that however is that it will is that it will inherit and I'll do it for every room if you're using game X to do one you don't need to make this room because you're not using room parents click create recreation code in the initialize room start and change the room to to go to RM grass 0 so that way when we start our game we will change the room to the room we want to start alright we are now done let's run the game to make sure everything works correctly now as you can see there's now a lot more depth to our game it looks a lot better but the walls are kind of are kind of making it look bad so just go to object wall and turn off visible now the game looks really good now before I finish I want to create one more room so that way I have a room to test room transitions in the next episode so I decided to make a little time lapse of me making a larger room hope you enjoy thank you very much for watching this video if you like this video please like subscribe and check out my other social media in the next part we are going to add room transitions and a faaaat effect to our game see you next time bye
Info
Channel: Aidan
Views: 32,463
Rating: undefined out of 5
Keywords: Games, RPG, Tutorial, Programming
Id: 1WXNPMxachI
Channel Id: undefined
Length: 17min 3sec (1023 seconds)
Published: Thu Jul 13 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.