Book Image

Unity 2D Game Development

By : Dave Calabrese
Book Image

Unity 2D Game Development

By: Dave Calabrese

Overview of this book

<p>Prepare yourself to travel back to the 90s and build a game like they used to make, using today's technology. That's right; we're talking about making 2D games using Unity!</p> <p>This book will help you build 2D games in Unity using the engine's 2D technologies added in Version 4.3. You'll learn the basics of importing assets and building foundation technology all the way up to full combat and boss battles! With the book's straightforward and practical approach, each chapter takes you a step closer to the final game. We will wrap things up by looking into the basic aspects of the game's UI.</p> <p>Once you reach the end and have integrated a final boss battle, you can go back to the challenges included in each chapter and use them to improve the game and your 2D game development skills!</p>
Table of Contents (13 chapters)

Enemies – forever!


So, you defeated all your enemies and now find yourself without enemies to defeat. This gets boring fast; so, let's find a way to get more enemies to whack. To do this, we are going to create enemy spawn points in the form of nifty rotating vortexes and have them spit out enemies whenever we kill other enemies. It shall be glorious, and we'll never be without friends to give gifts—and by gifts, we mean bullets.

First things first. We need to make a cool-looking vortex. This vortex will be a stacked, animated visual FX object that is built for a 2D world. Don't worry, we've got you covered on textures, so please go through the following steps:

  1. Import the ones in the assets folder under Sprites\Vortex.

  2. Create a new GameObject called Vortex and add all three of the Vortex sprites in it, with each of their Position values set to X:0, Y:0, and Z:0.

  3. Adjust their Order in Layer values so that the Vortex_Back child is set to 10, Vortex_Center is set to 11, and Vortex_Front is set...