Register your product to gain access to bonus material or receive a coupon.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
Learn All the Design & Development Skills You Need to Make Great Games with Unity, the World's Most Popular Professional Game Engine
If you want to design and develop games, there is no substitute for strong, hands-on experience with modern techniques and tools. That is exactly what this book provides. Leading instructor and indie game developer Jeremy Gibson Bond covers all three disciplines that you need to succeed: game design theory, rapid iterative prototyping, and practical programming.
Building on two previous best-sellers, this Third Edition contains hundreds of improvements across more than 400 new pages, all designed to make it even easier to understand and more useful in modern game development.
The five game tutorials have been thoroughly revised and expanded to cover even more best practices for prototyping and development, and all examples now use Unity 2020.3 LTS (Long Term Support), a stable and feature-rich standard for years to come. The new content includes greatly enhanced tutorials, a chapter on Unity's high-performance Data-Oriented Tech Stack (DOTS), new Coding Challenges to help you transition to making your own games from scratch, and tips on next steps after you have finished the book. The revamped website includes playable versions of all example games, plus an exciting new tool that provides immediate feedback on potential errors in your own code.
Part I: Game Design and Paper Prototyping
Part II: Programming C# in Unity
Part III: Game Prototype Tutorials
NEW! Part IV: Next Steps
Download the sample pages (includes Chapter 1)
Foreword
Preface
PART I Game Design and Paper Prototyping
Chapter 1 Thinking Like a Designer
You Are a Game Designer
Bartok: A Game Design Exercise
The Definition of Game
Summary
Chapter 2 Game Analysis Frameworks
Common Frameworks for Ludology
MDA: Mechanics, Dynamics, and Aesthetics
Formal, Dramatic, and Dynamic Elements
The Elemental Tetrad
Summary
Chapter 3 The Layered Tetrad
The Inscribed Layer
The Dynamic Layer
The Cultural Layer
The Responsibility of the Designer
Summary
Chapter 4 The Inscribed Layer
Inscribed Mechanics
Inscribed Aesthetics
Inscribed Narrative
Inscribed Technology
Summary
Chapter 5 The Dynamic Layer
The Role of the Player
Emergence
Dynamic Mechanics
Dynamic Aesthetics
Dynamic Narrative
Dynamic Technology
Summary
Chapter 6 The Cultural Layer
Beyond Play
Cultural Mechanics
Cultural Aesthetics
Cultural Narrative
Cultural Technology
Authorized Transmedia Are Not Part of the Cultural Layer
The Cultural Impact of a Game
Summary
Chapter 7 Acting Like a Designer
Iterative Design
Innovation
Brainstorming and Ideation
Changing Your Mind
Scoping!
Summary
Chapter 8 Design Goals
Design Goals: An Incomplete List
Designer-Centric Goals
Player-Centric Goals
Summary
Chapter 9 Paper Prototyping
The Benefits of Paper Prototyping
Paper Prototyping Tools
Paper Prototyping for Interfaces
A Paper Prototype Example
Best Uses for Paper Prototyping
Poor Uses for Paper Prototyping
Summary
Chapter 10 Game Testing
Why Playtest?
Being a Great Playtester Yourself
The Circles of Playtesters
Methods of Playtesting
Other Important Types of Testing
Summary
Chapter 11 Math and Game Balance
The Meaning of Game Balance
The Importance of Spreadsheets
Examining Dice Probability with Sheets
The Math of Probability
Randomizer Technologies in Paper Games
Weighted Distributions
Weighted Probability in Google Sheets
Permutations
Using Sheets to Balance Weapons
Positive and Negative Feedback
Summary
Chapter 12 Guiding the Player
Direct Guidance
Indirect Guidance
Teaching New Skills and Concepts
Summary
Chapter 13 Puzzle Design
Scott Kim on Puzzle Design
The Steps of Solving a Puzzle
Puzzle Examples in Action Games
Designing and Developing Puzzle Games
Summary
Chapter 14 The Agile Mentality
The Manifesto for Agile Software Development
Scrum Methodology
Burndown Chart Example
Creating Your Own Burndown Charts
Summary
Chapter 15 The Digital Game Industry
About the Game Industry
Game Education
Getting Into the Industry
Don't Wait to Start Making Games!
Summary
PART II Programming C# in Unity
Chapter 16 Thinking in Digital Systems
Systems Thinking in Board Games
An Exercise in Simple Instructions
Game Analysis: Apple Picker
Summary
Chapter 17 Introducing Unity Hub and the Unity Editor
Downloading Unity
Introducing Our Development Environment
Creating a Unity Account
Checking Out a Sample Project
Creating Your First Unity Project
Learning Your Way Around Unity
Setting Up the Unity Window Layout
Summary
Chapter 18 Introducing Our Language: C#
Understanding the Features of C#
Reading and Understanding C# Syntax
Summary
Chapter 19 Hello World: Your First Program
Creating a New Project
Making a New C# Script
Making Things More Interesting
Summary
Chapter 20 Variables and Components
Introducing Variables
Statically Typed Variables in C#
Important C# Variable Types
The Scope of Variables
Naming Conventions
Important Unity Variable Types
Unity GameObjects and Components
Summary
Chapter 21 Boolean Operations and Conditionals
Booleans
Comparison Operators
Conditional Statements
Summary
Chapter 22 Loops
Types of Loops
Set Up a Project
while Loops
do...while Loops
for Loops
foreach Loops
Jump Statements within Loops
Summary
Chapter 23 Collections in C#
C# Collections
Using Generic Collections
List<T>
Dictionary<Tkey, TValue>
Array
Multidimensional Arrays
Jagged Arrays
Jagged List<T>s
Choosing Whether to Use an Array or List
Summary
Chapter 24 Functions and Parameters
Setting Up the Function Examples Project
Definition of a Function
What Happens When You Call a Function?
Function Parameters and Arguments
Returning Values
Returning void
Function Naming Conventions
Why Use Functions?
Function Overloading
Optional Parameters
The params Keyword
Recursive Functions
Summary
Chapter 25 Debugging
Getting Started with Debugging
Stepping Through Code with the Debugger
Summary
Chapter 26 Classes
Understanding Classes
Class Inheritance
Summary
Chapter 27 Object-Oriented Thinking
The Object-Oriented Metaphor
An Object-Oriented Boids Implementation
Summary
Chapter 28 Data-Oriented Design
The Theory of Data-Oriented Design
DOTS Tutorial and Example
The Future of Unity DOTS
Summary
PART III Game Prototype Tutorials
Chapter 29 Apple Picker
What You Will Learn
The Apple Picker Prototype
The Purpose of a Digital Prototype
Preparing
Coding the Apple Picker Prototype
GUI and Game Management
Summary
Chapter 30 Mission Demolition
What You Will Learn
The Mission Demolition Prototype
Getting Started: Mission Demolition
Game Prototype Concept
Art Assets
Coding the Prototype
From Prototype to First Playable
Summary
Chapter 31 Space SHMUP -- Part 1
What You Will Learn
Getting Started: Space SHMUP
Setting the Scene
Making the Hero Ship
Adding Some Enemies
Spawning Enemies at Random
Setting Tags, Layers, and Physics
Making the Enemies Damage the Player
Restarting the Game
Shooting (Finally)
Summary
Chapter 32 Space SHMUP -- Part 2
What You Will Learn
Getting Started: Space SHMUP -- Part 2
Enemy to Enemy_0
Programming Other Enemies
Shooting Revisited
Showing Enemy Damage
Adding PowerUps and Boosting Weapons
Race Conditions & Script Execution Order
Making Enemies Drop PowerUps
Enemy_4 -- A More Complex Enemy
Tuning Settings for the Game Entities
Adding a Scrolling Starfield Background
Summary
Chapter 33 Prospector Solitaire -- Part 1
What You Will Learn
The Prospector Game
Getting Started: Prospector Solitaire
Build Settings
Setting Up the Unity Window Layout
Setting Up the Camera and Game Pane
Importing Images as Sprites
Constructing Cards from Sprites
Implementing Prospector in Code
Implementing Game Logic
Summary
Chapter 34 Prospector Solitaire -- Part 2
What You Will Learn
Getting Started: Prospector -- Part 2
Additional Prospector Game Elements
Adding GUI Elements to Display the Score
Building and Running Your WebGL Build
Summary
Chapter 35 Dungeon Delver -- Part 1
What You Will Learn
The Dungeon Delver Game
Getting Started: Dungeon Delver
Setting Up the Cameras
Understanding the Dungeon Data
Showing the Map with a Unity Tilemap
Adding the Hero
Giving Dray an Attack Animation
Dray's Sword
Programmatic Collision in Unity Tilemap
The InRoom Script
Enemy: Skeletos
Keeping GameObjects in the Room
Aligning to the Grid
Moving from Room to Room
Making the Camera Follow Dray
Summary
Chapter 36 Dungeon Delver -- Part 2
What You Will Learn
Getting Started: Dungeon Delver -- Part 2
Dungeon Delver -- Part 2 Overview
Implementing TileSwaps
Swapping in LockedDoor GameObjects
Implementing Keys and Unlocking Doors
Adding GUI to Track Key Count and Health
Enabling Enemies to Damage Dray
Making Dray's Attack Damage Enemies
Modifying Enemy to Take Damage
Picking Up Items
Enemies Dropping Items on Death
Implementing a New Dungeon -- The Hat
Implementing a Grappler
Summary
Part IV Next Steps
Chapter 37 Coding Challenges
What Is a Coding Challenge?
Getting Started on a Coding Challenge
Filling in the Blanks
How to Approach Each Challenge
Chapter 38 Beyond This Book
Continue to Learn Unity Development
Build a Classic Game
Start a Small Game Project or Prototype
Make Games for Lifelong Enrichment
Consider Going to School for GameDev
Explore Advanced Game Design
Finally, Drop Me a Line
PART V Online Appendices
Appendix A Standard Project Setup Procedure
The Set Up Sidebar for Tutorial Projects
Setting Up a New Project
Importing a Starter UnityPackage
Setting the Scene Name
Setting the Game Pane to Full HD (1080p)
Setting Up a WebGL Build
Understanding Unity Version Control
Summary
Appendix B Useful Concepts
Topics Covered
C# and Unity Coding Concepts
Attributes
Automatic Properties
Bitwise Boolean Operators and Layer Masks
Coroutines
Unity Example--Coroutines
Delegates, Events, and UnityEvents
UnityEvents
Enums
Extension Methods
Interfaces
Unity Example--Interfaces
Unity Makes Frequent Use of Interfaces for Observer Pattern
JSON (JavaScript Object Notation) in Unity
Lambda Expressions =>
Naming Conventions
Object-Oriented Software Design Patterns
Component Pattern
Observer Pattern
Singleton Pattern
Strategy Pattern
More Information on Design Patterns in Game Programming
Operator Precedence and Order of Operations
Race Conditions
Unity Example--Race Conditions
Recursive Functions
String Interpolation -- $""
StringBuilder
Structs
Unity Messages Beyond Start() and Update()
Life-Cycle Messages
Frame-Based Messages
Physics-Based Messages
Variable Scope
XML
XML Documentation in C#
Math Concepts
Cosine and Sine (Cos and Sin)
Unity Example--Sine and Cosine
Dice Probability Enumeration
Unity Example--Dice Probability
Using Data-Oriented Design to Improve the DiceProbability Code
Dot Product
Interpolation
Linear Interpolation
Time-Based Linear Interpolations
Linear Interpolations Using Zeno's Paradox
Interpolating More Than Just Position
Linear Extrapolation
Easing for Linear Interpolations
Bezier Curves
Three-Point and Four-Point Bezier Curves
A Recursive Bezier Curve Function
A Data-Oriented Bezier Function
Pen-and-Paper Roleplaying Games
Tips for Running a Good Roleplaying Campaign
User Interface Concepts
Complex Game Controller Input
Input Manager Mapping for Various Controllers
Right-Click on macOS
Control-Click = Right-Click
Use Any PC Mouse
Set Your macOS Mouse to Right-Click
Set Your macOS Trackpad to Right-Click
Appendix C Online Reference
Tutorials
Unite Conference
Unity's YouTube Channel
Programming
Searching Tips
Finding and Creating Assets
Other Tools and Educational Discounts
Appendix D Tips for Teaching from This Book
The Goal of This Appendix
Teaching Introduction to Game Design
Teaching Introduction to Game Programming
More Information Is Available