Book Image

Learning Unity 2D Game Development by Example

By : Venita Pereira
Book Image

Learning Unity 2D Game Development by Example

By: Venita Pereira

Overview of this book

<p>If you are looking for a guide to create 2D games using Unity, look no further. With this book, you will learn all the essentials of 2D game development by creating five real-world games in a step-by-step manner throughout the course of this book.</p> <p>Starting with a blank scene, you will learn all about the new Unity 2D toolset, which will enable you to bring your scene to life. You will create characters, make them move, create some enemies, and then write code to destroy them. After figuring out all the necessities of creating a game, this book will then assist you in making several different games: games with collision, parallax scrolling, Box2D, and more.</p> <p>By the end of this book, you will not only have created several small games, but you will also have the opportunity to put all your new-found knowledge into creating and deploying a larger, full game.</p>
Table of Contents (17 chapters)
Learning Unity 2D Game Development by Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a sprite


In order to add a character to our game, we need to either use a pre-existing sprite that we have rights to or create a sprite first.

Image editing software

To create a sprite we will need graphic design software or image editing software, like the one shown in the following screenshot:

There is a wide and diverse range of software of varying features, ease of use, and prices. The most well-known and widely used image editing software in the game development industry are: Photoshop, Xara, and Paint.NET. Paint.NET is free to use and can be downloaded from http://www.getpaint.net.

Once we have downloaded the software, we create our character sprite. A character sprite is a 2D image of a character and can be made of a single image or multiple images. We will create our character from multiple images since it helps when animating the character as the different body parts will be able to move independently.

Sprite sheet

A sprite sheet is an image consisting of separate multiple images...