Book Image

Unity 2018 By Example - Second Edition

Book Image

Unity 2018 By Example - Second Edition

Overview of this book

Unity is the most exciting and popular engine used for developing games. With its 2018 release, Unity has become the primary source of both game development and virtual reality content. In Unity 2018 By Example, you’ll learn how to use Unity in order to make amazing games from popular genres - from action shooters to mind-bending puzzle games to adventure and Virtual Reality (VR) games. Even if you have no previous experience of using Unity, this book will help you understand the toolsets it provides in depth. In addition to this, you'll understand how to create time-critical collection games, twin-stick space shooters, platformers, and action-fest games with intelligent enemies. Finally, you'll get to grips with creating VR games with the new toolsets introduced by Unity to help you develop amazing VR experiences. To make things easier, you will be provided with step-by-step tutorials for making five great games in Unity 2018, along with a detailed explanation of all the fundamental concepts. By the end of this book, you’ll have established a strong foundation in making games with Unity 2018.
Table of Contents (16 chapters)
Unity 2018 By Example - Second Edition
Contributors
Preface
Other Books You May Enjoy
Index

A 2D Adventure – getting started


Adventure games require the player to use their cunning, dexterity, mental sharpness, and acumen to make progress. Such games feature dangerous obstacles, challenging missions, and character interaction, as opposed to all-out action like many first-person shooter games. Our adventure game will be no exception. See Figure 5.1 for a glimpse of the game that we'll create. In this game, the player moves around using the keyboard arrows or W, A, S, D keys. Furthermore, they can jump with the spacebar and interact with characters simply by approaching them. During the game, the player will be tasked with a mission from an NPC character to collect an ancient gem hidden somewhere within a level. The player must then navigate dangerous obstacles in search of the gem, and then finally collect it before returning to the NPC, completing the game.

Figure 5.1: The 2D adventure game to create

To get started with creating the adventure, create a completely new and empty Unity...