Unity AI Programming Essentials
eBook - ePub

Unity AI Programming Essentials

  1. 162 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Unity AI Programming Essentials

About this book

Unity is a powerful cross-platform game creation system that includes a game engine and integrated development environment (IDE). AI programming in Unity is a key task for any game developer as it gives you the ability to make computer characters think and behave like a living organism.

This book focuses on the different AI tasks that are essential for game development using Unity. It includes topics such as defining "minds" for your characters with behavior trees. Furthermore, it covers more specialized AI tasks such as how to implement AI crowds and how to create driving AI for vehicles. We have a section dedicated to NavMesh, one of the most important aspects of pathfinding, that will show you how to customize the mesh generation to handle different use cases for different characters. This is a practical book as it uses several popular Unity plugins such as RAIN and React AI to accomplish different AI tasks.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Unity AI Programming Essentials


Table of Contents

Unity AI Programming Essentials
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Pathfinding
An overview
Quick Path AI
React AI
RAIN AI
Comparing AI solutions
Summary
2. Patrolling
Quick Path AI
React AI
RAIN AI
Summary
3. Behavior Trees
An overview of behavior trees
RAIN node types
The behavior tree demo
Summary
4. Crowd Chaos
An overview of crowd chaos
React AI
Setting up a scene with React
Building behavior trees in React
Setting up wandering characters with React
RAIN AI
RAIN AI custom wander scripts
Putting NPCs in the RAIN demo
Summary
5. Crowd Control
An overview of crowd control
The Fame Crowd Simulation API
Setting up a scene with Fame
Setting up a group
Adding obstacles to Fame
Adding vector fields to Fame
ANT-Op
Summary
6. Sensors and Activities
An overview of sensing
Advanced visual sensor settings
Advanced audio sensor settings
Using senses with RAIN
Setting up aspects in RAIN
Setting up a visual sensor in RAIN
Changing activities based on sensing
RAIN sensor filters
Summary
7. Adaptation
An overview
RAIN's demo
Reacting to game events
Using RAIN's motor directly
Adding large game events
The React AI
Summary
8. Attacking
An overview of attack AI
The attack demo
The chase and attack demo
Creating cover AI
Group attacks
Summary
9. Driving
An overview of driving
Setting up a Smart Car vehicle
The Smart Car AI demo
Setting up a Unity test scene
Using Unity's built-in NavMesh system
Setting up waypoints
Adding obstacles to driving
Additional features
Adding brake zones and drift zones
Integrating with other AI systems
Summary
10. Animation and AI
An overview of animation
The AI animation demo
Configuring RAIN animations
Using the animate node
RAIN and the Mecanim demo
Additional Mecanim nodes
Summary
11. Advanced NavMesh Generation
An overview of a NavMesh
Advanced NavMesh parameters
Culling areas
Multiple navigation meshes
Summary
Index

Unity AI Programming Essentials

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: December 2014
Production reference: 1151214
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78355-355-6
www.packtpub.com

Credits

Authors
Curtis Bennett
Dan Violet Sagmiller
Reviewers
Davide Aversa
Adam Boyce
Jesse Lu
Brent Owens
Angelo Tadres
Francisco Ureña
Commissioning Editor
Akram Hussain
Acquisition Editor
Subho Gupta
Content Development Editor
Prachi Bisht
Technical Editors
Tanvi Bhatt
Siddhi Rane
Copy Editors
Gladson Monteiro
Deepa Nambiar
Rashmi Sawant
Project Coordinator
Sageer Parkar
Proofreaders
Ameesha Green
Jonathan Todd
Indexer
Priya Sane
Graphics
Disha Haria
Production Coordinator
Komal Ramchandani
Cover Work
Komal Ramchandani

Foreword

Artificial intelligence can be one of the most challenging aspects of video game development. Game AI encompasses difficult concepts such as spatial reasoning, pathfinding, movement, awareness, and decision making, all with the goal of combining these concepts into a realistic and lifelike experience for the player. It's no wonder that so many game developers put off AI development to the end of the project. This is a shame, because good AI can make or break the game experience and great AI can make a player fall in love with your game and keep them coming back again and again.
In recent years, AI has become more important than ever. Although the quality of AI in games has increased steadily over time, the results have come more from added attention and effort on the part of developers, rather than from significant breakthroughs in technology. The impact of this is that "good" AI in games has often been limited to projects and teams with large budgets and access to high-end tools. Unity changed the industry by making high-end game development tools available to all developers, big and small. Today's indie developers are creating player experiences that rival those of AAA companies. Until recently, they lacked the tools, knowledge, and know-how to add AI-driven characters that have the same fidelity as the rest of the game. Now this has changed too, with the very best AI tools becoming accessible to every developer.
This book serves an important role in the rise of AI in Unity. In these pages, you will find the guidance, techniques, and examples you need to become a great A...

Table of contents

  1. Unity AI Programming Essentials

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Unity AI Programming Essentials by Curtis Bennett, Dan Violet Sagmiller in PDF and/or ePUB format, as well as other popular books in Computer Science & Artificial Intelligence (AI) & Semantics. We have over one million books available in our catalogue for you to explore.