Unity 2D Game Development Cookbook

Discover more than 50 solutions to your Unity 2D game development headaches – each one created to guide you through a range of game development tasks step by step

Unity 2D Game Development Cookbook

Claudio Scolastici

1 customer reviews
Discover more than 50 solutions to your Unity 2D game development headaches – each one created to guide you through a range of game development tasks step by step
Mapt Subscription
FREE
$29.99/m after trial
eBook
$18.90
RRP $26.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$18.90
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783553594
Paperback256 pages

Book Description

Unity is a powerful game development engine that provides rich functionalities to create 2D and 3D games.

Unity 2D Game Development Cookbook is a practical guide to creating games with Unity. The book aims to serve the purpose of exploring problematic concepts in Unity for 2D game development, offering over 50 recipes that are easy to understand and to implement, thanks to the step-by-step explanations and the custom assets provided. The practical recipes provided in the book show clearly and concisely how to do things right in Unity. By the end of this book, you'll be near "experts" when dealing with Unity. You will also understand how to resolve issues and be able to comfortably offer solutions for 2D game development.

Table of Contents

Chapter 1: Importing 3D Models and Animations
Introduction
Setting up a scene in Maya
Using groups to rotate FBX files
Exporting FBX files from Maya
Configuring imported FBX files in Unity
Exporting animations
Configuring imported animations in Unity Inspector
Chapter 2: 2D Assets for Unity
Introduction
Importing textures and setting them to Inspector
Configuring transparency
Creating materials
Setting materials' names in Maya
Setting the ambient light in Unity
Texture atlases
Animated materials
Chapter 3: Animating a Game Character
Introduction
Creating the animation tree
Dealing with transitions
Coding the Boolean-based transitions
Working with float parameters
Coding the float-based transitions
Creating Blend Tree
Animation layers – creating masks
Animation layers – adding a second animation layer
Chapter 4: Taking Control
Introduction
Creating a bumped material
Importing packages
Setting the Character Controller
Adding Rigidbody
Coding physics controls
Collision management
Chapter 5: Building Up the Game Level
Introduction
Creating Prefabs
Coding a scrolling background
Adding platforms
Programming the character controls
Setting up an Animator
Adding collectibles to the game level
Camera setup and controls
Chapter 6: Game Scenes and the Graphic Interface
Introduction
The game manager
Loading a new scene at runtime
Setting game exit conditions – character death
Setting game exit conditions – goals met
Using OnGUI() to display game data
Display the number of collected items
Game Won and Game Over
Chapter 7: Improving Your Gaming Experience
Introduction
Importing audio clips
The Audio Source component
Coding audio
Particle systems
Instantiating a particle system at runtime
Game options – volume level
Game options – toggling audio
Playing videoclips in the scene
Chapter 8: Sprites, Spritesheets, and 2D Animation in Unity
Introduction
Setting up sprites
Multiple sprites
Animating with spritesheets
Preparing the character sprites
Parenting sprites
Keyframe sprite animation

What You Will Learn

  • Import files from other popular software into Unity: Textures, Models, Animations, and Audio clips
  • Build up an actual game scene with cameras, lights, and the logic to control the game flow
  • Manage collisions, and implement physics and game controls
  • Make prefabs and instantiate them as game objects in the game scene
  • Import and configure music and sound effects to be added to your games
  • Design and control the user interface with the built-in methods of Unity

Authors

Table of Contents

Chapter 1: Importing 3D Models and Animations
Introduction
Setting up a scene in Maya
Using groups to rotate FBX files
Exporting FBX files from Maya
Configuring imported FBX files in Unity
Exporting animations
Configuring imported animations in Unity Inspector
Chapter 2: 2D Assets for Unity
Introduction
Importing textures and setting them to Inspector
Configuring transparency
Creating materials
Setting materials' names in Maya
Setting the ambient light in Unity
Texture atlases
Animated materials
Chapter 3: Animating a Game Character
Introduction
Creating the animation tree
Dealing with transitions
Coding the Boolean-based transitions
Working with float parameters
Coding the float-based transitions
Creating Blend Tree
Animation layers – creating masks
Animation layers – adding a second animation layer
Chapter 4: Taking Control
Introduction
Creating a bumped material
Importing packages
Setting the Character Controller
Adding Rigidbody
Coding physics controls
Collision management
Chapter 5: Building Up the Game Level
Introduction
Creating Prefabs
Coding a scrolling background
Adding platforms
Programming the character controls
Setting up an Animator
Adding collectibles to the game level
Camera setup and controls
Chapter 6: Game Scenes and the Graphic Interface
Introduction
The game manager
Loading a new scene at runtime
Setting game exit conditions – character death
Setting game exit conditions – goals met
Using OnGUI() to display game data
Display the number of collected items
Game Won and Game Over
Chapter 7: Improving Your Gaming Experience
Introduction
Importing audio clips
The Audio Source component
Coding audio
Particle systems
Instantiating a particle system at runtime
Game options – volume level
Game options – toggling audio
Playing videoclips in the scene
Chapter 8: Sprites, Spritesheets, and 2D Animation in Unity
Introduction
Setting up sprites
Multiple sprites
Animating with spritesheets
Preparing the character sprites
Parenting sprites
Keyframe sprite animation

Book Details

ISBN 139781783553594
Paperback256 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Unity Character Animation with Mecanim Book Cover
Unity Character Animation with Mecanim
$ 39.99
$ 28.00
Mastering Unity 2D Game Development Book Cover
Mastering Unity 2D Game Development
$ 32.99
$ 6.60
Unity 5.x Cookbook Book Cover
Unity 5.x Cookbook
$ 43.99
$ 30.80
Learning Unity 2D Game Development by Example Book Cover
Learning Unity 2D Game Development by Example
$ 26.99
$ 18.90
Unity Game Development Blueprints Book Cover
Unity Game Development Blueprints
$ 26.99
$ 18.90
Unity 2D Game Development Book Cover
Unity 2D Game Development
$ 14.99
$ 1.50