Book Image

Mastering Unity 2D Game Development - Second Edition

By : Ashley Godbold, Simon Jackson
Book Image

Mastering Unity 2D Game Development - Second Edition

By: Ashley Godbold, Simon Jackson

Overview of this book

The Unity engine has revolutionized the gaming industry, by making it easier than ever for indie game developers to create quality games on a budget. Hobbyists and students can use this powerful engine to build 2D and 3D games, to play, distribute, and even sell for free! This book will help you master the 2D features available in Unity 5, by walking you through the development of a 2D RPG framework. With fully explained and detailed C# scripts, this book will show you how to create and program animations, a NPC conversation system, an inventory system, random RPG map battles, and full game menus. After your core game is complete, you'll learn how to add finishing touches like sound and music, monetization strategies, and splash screens. You’ll then be guided through the process of publishing and sharing your game on multiple platforms. After completing this book, you will have the necessary knowledge to develop, build, and deploy 2D games of any genre!
Table of Contents (20 chapters)
Mastering Unity 2D Game Development - Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface

Building our start screen


As stated earlier, the start screen is the first screen the player will see and a lot of their opinion of your game will be derived from how good it looks. If you are not the artistic type and don't have an eye for layout, I highly recommend looking at the start screen of other games to get an idea of what to make it look like. Usually the start screen has its own unique game art.

We're going to make a very simple (and sadly, kind of ugly) start screen for now. You can adjust this later to make it more attractive and give it menus, but we are just going to have the title of the game, the town's background image, and a Play button.

Select StartScreen from the Assets/Scenes folder. Select Create | UI | Image from the Hierarchy. We want this background image to scale with the screen size, so select the Canvas and change the Canvas Scaler properties as the following shows:

We used 1024x768 as the reference resolution, because the background image we will use has that...