Introduction To Game Design
Introduction To Game Design
Development
"Prototyping and play-testing are often the most misunderstood and/or underutilized steps
in the game design and development process. Iterative cycles of testing and refining are
key to the early stages of making a good game. Novices will often believe that they need to
know everything about a language or build every asset of the game before they can really get
started. Gibson's new book prepares readers to go ahead and dive in to the actual design and
prototyping process right away; providing the basics of process and technology with excellent
"starter kits" for different types of games to jumpstart their entry into the practice."
Stephen Jacobs
Associate Director, RIT Center for Media, Art, Games, Interaction and Creativity (MAGIC)
and Professor, School of Interactive Games and Media
"Jeremy Gibson's Introduction to Game Design, Prototyping, and Development deftly combines
the necessary philosophical and practical concepts for anyone looking to become a Game
Designer. This book will take you on a journey from high-level design theories, through game
development concepts and programming foundations in order to make your own playable
video games. Jeremy uses his years of experience as a professor to teach the reader how to
think with vital game design mindsets so that you can create a game with all the right tools
at hand. A must-read for someone who wants to dive right into making their first game and a
great refresher for industry veterans."
Michelle Pun
Senior Game Designer, Zynga
Introduction to Game
Design, Prototyping,
and Development
The Addison-Wesley
Game Design and Development Series
Introduction to Game
Design, Prototyping,
and Development
From Concept to Playable
Gamewith Unity and C#
Jeremy Gibson
Editor-in-Chief
Mark Taub
Senior Acquisitions
Editor
Laura Lewin
Senior Development
Editor
Chris Zahn
For information about buying this title in bulk quantities, or for special sales
opportunities (which may include electronic versions; custom cover designs; and
content particular to your business, training goals, marketing focus, or branding
interests), please contact our corporate sales department at corpsales@pearsoned.com
or (800) 382-3419.
Managing Editor
Kristy Hart
Copy Editor
Keith Cline
For questions about sales outside the U.S., please contact international@pearsoned.
com.
Visit us on the Web: informit.com/aw
Library of Congress Control Number: 2014936195
Copyright 2015 Pearson Education, Inc.
All rights reserved. Printed in the United States of America. This publication is protected
by copyright, and permission must be obtained from the publisher prior to any
prohibited reproduction, storage in a retrieval system, or transmission in any form or
by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain
permission to use material from this work, please submit a written request to Pearson
Education, Inc., Permissions Department, One Lake Street, Upper Saddle River, New
Jersey 07458, or you may fax your request to (201) 236-3290.
ISBN-13: 978-0-321-93316-4
ISBN-10: 0-321-93316-8
Project Editor
Elaine Wiley
Indexer
Ken Johnson
Proofreader
Paula Lowell
Technical Editors
Marc Destefano
Charles Duba
Margaret Moser
Publishing Coordinator
Olivia Basegio
Cover Designer
Chuti Prasersith
Book Designer
Bumpy Design
Compositor
Nonie Ratcliff
Contents at a Glance
Part I Game Design and Paper Prototyping . . . . . . . . . . . . . . . . 1
1 Thinking Like a Designer . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Game Analysis Frameworks . . . . . . . . . . . . . . . . . . . . . . 19
3 The Layered Tetrad . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4 The Inscribed Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5 The Dynamic Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
6 The Cultural Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
7 Acting Like a Designer . . . . . . . . . . . . . . . . . . . . . . . . . 89
8 Design Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
9 Paper Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
10 Game Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
11 Math and Game Balance . . . . . . . . . . . . . . . . . . . . . . . 155
12 Puzzle Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
13 Guiding the Player . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
14 The Digital Game Industry . . . . . . . . . . . . . . . . . . . . . . 211
Part II Digital Prototyping . . . . . . . . . . . . . . . . . . . . . . . . . . 223
15 Thinking in Digital Systems . . . . . . . . . . . . . . . . . . . . . 225
16 Introducing Our Development Environment: Unity . . . . . . 235
17 Introducing Our Language: C# . . . . . . . . . . . . . . . . . . . 253
18 Hello World: Your First Program . . . . . . . . . . . . . . . . . . 263
19 Variables and Components . . . . . . . . . . . . . . . . . . . . . 281
20 Boolean Operations and Conditionals . . . . . . . . . . . . . . 299
21 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
22 Lists and Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
23 Functions and Parameters . . . . . . . . . . . . . . . . . . . . . . 349
24 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
25 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
26 Object-Oriented Thinking . . . . . . . . . . . . . . . . . . . . . . 391
27 The Agile Mentality . . . . . . . . . . . . . . . . . . . . . . . . . . 405
CONTENTS AT A GLANCE
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Part I Game Design and Paper Prototyping . . . . . . . . . . . . . . 1
1 Thinking Like a Designer . . . . . . . . . . . . . . . . . . . . . . 3
You Are a Game Designer. . . . . . . . . . . . . . . . . . . . . . . . . . 4
Bartok: A Game Exercise. . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Definition of Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
xii
CONTENTS
CONTENTS
xiii
xiv
CONTENTS
CONTENTS
21 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315
Types of Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Set Up a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
while Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
do...while Loops . . . . . . . . . . . . . . . . . . . . . . . . . . 319
for Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
foreach Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Jump Statements within Loops . . . . . . . . . . . . . . . . . . . . 322
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
xv
xvi
CONTENTS
24 Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Getting Started with Debugging . . . . . . . . . . . . . . . . . . . 364
Stepping Through Code with the Debugger. . . . . . . . . . . . 369
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
25 Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Understanding Classes . . . . . . . . . . . . . . . . . . . . . . . . . 380
Class Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
CONTENTS
xvii
xviii
CONTENTS
CONTENTS
xix
xx
CONTENTS
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 857
FOREWORD
I have a theory about game designers and teachers. I think that, beneath the possible differences of our outer appearances, we're secretly the same; that many of the skills possessed by
a good game designer are the same skills held by a great teacher. Have you ever had a teacher
who held a class spellbound with puzzles and stories? Who showed you simple demonstrations
of skills that were easy for you to understand and copy, but were difficult for you to master?
Who gradually, cleverly, helped you put together pieces of information in your mind, maybe
without your even realizing it, until one day your teacher was able to step aside and watch you
do something amazing, something that you never would have thought was possible.
We video game designers spend a lot of our time finding ways to teach people the skills they
need to play our games, while keeping them entertained at the same time. We sometimes
don't want people to be aware that we're teaching them, thoughthe best tutorial levels that
video games open with are usually the ones that simply seem like the beginning of a thrilling
adventure. I was lucky to work at the award-winning game studio Naughty Dog for eight amazing years, where I was the Lead or Co-Lead Game Designer on all three PlayStation 3 games in
the Uncharted series. Everyone at the studio was very happy with the sequence that opened
our game Uncharted 2: Among Thieves. It effectively taught each player all the basic moves they
would need to play the game, while keeping them on the edge of their seat because of the
gripping predicament our hero Nathan Drake found himself in, dangling over the edge of a cliff
in a ruined train carriage.
Video game designers do this kind of thing over and over again as they create digital adventures for us to play. Working on a sequence of player experiences like those found in the
Uncharted games, I have to stay very focused on what the player has recently learned. I have
to present my audience with interesting situations that use their new skills and that are easy
enough that they won't get frustrated, but challenging enough that their interest will be held.
To do this with complete strangers, through the channels of communication that a game
providesthe graphics of the environments and the characters and objects within them, the
sounds that the game makes, and the interactivity of the game's controlsis tremendously
challenging. At the same time, it is one of the most rewarding things I know how to do.
Now that I've become a professor, teaching game design in a university setting, I've discovered
firsthand just how many of the skills I developed as a game designer are useful in my teaching.
I'm also discovering that teaching is just as rewarding as game design. So it came to me as no
xxii
FOREWORD
surprise when I discovered that Jeremy Gibson, the author of this book, is equally talented as a
game designer and a teacher, as you're about to find out.
I first met Jeremy around ten years ago, at the annual Game Developers Conference in Northern
California, and we immediately hit it off. He already had a successful career as a game developer, and his enthusiasm for game design struck a chord with me. As you'll see when you begin
to read this book, he loves to talk about game design as a craft, a design practice and an emerging art. Jeremy and I stayed in touch over the years, as he went back to graduate school at Carnegie Mellon University's excellent Entertainment Technology Center to study under visionaries
like Doctor Randy Pausch and Jesse Schell. Eventually, I came to know Jeremy as a professor and
a colleague in the Interactive Media & Games Division of the School of Cinematic Arts at the
University of Southern Californiapart of USC Games, the program in which I now teach.
In fact, I got to know Jeremy better than ever during his time at USCand I did it by becoming
his student. In order to acquire the skills that I needed to develop experimental research games
as part of USC's Game Innovation Lab, I took one of Jeremy's classes, and his teaching transformed me from a Unity n00b with some basic programming experience into an experienced
C# programmer with a strong set of skills in Unity, one of the world's most powerful, usable,
adaptable game engines. Every single one of Jeremy's classes was not only packed with information about Unity and C#, but was also peppered with inspirational words of wisdom about
game design and practical pieces of advice related to game developmenteverything from
his thoughts about good "lerping," to great tips for time management and task prioritization,
to the ways that game designers can use spreadsheets to make their games better. I graduated
from Jeremy's class wishing that I could take it again, knowing that there was a huge amount
more that I could learn from him.
So I was very happy when I heard that Jeremy was writing a bookand I became even happier
when I read the volume that you now hold in your hands. The good news for both you and me
is that Jeremy has loaded this book with everything that I wanted more of. I learned a lot in the
game industry about best practices in game design, production, and development, and I'm
happy to tell you that in this book, Jeremy does a wonderful job of summarizing those ways of
making games that I've found work best. Within these pages, you'll find step-by-step tutorials
and code examples that will make you a better game designer and developer in innumerable
ways. While the exercises in this book might get complexgame design is among the most
difficult things I know how to doJeremy won't ask you to do anything complicated without
guiding you through it in clear, easy-to-follow language.
You'll also find history and theory in this book. Jeremy has been thinking deeply about game
design for a long time and is very well-read on the subject. In the first part of this volume,
you'll find an extraordinarily wide and deep survey of the state-of-the-art in game design
theory, along with Jeremy's unique and strongly developed synthesis of the very best ideas
FOREWORD
he's encountered on his game design travels. Jeremy supports his discussion with interesting
historical anecdotes and fascinating glimpses of the long traditions of play in human culture,
all of which help to frame his conversation in valuable and progressive ways. He continually
pushes you to question your assumptions about games, and to think beyond the console, the
controller, the screen and the speakers, in ways that might just spur a whole new generation of
game innovators.
Jeremy Gibson has moved on from USC, and now teaches at the University of Michigan Ann
Arbor, and I'm very happy for the generations of U-M students that he'll lead to new understandings of the craft of game design in the coming years. This spring, when Jeremy walked
into the restaurant at the annual GDC alumni dinner hosted by the USC Games program, the
room full of our current and former students came alive with whoops and cheers and moments
later broke out into applause. That tells you a lot about what Jeremy Gibson is like as a teacher.
You're lucky that, thanks to this book, he can now be your teacher too.
The world of game design and development is changing at a rapid rate. You can be part of this
wonderful worlda world unlike any other I know, and which I love with all my heart. You can
use the skills you learn through reading this book to develop new prototypes for new kinds of
games, and in doing so you might eventually create whole new genres of games, in expressive
new styles, which appeal to new markets. Some of tomorrow's stars of game design are currently learning to design and program, in homes and schools all around the world. If you make
good use of this book, by following the advice and doing the exercises you find in here, it might
just help your chances of creating a modern game design classic.
Good luck, and have fun!
Richard Lemarchand
Associate Professor, USC Games
xxiii
PREFACE
Welcome to Introduction to Game Design, Prototyping, and Development. This book is based on
my work over many years as both a professional game designer and a professor of game design
at several universities, including the Interactive Media and Games Division at the University of
Southern California and the Department of Electrical Engineering and Computer Science at the
University of Michigan Ann Arbor.
This preface introduces you to the purpose, scope, and approach of this book.
PREFACE
xxv
xxvi
PREFACE
PREFACE
xxvii
xxviii
PREFACE
If you're interested in game design but have never programmed, this book is perfect
for you. Part I introduces you to several practical theories of game design and presents you
with the practices that can help you develop and refine your design ideas. Part II teaches
you how to program from nothing to understanding object-oriented class hierarchies.
Since I became a college professor, the majority of my classes have focused on teaching
nonprogrammers how to program games. I have distilled all of my experience doing so
into Part II of this book. Part III takes you through the process of developing eight different
game prototypes across several different game genres. Each demonstrates fast methods to
get from concept to working digital prototype. Lastly, the appendices will explain specific
PREFACE
game development and programming concepts in-depth and guide you to resources to
learn more once you've finished the book. This in-depth content was moved to Appendix B,
"Useful Concepts," so that you could continue to use that section of the book as a reference
in the years to come.
If you're a programmer who is interested in game design, Parts I and III of this book
will be of most interest to you. Part I introduces you to several practical theories for game
design and presents you with the practices that can help you develop and refine your
design ideas. You can skim Part II, which introduces C# and how it is used in Unity. If you are
familiar with other programming languages, C# looks like C++ but has the advanced features of Java. Part III takes you through the process of developing eight different game prototypes across several different game genres. Game development in Unity is very different
from what you may be used to from other game engines. Many elements of development
are taken care of outside of the code. Each prototype will demonstrate the style of development that works best in Unity to get from concept to working digital prototype quickly. You
will also want to look carefully at Appendix B, which is full of detailed information about
various development concepts and is arranged as a reference that you can return to later.
Conventions
This book maintains several writing conventions to help make the text more easily
understandable.
Any place that specific button names, menu commands, or other multi-word nouns are introduced in the text, they will be listed in italics. This includes terms like the Main Camera Game
Object. An example menu command is Edit > Project Settings > Physics, which would instruct
you to select the Edit menu from the menu bar, choose the Project Settings sub-menu, and then
select Physics.
Book Elements
The book includes several different types of asides that feature useful or important information
that does not fit in the flow of the regular body text.
note
Callouts in this format are for information that is useful but not critical. Information
in notes will often be an interesting aside to the main text that provides a little bit
more info about the topic.
xxix
xxx
PREFACE
t ip
This element provides additional information that is related to the book content
and can help you as you explore the concepts in the book.
warning
BE CAREFUL Warnings cover information about things that you need to be
aware of to avoid mistakes or other pitfalls.
SIDEBAR
The sidebar is for discussions of longer topics that are important to the text but should
be considered separately from it.
Code
Several conventions apply to the code samples in this book. When specific elements from the
code listing are placed in regular paragraph text, they appear in a monospaced font. The variable variableOnNewLine from the following code listing is an example of this.
Code listings also utilize a monospaced font and appear as follows:
1 public class SampleClass {
2
public GameObject
3
public GameObject
4 }
variableOnExistingLine;
variableOnNewLine;
// 1
// 2
Code listings are often annotated; in this case, additional information about the line
marked with // 1 would appear in this first annotation.
Some code listings will be expansions on code that you've already written or that already
exists in the C# script file for another reason. In this case, the old lines will be at normal
weight, and the new lines will be at bold weight.
PREFACE
Note that occasionally lines of code in the chapters are too long to fit on the printed page.
Where that occurs, a code-continuation arrow () has been used to mark the continuation.
For example:
21
Most of the code listings in the first two parts of the book will include line numbers (as seen in
the preceding listing). You do not need to type the line numbers when entering the code into
MonoDevelop (it will automatically number all lines). In the final part of the book, there are no
line numbers due to the size of the code listings.
Book Website
The website for this book includes all of the files referenced in the chapters, lecturer notes, and
finished versions of each tutorial prototype. It is available at http://book.prototools.net.
xxxi
ACKNOWLEDGMENTS
A tremendous number of people deserve to be thanked here. First and foremost, I want to
thank my wife, Melanie, whose help and feedback on my chapters throughout the entire process improved the book tremendously. I also want to thank my family for their many years of
support, with special thanks to my father for teaching me how to program as a child.
As a new author, there were several people at Pearson who provided support to me and
shepherded me through this process. Chief among them were Chris Zahn, Laura Lewin, Olivia
Basegio, Elaine Wiley, and Keith Cline who each demonstrated laudable patience in working
with me. I also had the support of some fantastic technical reviewers: Marc Destefano, Charles
Duba, and Margaret Moser. Their keen eyes and minds found many places in the original text
that could be clarified or improved.
I would also like to thank all the educators who have taught me and worked as my colleagues.
Special thanks go to Dr. Randy Pausch and Jesse Schell. Though I had worked as a professor and
game designer before meeting them, they each had a profound effect on my understanding of
design and education. I also owe tremendous thanks to Tracy Fullerton, Mark Bolas, and Scott
Fisher, who were friends and mentors to me in the years I taught at the University of Southern
California's Interactive Media and Games Division. There were also many other brilliant faculty
and friends at USC who helped me to flesh out the ideas in this book, including Adam Liszkiewicz, William Huber, Richard Lemarchand, Scott Rogers, Vincent Diamante, Sam Roberts, and
Logan Ver Hoef.
Many of my friends in the industry have also helped me by giving me suggestions for the book
and feedback on the ideas presented therein. These included Michael Sellers, Nicholas Fortugno, Jenova Chen, Zac Pavlov, Joseph Stevens, and many others.
Thanks as well to all the fantastic students whom I have taught over the past decade. It is you
who inspired me to want to write this book and who convinced me that there was something
important and different about the way that I was teaching game development. Every day that I
teach, I find myself inspired and invigorated by your creativity, intelligence, and passion.
Finally, I would like to thank you. Thank you for purchasing this book and for your interest in
developing games. I hope that this book helps you get started, and I would love to see what
you make with the knowledge you gain here.
CH AP TE R 16
INTRODUCING
OUR DEVELOPMENT
ENVIRONMENT: UNITY
236
CHAPTER 16
Downloading Unity
First things first, let's start downloading Unity. The Unity installer is over 1 GB in size, so depending on your Internet speed, this could take anywhere from a few minutes to a couple of hours.
After you've gotten this process started, we can move on to talking about Unity.
As of this writing, the latest major version of Unity is Unity 4. Because Unity is under constant
development, the current minor version should be something like 4.x.y, with the x and y being
sub-version numbers. Regardless of version, Unity is always available for free from Unity's
official website:
http://unity3d.com/unity/download
This should take you to a page that provides the latest download link for your system (see Figure 16.1). Unity is available for both PC and OS X, and it is nearly identical on both platforms.
tip
Unity is free, but you will still need to acquire a license, and this requires that you
have an available Internet connection the first time that you run the application.
Unity is free: With the free version of Unity, you can create and sell games that run on OS
X, PC, the Web, Linux, iOS, Android, BlackBerry, Windows Phone, Windows Store, and more.
While the Pro version of Unity includes a few additional useful features, for a game designer
just learning to prototype, the free version is really all that you need. The Pro version normally costs $1,500 (or $75/month), but if you're a student, a one-year license for Unity Pro is
about ten times less!
tip
STUDENT PRICING If you are a student, you can purchase a 1-year educational
license for Unity Pro at a tremendous discount (about $150 instead of $1,500). This
license does prevent you from being able to sell your game directly to players, but
it lets you use the full power of Unity Pro to develop your game and make excellent portfolio pieces. After you're done developing, if you know you've got a hit on
your hands, you can purchase the commercial version of Pro before attempting to
sell your game. Unity has also recently added Pro student licenses that do allow
you to sell your games, but those have a higher cost.
To find the latest student pricing for Unity, I recommend searching the Web for
"unity educational student pricing." That will make sure that you're looking at the
latest.
Write once, deploy anywhere: The free version of Unity can build applications for OS X,
PC, the Web, Linux, iOS, Android, BlackBerry, Windows Phone, Windows Store, and more, all
from the same code and files. This kind of flexibility is at the core of Unity; in fact, it's what
the product and company are named for. There are also paid extensions to Unity Pro that
237
238
CHAPTER 16
professionals can use to create games for the PlayStation 3, Xbox 360, and several other
game consoles.
It's awesome!: My students and I have joked that Unity has a "make awesome" button.
Although this is not strictly true, there are several phenomenal features built in to Unity
that will make your games both play and look better by simply checking an option box.
Unity engineers have already handled a lot of the difficult game programming tasks for
you. Collision detection, physics simulation, pathfinding, particle systems, draw call batching, shaders, the game loop, and many other tough coding issues are all included. All you
need to do is make a game that takes advantage of them!
C#
C# was developed in 2000 as Microsoft's response to Java. They took a lot of the modern coding features of Java and put them into a syntax that was much more familiar to and comfortable for traditional C++ developers. This means that C# has all the capabilities of a modern
language. For you experienced programmers, these features include function virtualization
and delegates, dynamic binding, operator overloading, lambda expressions, and the powerful
Language INtegrated Query (LINQ) query library among many others. For those of you new
to programming, all you really need to know is that working in C# from the beginning will
make you a better programmer and prototyper in the long run. In my prototyping class at the
University of Southern California, I taught using both UnityScript and C# in different semesters,
and I found that students who were taught C# consistently produced better game prototypes,
exhibited stronger coding practices, and felt more confident about their programming abilities
than their peers who had been taught UnityScript in prior semesters of the class.
what we're doing and why. This general concept of what you're working toward in each
tutorial will give you a framework on which to hang the various coding elements that are
introduced in the chapter.
239
240
CHAPTER 16
2. Guided tutorial: You'll be guided step by step through a tutorial that will demonstrate
these concepts in the form of a playable game. Unlike some other approaches, we will be
compiling and testing the game throughout the process so that you can identify and repair
bugs (problems in the code) as you go, rather than trying to fix all of them at the end. Additionally, I'll even guide you to create some bugs so that you can see the errors they cause
and become familiar with them; this will make it easier when you encounter your own bugs
later.
3. Lather, rinse, repeat: In many tutorials, you'll be asked to repeat something. For instance,
in a top-down shooter game like Galaga, the tutorial would guide you through the process
of making one single enemy type, and then it would ask you to create three others on your
own. Don't skip this part! This repetition will really drive the concept home, and it will help
your understanding solidify later.
p ro tip
90% OF BUGS ARE JUST TYPOS I've spent so much time helping students fix
bugs that now I can very quickly spot a typo in code. The most common include
the following:
Misspellings: If you type even one letter wrong, the computer won't have
any idea what you're talking about.
Capitalization: To your C# compiler, A and a are two completely different letters, so variable, Variable, and variAble are all completely different words.
Missing semicolons: Just like almost every sentence in English should end
in a period, nearly every statement in C# should end in a semicolon ( ; ). If
you leave the semicolon out, it will often cause an error on the next line. FYI:
A semicolon is used because the period was needed for decimal numbers
and what's called dot syntax in variable names and subnames (e.g., varName.
subVarName.subSubVarName).
Earlier, I mentioned that most of my students feel confused and daunted by C# at about the
midway point of the semester, and it's at exactly that time that I assign them the Classic Games
Project. They are asked to faithfully recreate the mechanics and game feel of a classic game
over the course of four weeks. Some great examples have included Super Mario Bros., Metroid,
Castlevania, Pokemon, and even the original Legend of Zelda. By being forced to work things out
on their own, to schedule their own time, and to dig deeply into the inner workings of these
seemingly simple games, the students come to realize that they understand much more C#
than they thought, and that is the time that everything really falls into place. The key component here is that the thought process changes from "I'm following this tutorial" to "I want to
do this...now how do I make it happen?" At the end of this book, you will be prepared to tackle
your own game projects (or your own Classic Game Project, if you want). The tutorials in this
book can be a fantastic starting point on which to build your own games.
Installing Unity
Depending on your personal system settings, the Unity installer should have placed itself in a
Downloads folder somewhere on your hard drive. I'm sure you've done this kind of thing several
times before, so find the file, run the installer with all default options, and let's get to work. This
is a big install, so it could take a while. In the final bit of the installation, it may look like it has
frozen; but don't worry, just give it some time to complete.
241
242
CHAPTER 16
Figure 16.3 The Unity window when it opens for the first time
t ip
ANGRYBOTS CONTROLS
You must stand very close to any circular door for a couple of seconds for it to
open.
There are several computers that you need to stand in front of in order to unlock
them (turn the color of electric wires coming out of them from red to green).
Shaders: AngryBots is rife with shaders (see Figure 16.4), code written specifically for the
graphics card with the sole purpose of making the game look amazing. Special ones to
check out include the following:
A. The depth-of-field image effect that makes some parts of the scene in-focus while
others are out-of-focus (see letter A in Figure 16.4). This will only appear in Unity Pro.
243
244
CHAPTER 16
B. The reflections on the floors (especially of the laser sight) (see letter B in Figure 16.4).
This will only appear in Unity Pro.
C. The animated water droplets on the floor when outside (see letter C in Figure 16.4). This
appears regardless of whether you are using Unity Pro or free.
As explained earlier, if you chose to activate the free license rather than the 30-day Unity Pro
trial, you will not see the most advanced shaders. This is one of the few differences between the
free and Pro versions of Unity.
Character rigging and animation: Unity makes use of animation blending to enable the
player character to walk in one direction while looking and shooting in another.
AI pathing: Enemies will move around objects in a room to find and attack the player.
Feel free to explore the whole space and see what elements of AngryBots you might want to
use in your own project. Go ahead, I'll wait.
...
...
So, what did you think? Did you blow up the base, or did you escape the exploding station? Did
you find the white museum? The controls of this game are a little unusual, but regardless, it's a
good showcase for how beautiful Unity can look.
Now, let's do something really cool.
You should see the Build Settings window shown in Figure 16.6.
From here, be sure to click Web Player on the left and then check Offline Deployment in the Web
Player options area. Click Build and Run, and Unity will ask you where to save the files. Type
AngryBots Web Build for the filename and click Save.
Unity will process this for a while and build a web version of the game for you. Once it's built,
your web browser will automatically be opened and sent to the page you just made as shown
in Figure 16.7. Depending on your browser, you may be prompted to give the Unity plug-in
permission to run.
245
246
CHAPTER 16
And there you go. You've compiled AngryBots for the web. Unity makes things like this very easy
so that you can focus on the interesting work: game design and development.
Figure 16.8 Position of the Layout pop-up menu and selection of the 2 by 3 layout
247
248
CHAPTER 16
Choose 2 by 3 from this pop-up menu. This will be the starting point for making our layout.
Before doing anything else, let's make the Project pane look a little cleaner. Click on the options
pop-up for the Project pane (shown in the black circle in Figure 16.9) and choose One Column
Layout.
Figure 16.9
Unity enables you to both move window panes around and adjust the borders between them.
As shown in Figure 16.10, you can move a pane by dragging its tab (the arrow cursor) or adjust a
border between panes by dragging the border between them (the left-right resize cursor).
Figure 16.10 Two types of cursors for moving and resizing Unity's window panes
When you drag a pane by its tab, a small ghosted version will appear (see Figure 16.11). Some
locations will cause the pane to snap into place. When this happens, the ghosted version of the
tab will appear in the new location.
Snapped
Pane
Ghosted
Pane
Figure 16.11 Ghosted and snapped panes when moving them around the Unity window
Play around with moving the window panes until your window looks like Figure 16.12.
Figure 16.12 Proper layout for the Unity window...but it's still missing something
249
250
CHAPTER 16
Now the last thing we need to add is the Console pane. From the menu bar, choose Window >
Console. Then drag the Console pane below the Hierarchy pane. You'll also need to move the
Project pane after you've done this to create the final layout shown in Figure 16.13.
Figure 16.13 Final layout of the Unity window, including the Console pane
Now you just need to save this layout in the Layout pop-up menu so that you don't have to
go through all that again. Click the Layout pop-up menu and choose Save Layout, as shown in
Figure 16.14.
SUMMARY
Save this layout with the name Game Dev, with a leading space before the G in Game (i.e.,
" Game Design"). By putting a space at the beginning of the name, you make sure that this layout is sorted to the top of the menu. Now, any time you need to return to this layout, you
can simply choose it from this pop-up menu.
Scene pane: The Scene pane allows you to navigate around your scene in 3D and to select,
move, rotate, and scale objects.
Game pane: The Game pane is where you will preview your actual gameplay; it's the window in which you played AngryBots before compiling the web build. This pane also shows
you the view from the Main Camera in your scene.
Hierarchy pane: The Hierarchy pane shows you every GameObject that is included in your
current scene. For now, you can think of each scene as a level of your game. Everything that
exists in your scene, from the camera to your player-character, is a GameObject.
Project pane: The Project pane contains all of the assets that are included in your project.
An asset is any kind of file that is part of your project, including images, 3D models, C#
code, text files, sounds, fonts and so on. The Project pane is a reflection of the contents of
the Assets folder within your Unity project folder on your computer hard drive. These assets
are not necessarily in your current scene.
Inspector pane: Any time you click on an asset in the Project pane or a GameObject in
the Scene or Hierarchy panes, you will be able to see and edit information about it in the
Inspector pane.
Console pane: The Console pane will allow you to see messages from Unity about errors
or bugs in your code as well as messages from yourself that will help you understand the
inner workings of your own code.1 We will use the Console pane extensively in Chapter 18,
"Hello World: Your First Program," and Chapter 19, "Variables and Components."
Summary
That's it for setup. Now, let's move on to actually developing! As you've seen in this chapter,
Unity can create some pretty stunning visuals and compelling gameplay. Though the process
of making beautiful 3D models and shaders is outside the scope of this book, it's important for
you to know the extent of Unity's graphical capabilities. In the next chapter, you'll learn more
about C#, the language you'll be using for game development.
Unity's print() and Debug.Log() functions allow you to print messages to the Console pane.
251
INDEX
Numbers
3D animation/model resources, 854-855
3D printing, touch as an Inscribed Layer
aesthetic, 47-48
A
A Pattern Language, 45
AAA (top) games, costs in developing, 213
Achiever player type (diamonds), 67
acquaintances as playtesters, 145
action, five-act dramatic narrative structures
falling action (Act IV), 51
rising action (Act II), 51
action games
Omega Mage
changing rooms, 764-768
creating an inventory, 747-754
creating the game environment, 730-735
customizing setup, 789
damaging enemies, 772-777
damaging players, 777-782
enemy factories, 785-789
enemy interfaces, 782-785
EnemyBug GameObjects, 770-780
EnemySpiker GameObjects, 780-782
example of play, 728-729
fire ground spell, 754-762
fire spell, 761-762
fire-and-forget spells, 762-764
ground spell, 756-761
importing Unity asset packages, 729
Mage GameObject (player character),
735-737
mouse interaction, 737-747
project setup, 729
858
AESTHETICS
animation
Bartok digital prototype, 623
model resources and, 854-855
procedural animation, 72
Word Game, 687-690
antagonism (Act II), three-act dramatic narrative
structure, 52
Apache OpenOffice Calc. See Calc
Apple Picker, 419
Apple GameObject, 424-425
AppleTree GameObject, 421-423
art assets, 421-425
Basket GameObject, 425
C# coding, 425-426
adding high scores, 445-448
adding points, 441-442
basic movement, 431-432
catching apples, 439-440
changing direction, 432-434
destroying baskets, 444-445
dropped apple notifications, 443-444
dropping apples, 434-435
Game Over screen, 448
GUI and game management, 440-448
increasing difficulty, 448
instantiating baskets, 437-438
moving baskets via mouse, 438-439
score counter, 440-441
setting physics layers, 435-436
Start screen, 448
stopping apples from falling too far, 437
camera setup, 425-426
game analysis (systems thinking), 229
GameObject action lists, 231-232
GameObject flowcharts, 232-234
GameObjects, 230-231
gameplay, 230
preparing for, 421
project setup, 420
time-based games, 431-432
ARG (Alternate Reality Games)
Assassin, 17
boundary mechanics, 44
Majestic, 17
AVATARS
Assassin's Creed
player guidance, 202, 205
limited possibilities and interactive or linear
narrative, 53-54
resolution (screen), 73
Assassin's Creed IV: Black Flag
experiences and space (Inscribed Layer
mechanics), 46
player guidance, 199
premises narratives, examples of, 49
asset packages (Unity)
Prospector Solitaire, 562
QuickSnap, 696-697
Space SHMUP, 488-490
Assets folder (Unity), 265-266
assigning tasks in burndown charts, 414-415
AT (Automated Testing), 153
Atkinson, Kevin, on word lists and
Word Game, 660
Atlas Games, Lunch Money and house rules
(dynamic mechanics), 67
attention and involvement as player-centric
goals of design, 118-120
audience, determining (analysis phase of
iterative design), 91
audio assets, Unity Asset Store, 854
audio design, indirectly guiding players
by, 204-205
auditory play environments (environmental
aesthetics), 73-74
noisy environments, 74
volume control, 74
AutoDesk software, educational software
discounts, 855
Automated Testing (AT), 153
Automated Data Logging (ADL) and play
testing, 151
autotelic empowerment as a player-centric goal
of design, 116-117
avatars
empathetic characters versus (interactive
versus linear narrative), 55-57
multiple dialogue choices, 56-57
role fulfillment, 56
silent protagonists, 56
859
860
B
balance (See game balance)
Bartle, Richard, and types of players, 67-68
Bartok, 4-5
analyzing game play, 7
deblocking, 6-7
digital prototype, building, 621-622, 655
backgrounds, 622-623
build settings, 623-624
card animation, 623
creating cards, 624-629
fanning the hand, 638-640
game logic, 653-655
layouts, 629-638
LINQ (Language Integrated Query) and C#
coding, 640-641
managing initial deal, 642-643
managing turns, 646-653
moving cards, 641-642
rules of the game, 622
sorting order (2D-depth), 643-646
digital version, obtaining, 4-5
dynamic procedures, 64
objective, 5
playtesting, 6-10
riffle shuffling, 7
rounds, comparing, 9
rules of, 5, 8
Bateman, Chris
games, defining, 15
Ilinx (vertigionous play), 110
Imaginary Games, 15, 110, 115-116
structured conflict as a player-centric goal of
design, 115-116
Blizzard
Starcraft, game mods and cultural
mechanics, 81-82
Warcraft III, game mods and cultural
mechanics, 81-82
board games, systems thinking, 226
Bogost, Ian, and the magic circle concept and
lusory attitude, 112
Boids project (OOP in C# coding), 394
building simple models, 394-396
project setup, 394
scripts, 397-403
Book of Games: Strategies, Tactics & History,
The, 22
bool variables (C# coding), 283
Boolean operations (C# coding), 299-300, 313
bitwise Boolean operators, 302, 801-802
combining, 302-303
logical equivalence of, 303
AND operator (&&), 300
NOT operator (!), 300
OR operator (||), 300
shorting operators versus non-shorting
operators, 301-302
boss fights as puzzles, 195
Botermans, Jack
Book of Games: Strategies, Tactics & History,
The, 22
Snakes and Ladders, 22
boundaries
Alternative Reality Games, 44
Formal, Dynamic, and Dramatic
framework, 25
Inscribed Layer (Layered Tetrad), 40, 44
Box Collider component (GameObjects),
272, 295
brainstorming (ideation), 98
collection phase, 99
collision phase, 100-101
discussions, 101
expansion phase, 98-99
rating phase, 101
Brice, Mattie, and Mainichi
experiential understanding as a
player-centric goal of design, 122-123
personal expression/communication as a
goal of game design, 108
bridge puzzles, 188
brightness. See also color
environmental aesthetics (Dynamic
Layer), 73
indirectly guiding players by (contrast), 204
Brigs, Jeff, and music in C.P.U. Bach, 71
bullets, determining percent chance of to hit
(weapons and game balance), 178
Bungie and Halo
inscribed dramatics, example of, 58
limited possibilities and interactive or linear
narrative, 53-54
prior art, researching (analysis phase of
iterative design), 92
Red vs. Blue, machinima example, 83-84
Burgun, Keith
ambiguous decisions, importance of, 121
fun in game design, the importance of,
109-110
Game Design Theory: A New Philosophy for
Understanding Games, 11, 83, 118
gameplay as art (cultural aesthetics), 83
games, defining, 11, 14-15
interesting decisions as a player-centric goal
of design, 120-121
performative empowerment as a
player-centric goal of design, 118
burndown charts, 409
assigning tasks, 414-415
BDV (Burndown Velocity), 414-416
creating, 416
estimated hours versus real hours, 413
example of, 410-412
prioritizing tasks, 414-415
button mapping, Microsoft controllers, 848-849
C
C#, 253, 262
arrays, 328, 333, 344
basic array creation, 333-334
converting arrays to lists, 336-337
converting lists to arrays, 331
861
862
C#
863
864
C#
CHARACTERS
865
866
CHARACTERS
COSINE/SINE
867
868
defining, 80-81
designer responsibilities, 37
law and cultural impact of games, 86-87
mechanics, 81
custom game levels, 82
defining, 35
game mods, 81-82
narrative, 83
defining, 36
fan fiction as cultural narrative, 83
game mods as cultural narrative, 83
machinima, 83-84
technology, 84
defining, 36
external tools (player-built) and cultural
technology, 84-85
game technology used in other fields, 84
transmedia, 85-86
cumulative outcomes (dynamic mechanics), 69
custom card decks, 172
custom game levels (cultural mechanics), 82
D
damage, weapons and game balance
average damage
calculating, 179
charting, 179-180
overall damage, showing, 181
deblocking in Bartok, 6-7
debugging C# coding, 363-364
attaching debugger to Unity, 372-374
attaching/removing scripts, 366-367
compile-time bugs, 364-366
QuickSnap, 713-714
runtime errors, 367-369
stepping through code, 369-371, 373-377
variables, 375-376
decimals and probability, 165-166
decision-making as a player-centric goal of
design, 120-122
ambiguous decisions, importance of, 121
869
870
DESIGNERS
interviewing, 219-220
networking, 217-218
salaries, 220
projects
joining, 221
starting, 221-222
digital prototypes, purpose of, 420
digital systems thinking, 225, 234
Apple Picker game analysis, 229
GameObject action lists, 231-232
GameObject flowcharts, 232-234
GameObjects, 230-231
gameplay, 230
board games, 226
breaking down complex problems into
simpler ones, 229
code libraries, 228
computer languages, 227
development environment, 228
simple instructions exercise, 226-227
direction in Apple Picker, changing, 432-434
directionality (contrast), indirectly guiding
players by, 204
directly guiding players
Assassin's Creed IV: Black Flag, 199
Grand Theft Auto V, 199
Kya: Dark Legacy, 198
Legend of Zelda: Ocarina of Time, 199
methods of, 199
calls to action, 199
instructions, 199
maps/guidance systems, 199
pop-ups, 199
quality of guidance, determining, 198
Skyrim, 198
Valkyrie Chronicles, 198
discernable actions (meaningful play), 64, 121
discounts (educational software), 855
Disneyland, indirect guidance example, 202
distributions (weighted) and game balance,
173-175
Doctor Who, foreshadowing and interactive
narrative, 55
871
872
E
editing formulas (Calc spreadsheets), 164
education
Games Education Programs, 215-217
EXTRAPOLATION (LINEAR)
F
Fable, limited possibilities and interactive or
linear narrative, 53-54
Facade, autotelic empowerment as a
player-centric goal of design, 117
Factory software design pattern, 816
falling action (Act IV), five-act dramatic narrative
structures, 51
Fallout 3, side quests, 54
fame as a goal of game design, 107
fan art (cultural aesthetics), 82
fan fiction as cultural narrative, 83
Farmville
lusory attitude and, 111-112
spoilage mechanic, 112
Farscape, foreshadowing and interactive
narrative, 55
fastest path to testing, determining (analysis
phase of iterative design), 92
FATE system, 846
interactive versus linear narrative, 55
tips for running good campaigns, 846-847
FDD framework (ludology), 20, 24, 29
defining, 24
Dramatic elements, 24-26
characters, 26
premises, 25
purposes of, 26
stories, 26
Dynamic elements, 24, 26-27
Emergence, 26-27
Emergent Narrative, 27
playtesting, 27
Formal elements, 24-25
boundaries, 25
873
874
objectives, 25
outcomes, 25
player interaction patterns, 24
procedures, 25
resources, 25
rules, 25
feature lists/product backlogs (Scrum software
development methodologies), 408
feedback (positive/negative), game balance,
176-177
feel, designing for, 9-10
Fellowship of the Ring, emergent narrative
example, 77
Field, Syd
Foundations of Screenwriting, The, 51-52
three-act dramatic structure, 51-52
fiero, the concept of (player-centric game
design), 110
Final Fantasy III (U.S. release), NPC
development, 55
Final Fantasy VI (Japanese release), NPC
development, 55
Final Fantasy VII
empathetic characters versus avatars, 56
final outcomes (dynamic mechanics),
example of, 69
limited possibilities and interactive or linear
narrative, 53-54
Final Fantasy X, limited possibilities and
interactive or linear narrative, 53-54
final outcomes (dynamic mechanics), 69
firing weapons, gameplay development (paper
prototyping), 134-135, 137-138
first plot point (three-act dramatic narrative
structure), 52
five-act dramatic narrative structure
climax (Act III), 51
denouement (Act V), 51
exposition (Act I), 50-51
falling action (Act IV), 51
rising action (Act II), 51
float variables (C# coding), 284
Flocks, Herds, and Schools: A Distributed Behavior
Model, OOP (Object-Oriented
Programming), 393
875
876
FULLERTON, TRACY
G
game balance, 155, 183
defining, 156
Calc, installing, 156-157
dice probability, determining with Calc,
157-158
adjusting column widths, 160
charting results, 164
counting die roll sums, 163-164
creating Die A row, 160-161
creating Die B row, 161-162
creating probability distribution charts, 164
creating rows, 159
entering data in cells, 158-159
labeling rows, 162-163
spreadsheets, creating, 158
summing dice role results, 163
Unity example, 825-829
permutations, 175-176
positive/negative feedback, 176-177
randomization
custom card decks, 172
dice, 170
playing cards, 171-173
shuffling decks, 172-173
spinners, 170
Ten Rules of Probability Every Game Designer
Should Know, 165-169
weapons, balancing, 177-178
average damage, 179-180
Chapter 9 prototype example, 182-183
GAMEOBJECTS
877
878
GAMEOBJECTS
fun, 109-110
interesting decisions, 120-122
lusory attitude, 110-112
structured conflict, 115-116
God of War, flow as a player-centric goal of
design, 115
gold phase (project development process), 103
Goldstone, Will, and Unity-related websites, 853
Grand Theft Auto, resource mechanics, 45
Grand Theft Auto V, player guidance, 199
graphics (frames)
defining, 232
flowcharts (GameObjects), 232
Grasshopper, The, 10-11
lusory attitude as a player-centric goal of
design, 110-111
Suits, Bernard, 15
greater good, designing games for the, 108-109
Greater Than comparison operator (>) in C#
coding, 306
Greater Than or Equal To comparison operator
(>=) in C# coding, 306-307
Green, Ryan, and That Dragon, Cancer as a
personal expression/communication as a goal
of game design, 108
Gregory and Tic-Tac-Toe, Kia, 65
Groundhog Day, experiential understanding as a
player-centric goal of design, 122-123
group playtesting methods, 146-147
GUI (Graphical User Interfaces)
Apple Picker, 440-448
paper prototyping, 139
guides, fan-made game guides (cultural
technology), 84-85
guiding players, 210
direct guidance, 199
Assassin's Creed IV: Black Flag, 199
calls to action, 199
Grand Theft Auto V, 199
instructions, 199
Kya: Dark Legacy, 198
Legend of Zelda: Ocarina of Time, 199
maps/guidance systems, 199
quality of guidance, determining, 198
Skyrim, 198
H
HAL Laboratories, Kirby and integrated actions
(meaningful play), 64-65
Half-Life
game mods and cultural mechanics, 81-82
narrative premises, examples of, 49
Halo
inscribed dramatics, example of, 58
limited possibilities and interactive or linear
narrative, 53-54
879
880
I
ideation (brainstorming), 98
collection phase, 99
collision phase, 100-101
discussions, 101
expansion phase, 98-99
rating phase, 101
if statements (C# coding), 307-310
Ilinx (vertigionous play)
Imaginary Games, 110
Jeux et Le Hommes, Le, and the four different
kinds of play, 110
Imaginary Games, 15
Ilinx (vertigionous play), 110
structured conflict as a player-centric goal of
design, 115-116
immediacy of objectives (Inscribed layer
mechanics), 41
immediacy of sound (Inscribed Layer
aesthetics), 47
immediate outcomes (dynamic mechanics), 69
implementation phase (iterative design), 90-91,
94-97
defining, 33
five-act dramatic structure, 50-51
inscribed dramatics, purposes of, 57-58
interactive versus linear narrative, 53-57
linear versus interactive narrative, 53-57
plots, 50
premises, 49
settings, 49
three-act dramatic structure, 51-52
technology, 58
defining, 33
paper game technologies, 58-59
Inspector pane (Unity), 251
editing GameObjects, 272
GameObjects, components of, 294
installing
Calc, 156-157
Unity, 241
instance variables (C# coding), 289
instructions
directly guiding players by, 199
simple instructions exercise (systems
thinking), 226-227
int variables (C# coding), 284
integration
integrated actions (meaningful play),
64-65, 121
teaching players by, 209
interactive narrative
characters, 49
components of, 49-50
dynamic dramatics, 75
developing relationships through shared
experience, 76
interactive fiction and player experience,
75-76
five-act dramatic structure, 50-51
linear narrative versus, 53
empathetic characters versus avatars,
55-57
foreshadowing, 55
limited possibilities, 53-54
NPC development, 55
pen-and-paper RPG, 55
plot versus free will, 53-55
side quests, 54
881
882
INSTALLING
plots, 50
premises, 49
settings, 49
three-act dramatic structure, 51-52
interception fire, gameplay development (paper
prototyping), 137
interest as a player-centric goal of design,
118-120
interesting decisions as a player-centric goal of
design, 120-122
interesting polling (playtesting), 152
interfaces (C# coding), 769-770, 782-785,
807-810
Internet's role in playtesting, 145-146, 150
closed playtesting, 150
limited playtesting, 150
open playtesting, 150-151
interpolation, 831
interpolating values other than position,
834-835
linear interpolation, 831
easing, 837-841
time-based linear interpolation, 831-832
Zeno's Dichotomy Paradox and linear
interpolation, 833-834
intersectional innovation, 97, 99
interviewing, finding a career in the digital
game industry, 219-220
investigators (playtesting), defining, 142
involvement and attention as player-centric
goals of design, 118-120
Is Equal To comparison operator (==), 304
iterative design, 90
analysis phase, 90-91
determining audience, 91
determining fastest path to testing, 92
determining resources, 91-92
importance of repetition, 96-97
researching prior art, 92
design phase, 90
importance of listening, 92-94
importance of repetition, 96-97
implementation phase, 90-91, 94-97
repetition, importance of, 96-97
J
jagged arrays (C# coding), 340-342
jagged lists (C# coding), 342-344
JavaScript, 238-239
Jenkins on transmedia, Henry, 86
Jeux et Le Hommes, Le, and the four different
kinds of play, 110
jobs in the digital game industry, 217
following up, 218-219
interviewing, 219-220
networking, 217-218
salaries, 220
Johansson, Frans
innovation and the design process, 97
Medici Effect, The, 97
Johnson, Ralph
Design Patterns, 769-770, 815-817
software design, 815
Factory design pattern, 816
Singleton design pattern, 815-816
Strategy design pattern, 816-817
spawning enemies/enemy factories, 769-770
joining game projects in development, 221
Journey, 41
player guidance, 201-202, 206
tissue playtesters, 144-145
jump statements in loops (C# coding), 322-324
justification (inscribed dynamics), 57-58
K
Kaboom!, game analysis (systems thinking), 229
GameObject action lists, 231-232
GameObject flowcharts, 232-234
GameObjects, 230-231
gameplay, 230
Kaplan, Larry, on Kaboom! game analysis
(systems thinking), 229-234
LAYERED TETRAD
L
lab setups for formal individual playtesting,
148-149
labeling rows (Calc spreadsheets), 162-163
landmarks
indirectly guiding players by, 201-202
space and landmarks (Inscribed Layer
mechanics), 45-46
languages (computer) and systems
thinking, 227
Larson, Josh, and That Dragon, Cancer as a
personal expression/communication as a goal
of game design, 108
Last of Us, The, and screenresolution, 73
law and cultural impact of games, 86-87
883
884
LAYERED TETRAD
defining, 20-21
designer views of games, 21
player views of games, 21
Legend of Zelda: Ocarina of Time, The, and player
guidance, 199
Legend of Zelda, The
resource mechanics, 45
silent protagonists (empathetic characters
versus avatars), 56
Legend of Zelda: The Wind Waker, The
inscribed dramatics, example of, 57-58
narrative game mods, 83
Legend of Zelda: Twilight Princess, The, andtouch
as an Inscribed Layer aesthetic, 48
LeMarchand, Richard
attention and involvement as player-centric
goals of design, 118-120
engaging play as a player-centric goal of
game design, 110
Less Than comparison operator (<) in C#
coding, 306
Less Than or Equal To comparison operator (<=)
in C# coding, 306-307
Level Up! The Guide to Great Video Game Design,
64, 202
levels (custom) and cultural mechanics, 82
licensing Unity, 241-242
light, indirectly guiding players by, 201-202
limited playtesting (beta tests), 150
limited possibilities and interactive
narrative, 53-54
Linderman, Frank Bird,
Chief Plenty-Coups and coup-counting as a
game, 115-116
structured conflict as a player-centric goal of
design, 115-116
linear extrapolation, 835-837
linear interpolation, 831
easing, 837-841
time-based linear interpolation, 831-832
Zeno's Dichotomy Paradox and linear
interpolation, 833-834
linear narrative
characters, 49
components of, 49-50
LUSORY ATTITUDE
M
machinima, 83-84
magic circle concept and lusory attitude, 112
Magic:The Gathering, illegal cards and
emergence (Dynamic Layer), 64
Mainichi
experiential understanding as a
player-centric goal of design, 122-123
personal expression/communication as a
goal of game design, 108
Majestic, 17, 44
Mangle of Play, The, and the cultural aspects of
game development, 80-81
Manifesto for Agile Software Development,
406-407
maps/guidance systems, directly guiding
players by, 199
Marathon, researching prior art (analysis phase
of iterative design), 92
Mario Kart and game balance, 177
Mark of the Ninja, intent versus execution, 187
Mass Effect
multiple dialogue choices (empathetic
characters versus avatars), 57
player interaction patterns, 43
resolution (screen), 73
Mateas, Michael
autotelic empowerment as a player-centric
goal of design, 117
Faade, 117
math and game balance, 155, 183
balance, defining, 156
885
886
MACHINIMA
MISSION DEMOLITION
rules, 40, 44
spaces, 40, 45-46
tables, 40, 46
reinforcing via inscribed dramatics, 58
spoilage mechanic (Farmville), 112
Medici Effect, The, innovation and the design
process, 97
medium-term objectives and space (Inscribed
Layer mechanics), 46
meetings and Scrum software development
methodologies, 409
Meier, Sid
Civilization, tables, 40-41
C.P.U. Bach, music in, 71
games, defining, 13
interesting decisions as a player-centric goal
of design, 121
melee, pronunciation of, 42
Meretzky, Steven
developing relationships through shared
experience, 76
Planetfall, 76
Mesh Collider component (GameObjects), 295
Mesh Filter component (GameObjects), 272, 295
Mesh Renderer component (GameObjects), 272
Microsoft controllers
axis mapping, 848-849
button mapping, 848-849
Midgley, Mary
Game Game, The, 15-16
games, defining, 15-16
migraines, player considerations (environmental
aesthetics), 74
Miles, Rob, and CSharp Yellow Book, 854
Mimicry, Le Jeux et Le Hommes and the four
different kinds of play, 110
Minecraft
autotelic empowerment as a player-centric
goal of design, 117
player guidance, 200
player-built external tools as example of
cultural technology, 84
procedural environments, 73
887
888
MISSION DEMOLITION
Frequency, 70-71
HRS (Horizontal Re-Sequencing), 70
immediacy of sound (Inscribed Layer
aesthetics), 47
iMUSE (Interactive MUsic Streaming
Engine), 70
Osu Tatake Ouendan!, 71
PaRappa the Rapper, 70-71
PCO (Procedural Composition), procedural
music, 71
VRO (Vertical Re-Orchestration), procedural
music, 70-71
Myst, 188
N
Nakamura, Jeanne
autotelic empowerment as a player-centric
goal of design, 116-117
Concept of Flow, 113-114, 116-117
flow as a player-centric goal of design,
113-114
naming
C# naming conventions, 286-287
projects in Unity, 266
narrative
attention and involvement as player-centric
goals of design, 120
Cultural Layer (Layered Tetrad), 83
defining, 36
fan fiction as cultural narrative, 83
game mods as cultural narrative, 83
machinima, 83-84
Dynamic Layer (Layered Tetrad), defining, 34
emergent narrative, 76-77
Inscribed Layer (Layered Tetrad), 49
characters, 49
components of, 49-50
defining, 33
five-act dramatic structure, 50-51
inscribed dramatics, purposes of, 57-58
interactive versus linear narrative, 53-57
linear versus interactive narrative, 53-57
plots, 50
premises, 49
OKAMI
settings, 49
three-act dramatic structure, 51-52
interactive narrative (dynamic dramatics), 75
developing relationships through shared
experience, 76
interactive fiction and player experience,
75-76
Naughty Dog
Uncharted
inscribed dramatics, example of, 58
limited possibilities and interactive or
linear narrative, 53-54
role fulfillment (empathetic characters
versus avatars), 56
Uncharted 2: Drake's Deception, machinima
example, 84
Uncharted 3
particle systems (procedural visual art),
71-72
player guidance, 203
navigating Unity, 251
negative/positive feedback, game balance,
176-177
networking, finding a career in the digital game
industry, 217-218
Neverwinter Nights, narrative game mods, 83
Nintendo, Mario Kart and game balance, 177
noisy environments (environmental
aesthetics), 74
Not Equal To comparison operator (!=) in C#
coding, 306
NOT operator (!) in C# coding, 300
novel decisions as part of player-centric
design, 121
NPC (Non-Player Characters)
development of (interactive narratives), 55
indirectly guiding players by, 205-206
O
objectives
FDD framework, 25
gameplay development (paper prototyping),
132
Inscribed Layer (Layered Tetrad), 40-41
conflicting objectives, 42
immediacy of objectives, 41
importance of objectives, 42
long-term objectives and space, 46
medium-term objectives and space, 46
short-term objectives and space, 46
objects, C# as OOC (Object-Oriented Coding),
258-259
Okami
empathetic characters versus avatars, 56
touch as an Inscribed Layer aesthetic, 48
Omega Mage
changing rooms, 764-768
creating the game environment, 730-735
customizing setup, 789
damaging players, 777-782
enemies, 768-770
damaging, 772-777
enemy factories, 785-789
EnemyBug GameObjects, 770-780
EnemySpiker GameObjects, 780-782
interfaces, 782-785
example of play, 728-729
fire ground spell, 754-762
fire spell, 761-762
fire-and-forget spells, 762-764
ground spell, 756-761
importing Unity asset packages, 729
inventories
camera setup, 748-749
creating, 747-748
selecting elements, 749-754
Mage GameObject (player character),
735-737
mouse interaction, 737-741
moving when dragging, 746-747
tap indicators, 743-745
movement, 741-747
project setup, 729
online playtesting, 150
closed playtesting, 150
limited playtesting, 150
open playtesting, 150-151
889
890
OMEGA MAGE
online resources
animation/model resources, 854-855
art assets, 854
audio assets, 854
C# resources, 853-854
educational software discounts, 855
font-related resources, 855
game developer salary surveys, 220
model/animation resources, 854-855
Unity
tutorials, 852
Unity-related websites, 852-853
OOC (Object-Oriented Coding), C# as, 258-259
OOP (Object-Oriented Programming) in C#. See
also classes (C# coding), 391, 403
Boids project, 394
building simple models, 394-396
project setup, 394
scripts, 397-403
defining through metaphors, 392-393
open playtesting (beta tests), 150-151
OpenOffice Calc. See Calc
OR operator (||) in C# coding, 300
Origin Systems, Ultima IV, actions (players),
tracking and reacting to (empathetic
characters versus avatars), 57
orthographic cameras, 425-426
OS X
force-quitting applications, 317-318, 371
right-clicking and, 265, 849-850
Unity, new project setup procedures,
794-796
Osu Tatake Ouendan!
fulfilling play as a player-centric goal of
game design, 110
music in, 71
outcomes
Dynamic Layer (Layered Tetrad), 69
FDD framework, 25
overall damage, showing (weapons and game
balance), 181
overscoping (design process), 103-104
P
Pajitnov, Alexi
Art of Puzzle Design, The, 186
eight steps of puzzle design, 191-192
genres of puzzles, 187-188
goals of effective design, 192-193
reasons for playing puzzles, 189
required modes of thought in solving, 189
Tetris, 186
panes (Unity), 251
Console pane, 251
Game pane, 251
Hierarchy pane, 251
Inspector pane, 251
layouts, configuring, 246-251
Project pane, 251
Scene pane, 251
Papa Sangre, sound as an Inscribed Layer
aesthetic, 47
Papa y Yo, personal expression/communication
as a goal of game design, 108
paper games
Dungeons & Dragons, 846-847
FATE system, 846-847
progression, 59
randomization, 59
custom card decks, 172
dice, 170
playing cards, 171-173
shuffling decks, 172-173
spinners, 170
state tracking, 59
tips for running good campaigns, 846-847
paper prototyping, 125, 140
benefits of, 126
best uses for, 138-139
example of, 129
determining mission types, 131-133
gameplay development, 132-137
GM strategies, 137
initial concept development, 129-130
playtesting, 138
prototype construction, 131-133
movement systems, 127-128, 134, 138
poor uses for, 139
PHYSICS GAMES
891
892
PLANETFALL
Poker
game balance and, 176-177
Red Dead Redemption rule mechanics, 44
art assets, 614-615
backgrounds, 614-615
beginning/end of round announcements,
615-616
chain scoring, 605-607
clickable card functionality, 597-600
creating cards from sprites, 566-581
displaying scores to players, 607-614
draw and discard actions, 597-604
earning points, 604-605
example of play, 584-585
game logic, 597-604
giving player feedback on scores, 616-619
gold cards, 620
importing images as sprites, 564-566
importing Unity asset packages, 562
matching drawn cards, 600-604
mine tableau layout, 585-592
mobile device build settings, 562-563, 620
positioning cards on tableau, 592-594
project setup, 562
rules of the game, 583-584
scoring, 604-619
setting up sorting layers on tableau,
594-597
shuffling cards, 581-583
Prospector Solitaire, 561
randomization, 171-173
riffle shuffling, 7
shuffling, 7, 172-173
Vectorized Playing Cards 1.3
Bartok, 622
Prospector Solitaire, 562
playtesting, 141, 153
ADL (Automated Data Logging), 151
analyzing game play, Bartok, 7
AT (Automated Testing), 153
Bartok, 6-10
beta tests
closed playtesting, 150
limited playtesting, 150
open playtesting, 150-151
transmedia example, 85
Poker
game balance and, 176-177
Red Dead Redemption rule mechanics, 44
polling (interest) and playtesting, 152
pop-ups, directly guiding players by, 199
position puzzles/sliding blocks in action
games, 193
positive/negative feedback, game balance,
176-177
possible outcomes of probability, 166
post-release phase (project development
process), 103
power-ups, building in Space SHMUP, 531-538,
541-543
practical probability versus theoretical
probability, 169
prefabs (Unity), 273-277
premises
FDD framework, 25
Inscribed Layer (Layered Tetrad)
defining, 49
examples of, 49
preproduction phase (project development
process), 102
Prince of Persia, limited possibilities and
interactive or linear narrative, 53-54
Prince of Persia: The Sands of Time, limited
possibilities and interactive or linear
narrative, 53-54
prior art, researching (analysis phase of iterative
design), 92
prioritizing tasks in burndown charts, 414-415
probability
adding probabilities, 166
decimals, 165-166
dice probability, determining with Calc,
157-158
adjusting column widths, 160
charting results, 164
counting die roll sums, 163-164
creating Die A row, 160-161
creating Die B row, 161-162
creating probability distribution charts, 164
creating rows, 159
893
894
PROJECTS
895
896
PROJECTS
teams, 408
setup procedures, 264, 793, 796
attaching C# scripts to scene Main Camera,
797-798
creating C# scripts, 797
new projects, 794-796
saving scenes, 796-797
Space SHMUP. See Space SHMUP
starting, 221-222
Word Game. See Word Game
Projects folder (Unity), viewing contents of, 265
Prospector Solitaire, 561
art assets, 614-615
backgrounds, 614-615
beginning/end of round announcements,
615-616
clickable card functionality, 597-600
draw and discard actions, 597-604
example of play, 584-585
game logic, 597-604
gold cards, 620
importing Unity asset packages, 562
matching drawn cards, 600-604
mine tableau layout, 585-592
positioning cards on tableau, 592-594
setting up sorting layers, 594-597
mobile device build settings, 562-563, 620
project setup, 562
rules of the game, 583-584
scoring
chain scoring, 605-607
displaying scores to players, 607-614
earning points, 604-605
giving player feedback on scores, 616-619
shuffling cards, 581-583
sprites
creating cards from sprites, 566-581
importing images as sprites, 564-566
protagonists (player roles), 43, 56
prototypes (digital)
Apple Picker. See Apple Picker
Bartok. See Bartok
Game Feel: A Game Designer's Guide to Virtual
Sensation, 420
Mission Demolition. See Mission Demolition
QUICKSNAP
Q
QA (Quality Assurance) testing, 152-153
Quake, machinima example, 84
Quake 2, game mods and cultural mechanics, 81
quaternion variables (C# coding), 291-292
quest outcomes (dynamic mechanics), 69
questions, asking (game play analysis), Bartok, 7
QuickSnap, 695
aspect ratios, 697
build settings, 696
camera setup, 702-705
customizing setup, 725-726
debugging, 713-714
R
race conditions (C# coding), 812-814
RAND formula (Calc), weighted probabilities,
174-175
randomization
dice, 170
paper game technologies, 59
playing cards, 171-172
custom card decks, 172
shuffling decks, 172-173
spinners, 170
rate of fire (weapons), gameplay development
(paper prototyping), 134-135, 137-138
rating phase (brainstorming/ideation), 101
Ravensburger and Up The River
inscribed dramatics, example of, 58
optimal strategy, determining (dynamic
mechanics), 65-66
real hours versus estimated hours (burndown
charts), 413
rebalancing weapons, 177-178
recursive Bzier curves, 844-845
recursive functions (C# coding), 361-362
Red Dead Redemption
climax, example of (dramatic narrative
structure), 53
Poker in, 44
rule mechanics, 44
897
898
SCHELL, JESSE
S
salaries in the digital game industry, 220
Salen, Katie
meaningful play
defining, 64
interesting decisions as a player-centric
goal of design (dynamic procedures),
120-121
Rules of Play: Game Design Fundamentals, 64,
120-121
scenes (Unity)
saving, 796-797
Scene pane, 251
Schell, Jesse
Art of Game Design: A Book of Lenses, The, 4,
11, 20, 27
899
900
SCHELL, JESSE
starfields, 556-558
tags, 511-513
weapon definitions, 521-525
spaces, Inscribed Layer (Layered Tetrad), 40, 45
experiences, 46
flow, 45
landmark, 45-46
long-term objectives, 46
medium-term objectives, 46
purposes of space, 45
short-term objectives, 46
Spec Ops: The Line
inscribed dramatics, example of, 57-58
limited possibilities and interactive or linear
narrative, 53-54
speed (sense of)/vection, Mission Demolition,
466-471
Spider-Man 2, quest outcomes (dynamic
mechanics), example of, 69
spinners (randomization), 170
spoilage mechanic (Farmville), 112
Spoilsport player type, 68
sporadic-play games and lusory attitude,
111-112
Spore, procedural animation, 72
spreadsheet programs. See Calc
spreadsheets (Calc)
cells, entering data, 158-159
columns
adjusting column widths, 160
labeling rows, 162-163
creating, 158
formulas, exiting formula editing, 164
rows
creating, 159
creating Die A row, 160-161
creating Die B row, 161-162
labeling rows, 162-163
sprints/releases (Scrum software development
methodologies), 408
sprites and Prospector Solitaire
creating cards from sprites, 566-581
importing images as sprites, 564-566
Stack Overflow website, C# online
resources, 853
901
902
T
tables
Civilization, 40-41
Inscribed Layer (Layered Tetrad), 40, 46
playtest data, 46
probability tables, 46
progression tables, 46
Tales of the Arabian Nights, probability tables, 46
teaching new skills/concepts, sequencing,
207-209
team competition (player interaction
patterns), 43
Team Fortress 2
Dynamic Layer (Layered Tetrad) example,
36-37
freemium games, 214
Technique of Dramas, The, five-act dramatic
structure, 50-51
technology
Cultural Layer (Layered Tetrad), 84
defining, 36
external tools (player-built) and cultural
technology, 84-85
game technology used in other fields, 84
Dynamic Layer (Layered Tetrad), defining, 34
dynamic technology, 77
Elemental Tetrad framework, 28
Inscribed Layer (Layered Tetrad), 58
defining, 33
paper game technologies, 58-59
Tekken, fulfilling play as a player-centric goal of
game design, 110
Ten Rules of Probability Every Game Designer
Should Know, 165-169
testing phase (iterative design), 91, 95-96. See
also playtesting
fastest path to testing, determining (analysis
phase of iterative design), 92
repetition, importance of, 96-97
Tetris, 186
text
font-related resources, 855
903
904
U
Ultima IV, tracking and reacting to (empathetic
characters versus avatars), 57
Uncharted
inscribed dramatics, example of, 58
limited possibilities and interactive or linear
narrative, 53-54
role fulfillment (empathetic characters
versus avatars), 56
Uncharted 2: Drake's Deception, machinima
example, 84
Uncharted 3
particle systems (procedural visual art),
71-72
player guidance, 203
unilateral competition (player interaction
patterns), 43
Unity, 235, 237, 251
AngryBots project example, 242-246
Apple Picker. See Apple Picker
art assets, Unity Asset Store, 854
aspect ratios
QuickSnap, 69
Space SHMUP, 490
asset packages
Omega Mage, 729
Prospector Solitaire, 562
QuickSnap, 696-697
Space SHMUP, 488-490
Assets folder, 265-266
audio assets, Unity Asset Store, 854
axis mapping, InputManager (Unity),
491-494
Bzier curves, 842-845
C# coding
attaching scripts to scene Main Camera,
797-798
coroutines, 802-803
creating scripts, 266-271, 797
interfaces, 807-810
online resources, 853-854
race conditions, 812-814
creating projects in, 264-266
debugging C# coding
attaching debugger to Unity, 372-374
stepping through code, 369-371, 373-377
variables, 375-376
downloading, 236
educational software discounts, 855
equality testing, 304
first-person controllers, QuickSnap, 697-698
force-quitting, 371-372
functions (C# coding), defining, 350-353
GameObjects, 281, 293-294
Box Collider component, 295
Box Colllider component, 272
Capsule Collider component, 295
Collider components, 295-296
Colllider components, 272
creating, 271-272
editing, 272, 277-278
gizmos, 277
Mesh Collider component, 295
Mesh Filter component, 272
Mesh Renderer component, 272
Mesh Filter component, 295
playing, 272-273
prefabs, 273-277
Renderer component, 295
RigidBody component, 272, 296
UNITY
905
906
UNITY
V
Valkyria Chronicles, 129, 198
Valve
Counter Strike, game mods and cultural
mechanics, 81-82
Half-Life, game mods and cultural
mechanics, 81-82
Team Fortress 2, Dynamic Layer (Layered
Tetrad) example, 36-37
variables (C# coding), 256-257, 282
bool variables, 283
char variables, 285
class variables, 286
debugging C# coding, 375-376
declaring, 282-283
defining, 282-283
equality testing, 304
float variables, 284
int variables, 284
literal values, 283
naming conventions, 286-287
private variables, 287
scope of, 286, 817-820
string variables, 285
types of, 283-286
Unity variables, 287-289
color variables, 290-291
instance variables, 289
mathf variables, 292
quaternion variables, 291-292
screen variables, 292
SystemInfo variables, 293
Vector3 variables, 288-290
vection/sense of speed, Mission Demolition,
466-471
Vector3 variables (C# coding), 288-290
Vectorized Playing Cards 1.3
Bartok, 622
Prospector Solitaire, 562
vertiginous play (Ilinx)
Imaginary Games, 110
Jeux et Le Hommes, Le, and the four different
kinds of play, 110
visibility (paper prototyping and gameplay
development), 133-134, 136
W
Warcraft III, game mods and cultural mechanics,
81-82
wealth as a goal of game design, 107
weapons and game balance, 177-178
average damage
calculating, 179
charting, 179-180
Chapter 9 prototype example, 182-183
duplicating weapon data, 180-181
overall damage, showing, 181
percent chance for each bullet,
determining, 178
rebalancing weapons, 181-182
weapons/firing, gameplay development (paper
prototyping), 134-135, 137-138
web resources, game developer salary
surveys, 220
websites
animation/model resources, 854-855
art assets, 854
audio assets, 854
educational software discounts, 855
font-related resources, 855
WORLD OF WARCRAFT
scoring, 684-687
setting up, 664-671
working in the digital game industry, 217
following up, 218-219
interviewing, 219-220
networking, 217-218
salaries, 220
working conditions, 213
World of Warcraft
player interaction patterns, 43
player-built external tools as example of
cultural technology, 84
Wright, Will
procedural animation, 72
Spore, 72
Wyatt, James, on XP (Experience Points)
and cumulative outcomes (dynamic
mechanics), 69
X-Y-Z
XML (Extensible Markup Language)
C# coding and, 817-821
Omega Mage, creating the game
environment, 730-735
XP (Experience Points) and cumulative
outcomes (dynamic mechanics), 69
X-Wing
information, conveying (Inscribed Layer
aesthetics), 48-49
music in, 70
Yager Development, Spec Ops: The Line and
limited possibilities and interactive or linear
narrative, 53-54
Yee, Nick, on types of players, 68
Zeno's Dichotomy Paradox and linear
interpolation, 833-834
Zimmerman, Eric
meaningful play, 64, 120-121
Rules of Play: Game Design Fundamentals, 64,
120-121
Zork, interactive narrative example, 75-76
907
908
WRIGHT, WILL