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

Texture atlases


As we are nearing the end of this chapter, there is one topic we would like to discuss. Let's take a look at the following screenshot, courtesy of Gamasutra:

You may notice that it contains an arrangement of images and parts of images that are all nicely deployed to better fill the whole space available. This is technically called a texture atlas. A texture atlas is in fact a way to optimize memory management as you feed your project with 2D textures. Instead of having an image for any differently colored mesh or mesh part, an artist can align several chunks on a single texture, saving memory that would otherwise go wasted.

Actually, in 2D gaming, texture atlases are extremely useful for backgrounds. To improve the perspective illusion of 2D static backgrounds, it is a good practice to actually build them as is done in theaters, by putting several screens on stage at different depths (distance from the audience), each with its own piece of background.

Likewise, artists create...