Learning 2D Game Development with Unity: A Hands-On Guide to Game Creation


The Unity Engine Tutorial for Any Game Creator


Unity is now the world’s #1 game engine, thanks to its affordability, continuous improvements, and amazing global community. With Unity, you can design, code, and author your game once, and then deploy it to multiple platforms, reaching huge audiences and earning maximum returns. Learning 2D Game Development with Unity® will help you master Unity and build powerful skills for success in today’s ...

See more details below
BN.com price
(Save 27%)$44.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (14) from $20.88   
  • New (11) from $24.06   
  • Used (3) from $20.88   
Learning 2D Game Development with Unity: A Hands-On Guide to Game Creation

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac

Want a NOOK? Explore Now

NOOK Book (eBook)
BN.com price
(Save 44%)$35.99 List Price


The Unity Engine Tutorial for Any Game Creator


Unity is now the world’s #1 game engine, thanks to its affordability, continuous improvements, and amazing global community. With Unity, you can design, code, and author your game once, and then deploy it to multiple platforms, reaching huge audiences and earning maximum returns. Learning 2D Game Development with Unity® will help you master Unity and build powerful skills for success in today’s game industry. It also includes a bonus rundown of the new GUI tools introduced in Unity’s version 4.6 beta.


With this indispensable guide, you’ll gain a solid, practical understanding of the Unity engine as you build a complete, 2D platform-style game, hands-on. The step-by-step project will get you started fast, whether you’re moving to Unity from other engines or are new to game development.


This tutorial covers the entire development process, from initial concept, plans, and designs to the final steps of building and deploying your game. It illuminates Unity’s newly integrated 2D toolset, covering sprites, 2D physics, game scripts, audio, and animations. Throughout, it focuses on the simplest and lowest-cost approaches to game development, relying on free software and assets. Everything you’ll need is provided.


Register your book at informit.com/title/9780321957726 to access assets, code listings, and video tutorials on the companion website.


Learn How To

  • Set up your Unity development environment and navigate its tools
  • Create and import assets and packages you can add to your game
  • Set up game sprites and create atlas sheets using the new Unity 2D tools
  • Animate sprites using keyframes, animation controllers, and scripting
  • Build a 2D game world from beginning to end
  • Establish player control
  • Construct movements that “feel right”
  • Set up player physics and colliders
  • Create and apply classic gameplay systems
  • Implement hazards and tune difficulty
  • Apply audio and particle effects to the game
  • Create intuitive game menus and interface elements
  • Debug code and provide smooth error handling
  • Organize game resources and optimize game performance
  • Publish your game to the web for others to see and play


Read More Show Less

Product Details

  • ISBN-13: 9780321957726
  • Publisher: Addison-Wesley
  • Publication date: 12/28/2014
  • Series: Learning Series
  • Edition number: 1
  • Pages: 384
  • Sales rank: 578,062
  • Product dimensions: 7.00 (w) x 8.90 (h) x 0.90 (d)

Meet the Author

Matthew Johnson is a principal 3D artist at Firebrand Games in Merritt Island, Florida. He graduated with a BFA from the International Academy of Design, where he trained in computer animation before going on to study animation at Animation Mentor.

Matthew has been in game development for the past seven years working on more than a dozen AAA racing games, such as NASCAR, Hot Wheels, and the Need for Speed series. He has helped publish titles on almost every platform, including PC, Wii U, iOS, Android, and Steam.

In his spare time Matthew enjoys spending time with his wife and two kids and, when he finds time, pursuing his love for photography.

James A. Henley is an experienced game developer who has worked on several major titles and franchises, including Mass Effect, Dragon Age, Star Wars, and Skylanders, over the past decade. He originally entered the industry via the Neverwinter Nights modding community, where he was able to indulge his desires to craft content, tell stories, and write code all at the same time. He turned that love into a job opportunity at BioWare, where he spent three years with the Edmonton studio and five more with the Austin studio in a variety of design roles before briefly working for Activision.

Currently, James is working as an independent developer on [TITLE REDACTED] and is actively live streaming to share his love of games and game design in an interactive fashion. He may or may not also be a mad scientist. Analysis has proven inconclusive.

Read More Show Less

Table of Contents

Preface xix

Acknowledgments xxv

About the Authors xxvii

Introduction 1

Introduction to Unity 1

Project Wizard 4

Setting Our Project 6

Chapter 1: Setting Up the Unity Development Environment 9

Welcome Screen 9

The Unity Interface 10

Summary 25

Exercises 25

Chapter 2: Understanding Asset Creation 27

File Formats 27

Importing Our Assets 28

Importing Packages 31

GameObjects 33

Components 36

Summary 39

Exercises 39

Chapter 3: Creating 2D Sprites 41

Working in 2D 41

Building Our Sprites 43

Sprite Packing 48

Summary 50

Exercises 50

Chapter 4: Building the Game World 53

Level Design 101 53

Getting around Our Scene 56

Manipulating Objects in Unity 59

Our First Level 64

Continuing On 69

Summary 69

Exercises 70

Chapter 5: The Basics of Movement and Player Control 71

Coding in Unity3D 71

Making the Player Go 72

Setting Up a Basic Follow-Cam 83

Introducing the Input Manager 83

Error Handling and Debugging 85

Summary 93

Exercises 94

Chapter 6: Adding Animations to Our Scene 95

Some Rules for Animation 95

Creating Animations 99

Animation States 108

Working with the State Machine 115

Summary 116

Exercises 117

Chapter 7: Setting Up Player Physics and Colliders 119

Understanding Physics 119

2D versus 3D 120

Physics 2D Settings 122

Rigidbodies 124

Colliders 125

Physics Materials 128

Constraints 129

Summary 134

Exercise 134

Chapter 8: Creating and Applying Gameplay Systems 135

Trigger Volumes in Unity 135

Creating Checkpoints 136

Using Checkpoints with Respawn 140

Creating Collectibles 144

Tracking the Player’s Stats 155

Summary 157

Exercises 158

Chapter 9: Creating Hazards and Crafting Difficulty 159

Creating Your First Enemy 159

Dealing Damage 167

Handling Player Death 177

Expanding on Platforming 178

Creating Your Second Enemy 182

Maintaining Your Enemy Arrangements 187

A Few Words on Challenge 190

Summary 191

Exercises 191

Chapter 10: Creating the Menus and Interface Elements 193

UI Design 193

Unity Native GUI 194

Creating a Splash Screen 198

Title Screen 200

Game Over Screen 201

Game Win Screen 202

HUD 204

Summary 212

Exercise 213

Chapter 11: Applying Effects to the GameObjects 215

Introducing the Shuriken Particle System 215

Modules and Properties of a Particle System 217

Adding Particle Effects to the Game 220

Unity’s Audio System 227

Adding Sound to the Player 231

Adding Sound to the Collectible System 236

Applying Some Extra Polish 238

Summary 246

Exercises 246

Chapter 12: Organization and Optimization 247

Organizing Assets 247

Organizing Scripts and Code 253

Optimizations 261

Summary 267

Exercises 268

Chapter 13: Bringing It All Together 269

Tying the Levels Together 269

Hooking Up the Intro Screens 275

Win or Lose: Getting Back into the Action 277

Building and Deploying the Game 281

Moving Forward 286

Final Words 290

Chapter 14: UGUI 291

UGUI Components 291

Creating Our Example Interface 293

Summary 300

Appendix: JavaScript Code Samples 301

Player Scripts 301

Collectible Scripts 307

Enemy Scripts 309

Game System Scripts 310

GUI Scripts 314

Hazard Scripts 320

System Scripts 322

Index 323

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)