O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mastering Unity 2017 Game Development with C# - Second Edition

Book Description

Master realistic animations and graphics, particle systems, game AI and physics, sprites and VR development with Unity 2017

About This Book

  • Create professional grade games with realistic animation and graphics, particle systems and game physics with Unity 2017
  • Unleash the power of C# scripting to create intelligent game AI and professional grade game workflows.
  • Create immersive VR games using the latest Unity 2017 VR SDK.

Who This Book Is For

If you are a Unity developer who now wants to develop and deploy interesting games by leveraging the new features of Unity 2017, then this is the book for you. Basic knowledge of C# programming is assumed.

What You Will Learn

  • Explore hands-on tasks and real-world scenarios to make a Unity horror adventure game
  • Create enemy characters that act intelligently and make reasoned decisions
  • Use data files to save and restore game data in a way that is platform-agnostic
  • Get started with VR development
  • Use navigation meshes, occlusion culling, and Profiler tools
  • Work confidently with GameObjects, rotations, and transformations
  • Understand specific gameplay features such as AI enemies, inventory systems, and level design

In Detail

Do you want to make the leap from being an everyday Unity developer to being a pro game developer? Then look no further! This book is your one-stop solution to creating mesmerizing games with lifelike features and amazing gameplay.

This book focuses in some detail on a practical project with Unity, building a first-person game with many features. You'll delve into the architecture of a Unity game, creating expansive worlds, interesting render effects, and other features to make your games special. You will create individual game components, use efficient animation techniques, and implement collision and physics effectively. Specifically, we'll explore optimal techniques for importing game assets, such as meshes and textures; tips and tricks for effective level design; how to animate and script NPCs; how to configure and deploy to mobile devices; how to prepare for VR development; how to work with version control; and more.

By the end of this book, you'll have developed sufficient competency in Unity development to produce fun games with confidence.

Style and approach

This book takes an easy-to-follow, step-by-step tutorial approach. You will create an advanced level Unity game with an emphasis on leveraging advanced Unity 2017 features while developing the game in its entirety.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code
      2. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  2. Preparation and Asset Configuring
    1. Getting clear on design
      1. Target platforms
      2. Intended audience
      3. Genre
      4. Game mode
      5. Game objective
    2. Asset preparation
      1. Meshes - Work only with good topology
      2. Meshes - Minimize polygon count
      3. Meshes - Simulating bump details without geometry
      4. Meshes - Minimize UV seams
      5. Meshes - Export as FBX
      6. Meshes - Use meters scale (metric)
      7. Textures - Never use lossy compression
      8. Textures - Power of 2 sizes
      9. Textures - Alpha textures
    3. Asset importing for Dead Keys
      1. Importing textures
      2. Importing meshes
      3. Importing animations
      4. Importing audio
      5. Configuring materials
    4. Summary
  3. Level Design and Structure
    1. Setting the scene with a skybox
    2. Level building - Modular construction sets
    3. Level building - Organization and structure
    4. Level design - Tips and tricks
      1. Objective and feedback
      2. Narrative
      3. Believability and convenience
      4. Atmosphere and aesthetic
      5. Simplicity and reuse
    5. Level lighting - Preparation
      1. Baked lighting
      2. Dynamic lighting
      3. Precomputed global illumination
    6. Getting started with lightmapping
    7. Baking lightmaps - Resolution and size
    8. Baking lightmaps - Details
    9. Light Probes
    10. Lighting FAQ
    11. Navigation mesh
    12. Occlusion Culling
    13. Creating a player camera
    14. Particle systems
    15. Music and audio
    16. Summary
  4. Player Controls - Movement
    1. Player movement
    2. Zombie combat
    3. Creating player waypoints
    4. Animating the camera
    5. Configuring an animator graph
    6. Working with animation - creating the navigator
      1. Customizing and changing MonoDevelop
      2. Singletons
      4. Connecting to the navigator component
    7. Navigator GUI
      1. Input axes
      2. The canvas
      3. The button
      4. Coding button behavior
      6. Creating player death
    8. Summary
  5. Player Controls - Typing and Health
    1. Word combat
    2. Creating a word list
    3. Using Visual Studio Code
    4. Creating a WordList class
    5. Matching words
    6. The Typer object
    7. Progressing with the Typer class
    8. Health and damage
    9. Damage and feedback
    10. Player score
    11. Bonus items
    12. Summary
  6. Enemies and Artificial Intelligence
    1. Configuring the zombie character
    2. Getting started with the zombie Prefab
    3. Planning the zombie Artificial Intelligence
    4. Developing state structure
    5. Developing an NPC Animator Controller
    6. Developing the Idle state
    7. Developing the Chase state
    8. Developing the Attack state and more
    9. Developing the Dead state
    10. Zombies and text input
    11. Zombies and the Typer class
    12. Activating enemies and camera paths
    13. Working with Play mode
    14. Summary
  7. Project Management and Version Control
    1. Project management
      1. Research, design, and work assessment
      2. Workload plan
      3. Task status
      4. Risk analysis
      5. Resources and skills needed
      6. Testing plan
    2. Applied project management using Trello
    3. Collaboration with cloud storage
    4. Version control using Git
    5. Getting started with Git and GitKraken
      1. Commits and branches
      2. Forward and backward with Git
    6. Configuring Unity for version control
    7. Reverting and discarding
    8. Branches and branching
    9. Conflicts and resolving
    10. Git and the web
    11. Pushing and pulling
    12. Cloning
    13. Summary
  8. Persistent Data - Load and Save Game States
    1. Data serialization
    2. Player preferences - saving data
    3. Player preferences - loading data
    4. Player preferences - INI files
      1. Comments on iniParser.cs
    5. Saving data - XML files
    6. Saving data - JSON files
    7. Saving data - binary files
    8. Saving data for Dead Keys
    9. Summary
  9. Performance, Optimization, Mobiles, and More
    1. Stats and performance
    2. Profiler and performance assessment
    3. Optimization tips and tricks
      1. Strings and comparisons
      2. Beware of functions in disguise
      3. Debug cleaning
      4. Optimizing build size
    4. Getting started with mobile development
    5. Moving forward with mobile development
    6. Building for Android
    7. Building for VR (Virtual Reality)
    8. Summary