Unity Tutorial: Animated Tiles

I just wanted to share how to animate a tile for a tilemap. If you already know how to do that great job, If I am making this process more complicated than it should be please let me know. 

Okay, so I knew that the new beta version of Unity had the ability to animate tiles for the tilemap feature but I was unsure how to do it. After doing some digging I found out a few things. First, I had to download some code from GitHub to enable the features and second you had to make a special tile called an Animated Tile.

The tutorial that follows can be used for animating any tile but in this example will produce this…

Things To Download

I will be using the campfire sprites from the Roguelike RPG Pack that Kenny has bestowed upon us. That asset pack can be downloaded at the following link https://www.kenney.nl/assets/roguelike-rpg-pack or you can just download the two sprites we need right here

The other file that you need to download is called 2d-extras which is located on GitHub at this address https://github.com/Unity-Technologies/2d-extras

First

Open Unity and add the unzipped 2d-extras file folder to the assets folder of your project. After adding the file folder give it a few seconds to compile. When the loading bar at the bottom goes away you should be ready to use your new feature.

Second

Right-click your project hierarchy and add a new Tilemap by going to 2D Objects > Tilemap

Third

Right-click your projects asset folder and create an Animated Tile by going to Create > Tiles > Animated Tile 

Fourth

Open up the inspector for your new Animated Tile. Add the first campfire sprite to Sprite 1 by pressing select and locating the sprite. Do the same for Sprite 2.

Fifth

Add the newly created and edited Animated Tile into your Active Tile Palette by dragging the Animated Tile from your assets to the Tile Palette.
Paint your new campfire tile into your scene. 

Sixth

Press play and watch the fun begin. If your animation is to slow then you need to click on the Tilemap in the Hierarchy and adjust the Animation Frame Rate. In this example, I am using 5 as the rate.

My First Sprite Sheet and Game Progress

So, I have been gone for a while and I just wanted to put my story out there as to why. I am not one to blog or use social media but in today’s world that will hold you back if you do not learn to adapt.

First off I wanted to talk about the new skill I learned. Just last night I created my first sprite sheet!

It is a very simple design but it helped me get through this slump I have been in and I wanted to share it with the internet just in case it could be useful to someone out there.

My First Sprite Sheet!

Here is the sprite sheet being used. 

I would like to thank MortMort on YouTube for creating a great tutorial which I will link in this blog post. 

Onto my second topic, my current game development situation. I, unfortunately, bit off more than I could chew. I did the exact thing that everyone from the industry said not to and I tried to create something that was way too big in scope.

After months of overthinking, redesigning, adding, and removing ideas from my project it became too much for me to handle and I quit working on it. 

My wife has been a huge inspiration to me and without her, I would not have been able to get through that weird block type thing that was happening to me. I call it a block but I am not actually sure what was going on. What I would do is think of a mechanic to add to my game, I would work on it for a few weeks but ultimately lack the ability to execute it correctly, scrap the idea, think of a new one, and continue the cycle over and over again. 

Well, the time has come for me to start this thing up again with a smaller scope which will be more in tune to the skills I currently have. I am basically Porky Pig right now in the sense of not being able to say a word because of a stutter so instead, I will say something that is close enough.

Thanks for listening to my rambling. Also, thank you for taking the time to drop by 🙂 There isn’t much here but I am changing that going forward. 

See you around.