Book Image

Unity 2D Game Development Cookbook

By : Claudio Scolastici
Book Image

Unity 2D Game Development Cookbook

By: Claudio Scolastici

Overview of this book

<p>Unity is a powerful game development engine that provides rich functionalities to create 2D and 3D games.</p> <p>Unity 2D Game Development Cookbook is a practical guide to creating games with Unity. The book aims to serve the purpose of exploring problematic concepts in Unity for 2D game development, offering over 50 recipes that are easy to understand and to implement, thanks to the step-by-step explanations and the custom assets provided. The practical recipes provided in the book show clearly and concisely how to do things right in Unity. By the end of this book, you'll be near "experts" when dealing with Unity. You will also understand how to resolve issues and be able to comfortably offer solutions for 2D game development.</p>
Table of Contents (15 chapters)
Unity 2D Game Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


After we add an animation set for the character, we can finalize it before moving on to building an actual game level.

The character lacks a proper graphic aspect, game controls, and the capability to react to physics.

We are going to deal with these one at a time, starting with textures and materials. In Chapter 2, 2D Assets for Unity, we described how simple materials are imported and created in Unity. Now that we have a true character for the prototype, we can discuss materials in more detail. In the following recipe, we create a material that requires two textures.

The material for the character we are working with requires two textures: one to provide the basic color of the mesh and another for the details of bumps and lights falling onto the mesh. The first texture or map is technically called the diffuse map of the character and, simply put, contains the information on how colors are distributed on the mesh surface without any lighting. The second is usually addressed as...