Learning little by little: Sprite Sheets

I felt like I didn’t accomplish enough yesterday to warrant a blog post on my progress, but today was great.  I finally figured how to make my own sprite sheets using an art application and then transfer it into Unity and edit it futher in detail.  Sprite sheets are a collection of images that show how a particular item, character or object in a game has changed.  For example you might have a door that is closed, slightly open, and completely open.  Three stages of a door represented by three different images. Sprite sheets can be useful for setting still images on your level or if you wanted to make a quick animation.  I’m taking a Udemy course to help me get the fundamentals of Unity and I’m enjoying it, but as I saw yesterday, sometimes progress can be slow.

Sample sprite sheet of vechicles

What Happened

Yesterday I was trying to import multiple sprites at a time into Unity… I struggled.  This was a real struggle fest in that my images would appear in Unity, but for some reason Unity believed my collection of images was one big image.  I didn’t realize it until I watched my class lecture multiple times.  Apparently the distance between my sprites designated by transparent space wasn’t large enough for Unity to register multiple images.    Once I figured out how to add any type of sprite from my sprite sheet into a game, I realized I could save so much time.  Now something that took more than  an hour to understand, will now just take me 10 minutes.  The sprite sheet below will show you what I mean by having transparent space between images in your sprite sheet.  If the transparent space isn’t big enough, Unity will think you’re inserting a large picture.  Note:  These images do not represent the final product for my first game, they were just used for a test run to understand the concept.  These are bricks that show damage over time.  I am not using these in my final game since I borrowed the top sprite from my course for practice.  The bottom three images were created by me.

Learning how to use a Sprite Sheet in Unity: Remember transparency is key.

As I keep proceeding with game development, I know I will encounter more road blocks along the way, but I’ll keep on trucking.  This Tuesday I’m hoping to show off a draft one of my levels for the game with a completed Jason brick model that reacts to hits.   Let’s see if I can pull it off.