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


With the character basically finished from a graphic standpoint, we can now start building up a game level for it to run around. This chapter is thus dedicated to creating an actual game level for our prototype and the logic to make it work as a side scrolling game.

Level design

Though we didn't discuss a design document for the prototype we are working on, with every new chapter we provided hints about the kind of game we plan to prototype. For those who didn't notice that, we will offer a recap here.

Our plan is to create a side scrolling running game. The character runs both left and right. There are platforms to jump on and collectible objects to gather. Gathering all collectibles means you beat the level, whereas falling from platforms more than a given number of times gets the player to the Game Over screen.

The camera displays the character from a side perspective and follows the character as it runs. Controls are standard and quite simple: left and right arrow buttons to...