banner



How To Animate In Gamemaker Studio 2

Animated Tiles

Tiles are generally considered to exist static cells within the game room, however with GameMaker it is possible to animate them, just equally you would a sprite. Why non just employ sprites, you ask? Well, sprites have a sure processing overhead due to them existence associated with a bounding box and the way in which they are rendered, but tiles have a much lower processing overhead and so are faster to return. This does come at a price yet, in that with tile set animations you are express to creating animations that must be a power of ii in length - ie: of 2, 4, 8, xvi, etc... frames - and they must patently be created within the tile filigree, and they must all animate at the same speed (on a per-tile set basis). However, even with these limitations, blithe tiles are a powerful feature that can be used to add together life and colour to otherwise static environments and backgrounds.

To create a tile animation you must get-go have a tile set that has the required tiles all within the one sprite image (but not as sprite frames, so a single large sprite frame with all the animation images within it), and and so in the Tile Set Editor you click on the Tile Animation button to bring up the Animation Editor:

Tile Animation WindowThe case image to a higher place is a unmarried image with all blitheness frames contained within information technology, but it should be noted that the image could also contain other non-animation tiles besides, since you lot tin use a unmarried massive tile set then "cherry pick" the parts of it that you want to create the animation from. For example, you could have a large landscape tile set with copse, earth and water, and inside the tile set have multiple tiles to be animated to make the water ripple.

To create a tile animation you first have to add an animation to the animation library past clicking the Add together Blitheness button Add Animation Icon, which will add an empty animation strip to the library and request that you select a number of frames to be used:

Add AnimationY'all will and so be presented with a view of each empty animation frame, with the initial frame highlighted for you:

An Empty AnimationIf you and so go dorsum to the tile set up epitome on the left of the editor you can click LMB Icon on any tile to add it into the blitheness and the frame will advance to the next ane. Clicking LMB Icon on successive tiles volition fill up the blitheness, which you can then preview by clicking on the "play" button abreast the frames:

Add Animation FramesIn one case you have done that your blitheness volition get part of the animation library and when yous enter the Room Editor y'all can select information technology and place it within the room. Note that if you select whatsoever of the tiles from an blitheness to place in a room, that tile volition animate from the selected tile onwards, so y'all can "desynchronise" an animation by placing divide frames within the room and they will all animate. The only caveat to this is that the animation speed will always be the same, since it is defined for the whole tile gear up and not individual animations within the library.

A few things to note about tiles that are being used in animations:

  • If the tile has its own blitheness specified (and so at that place is an animation where information technology is set up every bit the kickoff tile) and so it will utilise that animation.
  • If the tile doesn't have its own blitheness only is used in only ane other blitheness, so it will apply that animation starting at the first position that tile is present in the animation.
  • If the tile doesn't have its own animation and is used in multiple other animations, then information technology volition not breathing at all. Yous will need to explicitly specify an animation with it as the first tile.

Source: https://manual.yoyogames.com/The_Asset_Editors/Tile_Set_Editors/Animated_Tiles.htm

Posted by: millersathimpiou.blogspot.com

0 Response to "How To Animate In Gamemaker Studio 2"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel