更新时间:2021-07-02 19:14:39
封面
版权信息
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the authors
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Code in Action
Conventions used
Get in touch
Reviews
The Basics of AI in Games
Creating the illusion of life
Neural Networks
Leveling up your game with AI
Using AI in Unity
Defining the agent
Finite State Machines
Seeing the world through our agent's eyes
Path following and steering
Dijkstra's algorithm
Using A* Pathfinding
IDA* Pathfinding
Using Navigation Mesh
Flocking and crowd dynamics
Behavior trees
Thinking with fuzzy logic
Summary
Finite State Machines and You
Technical Requirements
Finding uses for FSMs
Creating state machine behaviors
Creating the AnimationController asset
Layers and parameters
The animation controller inspector
Bringing behaviors into the picture
Creating our very first state
Transitioning between states
Setting up our player tank
Creating the enemy tank
Choosing transitions
Making the cogs turn
Setting conditions
Driving parameters via code
Making our enemy tank move
Testing
Implementing Sensors
Basic sensory systems
Cone of sight
Hearing feeling and smelling using spheres
Expanding AI through omniscience
Getting creative with sensing
Setting up the scene
Setting up the player tank and aspect
Implementing the player tank
Implementing the Aspect class
Creating an AI character
Using the Sense class
Giving a little perspective
Touching is believing
Testing the results
Finding Your Way
Following a path
The path script
Using the path follower
Avoiding obstacles
Adding a custom layer
Obstacle avoidance
A* Pathfinding
Revisiting the A* algorithm
Implementation
The Node class
Establishing the priority queue
Setting up our grid manager
Diving into our A* implementation
Implementing a TestCode class
Testing it in the sample scene
Testing all the components
A* vs IDA*
Navigation mesh
Inspecting our map
Navigation Static
Baking the navigation mesh
Using the NavMesh agent
Setting a destination
Making sense of Off Mesh Links
Flocks and Crowds