GameMaker Studio 2 - How To: Animated Tiles

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to the next in our series of how to's with game maker 2. we've been looking at tile sets and today we're looking at animated tiles within the whole subject of tile sets and we're going to be making this little torch icon here which brings this whole scene to life and it would be pretty dull without this torch and in fact is pretty dull with this torch but you can see how you could make some amazing little effects just by a subtle animation here and there now there are some caveats to this and some constraints but we will look at those so let's get on with it ah but first i will show you the sprite in photoshop here it is we have the transparent square 32 by 32 which game maker requires and then we have eight images for the the torch and that ends up like this so let's get on and make it okay so we're here in game maker the first thing we're going to do is add a sprite so the one that were looking at just a second ago and we will call this torch now we're not importing it as a series of frames we're just importing it as one sprite it's kind of like because it's going to be a new tile set so click import animated torch which i exported from photoshop earlier and here it is as you can see just one frame there's the empty square there's the eight images now we don't need to do anything else with that the next thing we do is we create a new tile set now you don't necessarily need to create a new tile set you could have one giant tile set and just cherry pick the images from that you can have animated images on that you can have static images on that much like our tile sets before and and i did actually try it with this with this torch i put the torch on the tile set itself i can actually i'll actually show you that so i put the torch on here it didn't really translate too well at the time because it was actually 32 by 64. um but in theory you can let's say you had a torch 32 by 32 you you can do this and you can create a tile animation from this tile set using these squares but now today i will not be doing it i'm going to create a new tile set so it's kind of all fresh and clean and all that kind of stuff so let's call it tsl animated and let's select the sprite the torch sprite there it is uh 16 by 16 let's change it 32 by 32 that's better okay so that's essentially done um now we can create the tile animation which so here there is some of the constraints here you've got to have an even number of frames so i made it so i have eight uh i think this is all to do efficiencies and optimizations and stuff like that so you just have to work with it i'm afraid i'd make sure that the tile size is the your game tile size don't have weird tile sizes make sure they're all the same tile size okay so we'll choose eight frames and we like the auto tiling we just have to select these eight frames so let's do it one two three four five six seven eight uh it said at 15 frames per second you can play it to see what it's like i think that's good enough and it's gonna appear in the library when we actually go into our room and we select the libraries tab it's going to appear as a library it's kind of an animation library i don't want it to say animation one because that's that's a terrible name so i'm going to call it um torch because that's what it is so i'm going to close that now i have a tile set with an animated tile okay so tsl animated so we need to create a layer in the room let's do that above level four and let's call uh level four animated let's select the tile set the new one that we just made tsl animated there it is i might put that in the middle and make it a bit bigger and i also might just because this old one was there and we get rid of it so select the right layer that you want and we don't want the tiles tab we don't want the brushes tab we want the libraries tab because the libraries tab contains the animated tile the tiles tab just contains the separate tiles and this is completely useless in terms of the tile type because these are separate frames from one animation so you don't want to paint these on i would think so go over to the libraries tab click on the torch you should be able to add it let's add it here and yeah literally run the game let's see what happens and there you have it that's it so you can create your own little animated tiles don't go mad on it but i would suggest a few subtle animations to bring your level to life and i could i could look at this one for the next i don't know a few minutes at least because it's very cool anyway that wraps up tiling we've covered tile sets we've covered auto tiling we've colored brushes and we've covered animated tiles so now you should be able to complete your level using tile sets and all the other techniques so we will see you in the next how-to thank you you
Info
Channel: nexgenstemschool
Views: 691
Rating: undefined out of 5
Keywords:
Id: lf7GaDFtFHU
Channel Id: undefined
Length: 7min 32sec (452 seconds)
Published: Sat Oct 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.