How to Make a 2D Sprite in Unity

Hello, world. In this tutorial I will be describing the steps to making a video game sprite of your very own.

  1. Download a portable version of Inkscape to your file on the c drive  from https://inkscape.org/en/download/
  2. Now, this step is extremely important: open Inkscape. 
  3. Next let’s start with the head. Use the circle tool. 
  4. We can edit the head using the Fill and Stroke window. Open this with Shift+Ctrl+F.                                                  
  5. Now let’s make a body. First make a new layer below the head. You can open the Layers window using Shift+Ctrl+L. 
  6. Use the Bezier tool to make a rough shape. It does not have to be perfect, here you can see mine is anything but. 
  7. Using the Edit Path By Nodes tool you can edit the line work. Now it will take the shape you want.                             
  8. If you don’t want the body to have the same style as the head then go ahead and make it however you wish. If you do want it to be the same, first copy the head (Ctrl+C) and then paste the style (Shift+Ctrl+V). 
  9. Using the same tricks you can build up the rest of the sprite, and keep the parts on different layers. You can group shapes together (Ctrl+G) or use the various path options (top ribbon) to form more complex shapes.  
  10. Now that you have your basic sprite, let’s make the sprite sheet. We’re going to make this little guy dance. Copy your sprite a few times. You need to copy the parts separately to keep them on the right layers. 
  11. Edit the parts just a little bit. Move a leg on the second sprite, move it back in the second, etc.                                         
  12. Make sure that the sprites are not touching each other. Highlight the whole sprite and keep the squares from touching or overlapping. 
  13. Export the file as a png (Shift+Ctrl+E). Make sure you are not highlighting anything when you do this. If you open the sprite sheet in images and the background is transparent then you did it right.  
  14. Now open your game in Unity and have the sprite sheet pulled up in the folder. Make sure you have a 2d game. 
  15. Drag the sprite sheet into your empty game object. If you do not have an empty game object, then make one. It’s Ctrl+Shift+N. 
  16. Open the sheet in inspector mode. Make sure it is multiple, not single. 
  17. Open the sprite editor. Slice your sprites. You should now be able to open the sheet and have each sprite individual.  
  18. Set up a animator. Create your Default Layer State. 
  19. Select the sprites and make an animation. Do this by highlighting your sprites, right clicking, hovering over the ‘create’ option, and clicking on the animation option.                           
  20. Once you have your animation, make sure to make it loop. Select your animation, open in inspector mode, and check the loop time box. 
  21. Now that the animation is finished, open your default state in the animator.                                                        
  22. Drag your animation into the motion box. You can edit the speed of the animation just below it.                                
  23. Drag the animator into your game object. 
  24. Make a sprite renderer in your game object. 
  25. Play your game. The sprite should appear and be animated. If it is not, then you did something wrong. It’s okay to cry at this point. There is no shame. Do it. I know you want to.

Animation Tutorial

Below are pictures to my process in creating sprite animations in unity with captions to help you step by step. I made my sprites in adobe illustrator and photoshop. Keep in mind that you need to save copies of the files as illustrator, photoshop, and .png files just in case you need to edit, or reuse the files. Click on the photos for a full view of the screen.

 

 

Finished Roguelike 2D Game

The (should be) finished version of the game is linked below. After playing the game, if you could take the survey to give me some feedback that would be awesome! Thanks 🙂

To play the game ask me, (Im wearing the Iowa State t shirt), and I can have you play the game on the computer next to mine. Unfortunately the file size was too large to directly link. Sorry 🙁

Survey: https://goo.gl/forms/jheK5WK9LzX9QxB12

Gracias!