ebook img

Unity 4.x Game AI Programming PDF

303 Pages·2013·4.71 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Unity 4.x Game AI Programming

Table of Contents Unity 4.x Game AI Programming Credits About the Authors About the Reviewer 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. Introduction to AI Artificial Intelligence (AI) AI in games AI techniques Finite State Machines (FSM) Random and probability in AI The sensor system Polling The messaging system Flocking, swarming, and herding Path following and steering A* pathfinding A navigation mesh The behavior trees Locomotion Dijkstra's algorithm Summary 2. Finite State Machines The player's tank The PlayerTankController class Initialization Shooting bullet Controlling the tank The bullet class Setting up waypoints The abstract FSM class The enemy tank AI The patrol state The chase state The attack state The dead state Taking damage Using an FSM framework The AdvanceFSM class The FSMState class The state classes The PatrolState class The NPCTankController class Summary 3. Random and Probability Random Random class Simple random dice game Definition of probability Independent and related events Conditional probability A loaded dice Character personalities FSM with probability Dynamic AI Demo slot machine Random slot machine Weighted probability Near miss Summary 4. Implementing Sensors Basic sensory systems Scene setup Player tank and aspect Player tank Aspect AI character Sense Perspective Touch Testing Summary 5. Flocking Flocking from Unity's Island Demo Individual Behavior Controller Alternative implementation FlockController Summary 6. Path Following and Steering Behaviors Following a path Path script Path follower Avoiding obstacles Adding a custom layer Obstacle avoidance Summary 7. A* Pathfinding A* algorithm revisit Implementation Node PriorityQueue GridManager AStar TestCode class Scene setup Testing Summary 8. Navigation Mesh Introduction Setting up the map Navigation Static Baking the navigation mesh Nav Mesh Agent Updating agents' destinations The Target.cs class Scene with slope NavMeshLayers Off Mesh Links Generated Off Mesh Links Manual Off Mesh Links Summary 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 10. Putting It All Together Scene setup Tags and layers Vehicles Player car controller AI Car Controller Finite State Machines (FSMs) Patrol state Chase state Attack state Weapons Gun Bullet Launcher Missile Summary Index Unity 4.x Game AI Programming Unity 4.x Game AI Programming Copyright © 2013 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: July 2013 Production Reference: 1160713 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84969-340-0 www.packtpub.com Cover Image by Artie Ng (<[email protected]>) Credits Authors Aung Sithu Kyaw Clifford Peters Thet Naing Swe Reviewers Julien Lange Clifford Peters Acquisition Editor Kartikey Pandey Lead Technical Editor Arun Nadar Technical Editors Shashank Desai Krishnaveni Haridas Rikita Poojari Project Coordinator Anurag Banerjee Proofreaders Maria Gould Paul Hindle Aaron Nash Indexer Monica Ajmera Mehta Graphics Ronak Dhruv Abhinash Sahu Production Coordinator Nilesh R. Mohite Cover Work Nilesh R. Mohite

Description:
Learn and implement game AI in Unity3D with a lot of sample projects and next-generation techniques to use in your Unity3D projects Overview A practical guide with step-by-step instructions and example projects to learn Unity3D scripting Learn pathfinding using A* algorithms as well as Unity3D pro f
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.