Complete Unity 2018 Game Development

Book Description

Leverage the power of the Unity 2018 game engine to create games with brilliant gameplay and high replayability.

Key Features

  • Develop different types of games from scratch with Unity 2018
  • Discover the secrets of creating AAA quality shaders without writing long algorithms
  • Script intelligent game characters and agents using Artificial Intelligence techniques and algorithms

Book Description

Through this Learning Path, you'll learn how to leverage the features of Unity and create amazing games, ranging from action shooters and mind-bending puzzle games to adventure and Virtual Reality(VR) games. If you have no prior experience of using Unity, you can still benefit from this Learning Path, which easily explains the complete working of the Unity toolset.

You'll start by learning how to create compelling shaders using Unity and understanding everything you need to know about vectors. This includes useful inputs on how lighting is constructed with vectors and how textures are used to create complex effects without the need for advanced math. In the succeeding chapters, you'll also be able to use popular AI techniques, such as A* and A*mbush to develop intelligent pathfinding agents for your games. The book will also guide you through different algorithms for creating decision-making agents that go beyond simple behaviors and movement.

By the end of this Learning Path, you will have developed all the basic skills to create highly engaging and replayable games.

This Learning Path includes content from the following Packt products:

  • Unity 2018 By Example - Second Edition by Alan Thorn
  • Unity 2018 Shaders and Effects Cookbook - Third Edition by John P. Doran, Alan Zucconi
  • Unity 2018 Artificial Intelligence Cookbook - Second Edition by Jorge Palacios

What you will learn

  • Understand concepts such as game objects, components, and scenes
  • Create functional games with C# scripting
  • Write shaders from scratch in ShaderLab and HLSL/Cg
  • Develop intelligent pathfinding agents with A and Ambush
  • Work with terrains and world-creation tools
  • Simulate senses for agents to make decisions based on the environment
  • Implement waypoints by creating a manual selector
  • Enhance games with volumetric explosions, special effects, and visuals

Who this book is for

If you are a game developer who wants to learn tools that can transform your gameplay, this beginner-level Learning Path is ideal for you. Having basic knowledge of C# will help you grasp the concepts explained in the book easily.

Publisher Resources

Download Example Code

Table of Contents

  1. Title Page
  2. Copyright
    1. Complete Unity 2018 Game Development
  3. About Packt
    1. Why subscribe?
    2. Packt.com
  4. Contributors
    1. About the authors
    2. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    4. Get in touch
      1. Reviews
  6. Unity Fundamentals
    1. Game design
    2. Getting started – Unity and projects
    3. Projects and project folders
    4. Importing assets
    5. Starting a level
    6. Transformations and navigation
    7. Scene building
    8. Lighting and sky
    9. Play testing and the Game tab
    10. Adding a water plane
    11. Adding a coin to collect
    12. Summary
  7. Creating a Collection Game
    1. Creating a coin material
    2. C# scripting in Unity
    3. Counting coins
      1. Code Sample 2.3
    4. Collecting coins
      1. Code Sample 2.5
    5. Coins and prefabs
    6. Timers and countdowns
      1. Code Sample 2.6
    7. Celebrations and fireworks!
      1. Code Sample 2.7
    8. Play testing
    9. Building
  8. Post Processing Stack
    1. Introduction
    2. Installing the Post Processing Stack
      1. Getting ready
      2. How to do it...
    3. Getting a filmic look using grain, vignetting, and depth of field
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Mimicking real life with bloom and anti-aliasing
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Setting mood with color grading
      1. Getting ready
      2. How to do it...
    6. Creating a horror game look with fog
      1. Getting ready
      2. How to do it...
      3. How it works...
  9. Creating Your First Shader
    1. Introduction
    2. Creating a basic Standard Shader
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Adding properties to a shader
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    4. Using properties in a Surface Shader
      1. How to do it...
      2. How it works...
      3. There's more...
      4. See also
  10. Surface Shaders and Texture Mapping
    1. Introduction
    2. Diffuse shading
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Accessing and modifying packed arrays
      1. How to do it...
      2. There's more...
      3. See also
    4. Adding a texture to a shader
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Scrolling textures by modifying UV values
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Creating a shader with normal mapping
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Creating a transparent material
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Creating a Holographic Shader
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Packing and blending textures
      1. Getting ready
      2. How to do it...
      3. How it works...
    10. Creating a circle around your terrain
      1. Getting ready
      2. How to do it...
        1. Moving the circle
      3. How it works...
  11. Understanding Lighting Models
    1. Introduction
    2. Creating a custom diffuse lighting model
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Creating a toon shader
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Creating a Phong Specular type
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Creating a BlinnPhong Specular type
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Creating an Anisotropic Specular type
      1. Getting ready
      2. How to do it...
      3. How it works...
  12. Physically-Based Rendering
    1. Introduction
    2. Understanding the metallic setup
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    3. Adding transparency to PBR
      1. Getting ready
      2. How to do it...
        1. Semi-transparent materials
        2. Fading objects
        3. Solid geometries with holes
      3. See also
    4. Creating mirrors and reflective surfaces
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Baking lights in your scene
      1. Getting ready
      2. How to do it...
        1. Configuring the static geometry
        2. Configuring the light probes
        3. Baking the lights
      3. How it works...
      4. See also
  13. Vertex Functions
    1. Introduction
    2. Accessing a vertex color in a Surface Shader
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    3. Animating vertices in a Surface Shader
      1. Getting ready
      2. How to do it…
      3. How it works…
    4. Extruding your models
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
        1. Adding extrusion maps
    5. Implementing a snow shader
      1. Getting ready
      2. How to do it…
      3. How it works…
        1. Coloring the surface
        2. Altering the geometry
      4. See also
    6. Implementing a volumetric explosion
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
      5. See also
  14. Fragment Shaders and Grab Passes
    1. Introduction
    2. Understanding Vertex and Fragment Shaders
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
        1. Input semantics
        2. Output semantics
      5. See also
    3. Using the grab pass to draw behind objects
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    4. Implementing a Glass Shader
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There's more…
    5. Implementing a Water Shader for 2D games
      1. Getting ready
      2. How to do it…
      3. How it works…
  15. Mobile Shader Adjustment
    1. Introduction
    2. Techniques to make shaders more efficient
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Profiling your shaders
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Modifying our shaders for mobile
      1. Getting ready
      2. How to do it...
      3. How it works...
  16. Screen Effects with Unity Render Textures
    1. Introduction
    2. Setting up the screen effects script system
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Using brightness, saturation, and contrast with screen effects
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Using basic Photoshop-like Blend modes with screen effects
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Using the Overlay Blend mode with screen effects
      1. How to do it...
      2. How it works...
  17. Behaviors – Intelligent Movement
    1. Introduction
    2. Creating the behaviors template
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Pursuing and evading
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Adjusting the agent for physics
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Arriving and leaving
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Facing objects
      1. Getting ready
      2. How to do it...
      3. How it works...
    7. Wandering around
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Following a path
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Avoiding agents
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Avoiding walls
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Blending behaviors by weight
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    12. Blending behaviors by priority
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    13. Shooting a projectile
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    14. Predicting a projectile's landing spot
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    15. Targeting a projectile
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    16. Creating a jump system
      1. Getting ready
      2. How to do it...
      3. How it works...
  18. Navigation
    1. Introduction
    2. Representing the world with grids
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Representing the world with points of visibility
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Representing the world with a self-made navigation mesh
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Finding your way out of a maze with DFS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Finding the shortest path in a grid with BFS
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Finding the shortest path with Dijkstra
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    8. Finding the best-promising path with A*
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Improving A* for memory – IDA*
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    10. Planning navigation in several frames – time-sliced search
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    11. Smoothing a path
      1. Getting ready
      2. How to do it...
      3. How it works...
  19. Decision Making
    1. Introduction
    2. Choosing through a decision tree
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Implementing a finite-state machine
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Improving FSMs: hierarchical finite-state machines
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    5. Implementing behavior trees
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Working with fuzzy logic
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Making decisions with goal-oriented behaviors
      1. Getting ready
      2. How to do it...
      3. How it works...
    8. Implementing a blackboard architecture
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Experimenting with Unity's animation state machine
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  20. The New NavMesh API
    1. Introduction
    2. Setting up the NavMesh building components
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Creating and managing NavMesh for multiple types of agents
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Creating and updating NavMesh data at runtime
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Controlling the lifetime of the NavMesh instance
      1. Getting started
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Connecting multiple instances of NavMesh
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Creating dynamic NavMeshes with obstacles
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Implementing some behaviors using the NavMesh API
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
  21. Coordination and Tactics
    1. Introduction
    2. Handling formations
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    3. Extending A* for coordination – A*mbush
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Analyzing waypoints by height
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Analyzing waypoints by cover and visibility
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. Creating waypoints automatically
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Exemplifying waypoints for decision making
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    8. Implementing influence maps
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    9. Improving influence with map flooding
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    10. Improving influence with convolution filters
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    11. Building a fighting circle
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  22. Agent Awareness
    1. Introduction
    2. The seeing function using a collider-based system
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. The hearing function using a collider-based system
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. The smelling function using a collider-based system
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. The seeing function using a graph-based system
      1. Getting ready
      2. How to do it...
      3. How it works...
    6. The hearing function using a graph-based system
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. The smelling function using a graph-based system
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    8. Creating awareness in a stealth game
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  23. Board Games and Applied Search AI
    1. Introduction
    2. Working with the game-tree class
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. See also
    3. Implementing Minimax
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. See also
    4. Implementing Negamax
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    5. Implementing AB Negamax
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. See also
    6. Implementing NegaScout
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. See also
    7. Implementing a Tic-Tac-Toe rival
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    8. Implementing a Checkers rival
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. There's more...
    9. Implementing Rock-Paper-Scissors AI with UCB1
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    10. Implementing regret matching
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  24. Learning Techniques
    1. Introduction
    2. Predicting actions with an N-Gram predictor
      1. Getting ready...
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Improving the predictor – Hierarchical N-Gram
      1. Getting ready...
      2. How to do it...
      3. How it works...
    4. Learning to use Naïve Bayes classifier
      1. Getting ready...
      2. How to do it...
      3. How it works...
    5. Implementing reinforcement learning
      1. Getting ready...
      2. How to do it...
      3. How it works...
    6. Implementing artificial neural networks
      1. Getting ready...
      2. How to do it...
      3. How it works...
  25. Procedural Content Generation
    1. Introduction
    2. Creating mazes with Depth-First Search
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Implementing the constructive algorithm for dungeons and islands
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    4. Generating landscapes
      1. Getting ready
      2. How to do it...
      3. How it works...
    5. Using N-Grams for content generation
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    6. Generating enemies with the evolutionary algorithm
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
    7. Summary
  26. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product Information

  • Title: Complete Unity 2018 Game Development
  • Author(s): Alan Thorn, John P. Doran, Alan Zucconi, Jorge Palacios
  • Release date: January 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781789952865