Unity 4.x Game AI Programming

Use your basic knowledge of Unity3D to add effective artificial intelligence to your games. This tutorial will take you through all the essentials, from flocking to pathfinding, from navigation graphs to behavior trees.
Preview in Mapt

Unity 4.x Game AI Programming

Aung Sithu Kyaw, Clifford Peters, Thet Naing Swe

1 customer reviews
Use your basic knowledge of Unity3D to add effective artificial intelligence to your games. This tutorial will take you through all the essentials, from flocking to pathfinding, from navigation graphs to behavior trees.
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

Frequently bought together


Unity 4.x Game AI Programming Book Cover
Unity 4.x Game AI Programming
$ 26.99
$ 18.90
Unity 4.x Game Development by Example: Beginner's Guide Book Cover
Unity 4.x Game Development by Example: Beginner's Guide
$ 26.99
$ 18.90
Buy 2 for $35.00
Save $18.98
Add to Cart
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
 

Book Details

ISBN 139781849693400
Paperback232 pages

Book Description

This book fills the gap between artificial intelligence (AI) books designed to learn underlying AI algorithms and general Unity3D books written to cover basic scene setup and scripting in Unity3D. Game AI Scripting in Unity3D covers implementing AI techniques such as flocking, pathfinding, path following, and behavior trees in Unity3D with example projects.

Game AI Scripting in Unity3D will show you how to apply AI techniques to your Unity3D projects using C# as the scripting language. Unlike other AI books and Unity3D books, this book tries to focus more on the application of AI techniques in the Unity3D engine, with sample projects that demonstrate finite state machines (FSMs), pathfinding, steering, navigation graphs, and behavior trees techniques.

This book shows how to implement various AI techniques in Unity3D by implementing the algorithm from scratch using C#, applying Unity3D built-in features, or using available scripts and plugins from the Unity Asset Store. For example, we’ll be implementing our own A* algorithm to do pathfinding but will also explore the Unity3D navigation graphs feature. Then we’ll use the Behave plugin to construct behavior trees for intelligent AI character behaviors.

Game AI Scripting in Unity3d  covers other AI techniques such as flocking behavior, building a sensory system for taking inputs from the environment and other AI agents, and so on. In the final chapter this book will show you how to build a racing game AI project using Unity3D and applying the techniques described in earlier chapters.

Table of Contents

Chapter 1: Introduction to AI
Artificial Intelligence (AI)
AI in games
AI techniques
Summary
Chapter 2: Finite State Machines
The player's tank
The bullet class
Setting up waypoints
The abstract FSM class
The enemy tank AI
Using an FSM framework
Summary
Chapter 3: Random and Probability
Random
Definition of probability
Character personalities
FSM with probability
Dynamic AI
Demo slot machine
Summary
Chapter 4: Implementing Sensors
Basic sensory systems
Scene setup
Player tank and aspect
AI character
Testing
Summary
Chapter 5: Flocking
Flocking from Unity's Island Demo
Alternative implementation
Summary
Chapter 6: Path Following and Steering Behaviors
Following a path
Avoiding obstacles
Summary
Chapter 7: A* Pathfinding
A* algorithm revisit
Implementation
Scene setup
Testing
Summary
Chapter 8: Navigation Mesh
Introduction
Setting up the map
Scene with slope
NavMeshLayers
Off Mesh Links
Summary
Chapter 9: Behavior Trees
Behave plugin
Workflow
Action
Interfacing with the script
Decorator
Behave debugger
Sequence
Exploring Behave results
Selector
Priority selector
Parallel
Reference
The Robots versus Aliens project
Summary
Chapter 10: Putting It All Together
Scene setup
Vehicles
Weapons
Summary

What You Will Learn

  • Building finite state machines (FSMs)
  • Implementing a sensory system
  • Applying flocking behavior for a crowd
  • Executing your own A* pathfinding algorithm in Unity3D
  • Applying random and probability techniques in a betting game
  • Using the Unity3D pro feature, navigation graphs, for path finding
  • Learning about behavior trees and the Behave plugin
  • Implementing a racing game AI through the final chapter project

Authors

Table of Contents

Chapter 1: Introduction to AI
Artificial Intelligence (AI)
AI in games
AI techniques
Summary
Chapter 2: Finite State Machines
The player's tank
The bullet class
Setting up waypoints
The abstract FSM class
The enemy tank AI
Using an FSM framework
Summary
Chapter 3: Random and Probability
Random
Definition of probability
Character personalities
FSM with probability
Dynamic AI
Demo slot machine
Summary
Chapter 4: Implementing Sensors
Basic sensory systems
Scene setup
Player tank and aspect
AI character
Testing
Summary
Chapter 5: Flocking
Flocking from Unity's Island Demo
Alternative implementation
Summary
Chapter 6: Path Following and Steering Behaviors
Following a path
Avoiding obstacles
Summary
Chapter 7: A* Pathfinding
A* algorithm revisit
Implementation
Scene setup
Testing
Summary
Chapter 8: Navigation Mesh
Introduction
Setting up the map
Scene with slope
NavMeshLayers
Off Mesh Links
Summary
Chapter 9: Behavior Trees
Behave plugin
Workflow
Action
Interfacing with the script
Decorator
Behave debugger
Sequence
Exploring Behave results
Selector
Priority selector
Parallel
Reference
The Robots versus Aliens project
Summary
Chapter 10: Putting It All Together
Scene setup
Vehicles
Weapons
Summary

Book Details

ISBN 139781849693400
Paperback232 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
Unity 4.x Cookbook Book Cover
Unity 4.x Cookbook
$ 29.99
$ 21.00
Unity Shaders and Effects Cookbook Book Cover
Unity Shaders and Effects Cookbook
$ 29.99
$ 6.00
Mastering Unity 2D Game Development Book Cover
Mastering Unity 2D Game Development
$ 32.99
$ 6.60
Unity 2D Game Development Book Cover
Unity 2D Game Development
$ 14.99
$ 1.50
Learning C# by Developing Games with Unity 3D Beginner's Guide Book Cover
Learning C# by Developing Games with Unity 3D Beginner's Guide
$ 29.99
$ 21.00