Book Image

Mastering Unity 2D game development

By : Simon Jackson
Book Image

Mastering Unity 2D game development

By: Simon Jackson

Overview of this book

Table of Contents (21 chapters)
Mastering Unity 2D Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Overview
Index

Planning behaviors


Behaviors are just a fancy way of saying things or interactions that will happen in the game. Breaking down these actions or reactions in this way helps to componentize how we think our game will work. Stopping and thinking about this from the very beginning means we won't get too many surprises later on. (There are always surprises after a good night's sleep.)

For example, behaviors can take the following forms:

  • Attacking another entity

  • Taking damage

  • Collecting the loot, which could be money or items

  • Teleporting to another land

It is also important to note that visual effects as the result of a behavior or action are different to those that affect the characteristics of the game's object. You may have a visual representation as the result of a behavior or action (for example, a particle effect when taking damage or the character swinging their sword to attack), but in Unity especially, you have to keep these separate. We will cover more on this later.

Note

In traditional games...