Book Image

Unity Game Development Scripting

By : Kyle D'Aoust
Book Image

Unity Game Development Scripting

By: Kyle D'Aoust

Overview of this book

Table of Contents (17 chapters)
Unity Game Development Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 5. Enemy and Friendly AIs

Artificial Intelligence, also known as AI, is something that you'll see in every video game that you play. First-person shooter, real-time strategy, simulation, role playing games, sports, puzzles, and so on, all have various forms of AI in both large and small systems. In this chapter, we'll be going over several topics that involve creating AI, including techniques, actions, pathfinding, animations, and the AI manager. Then, finally, we'll put it all together to create an AI package of our own.

In this chapter, you will learn:

  • What a finite state machine is

  • What a behavior tree is

  • How to combine two AI techniques for complex AI

  • How to deal with internal and external actions

  • How to handle outside actions that affect the AI

  • How to play character animations

  • What is pathfinding?

  • How to use a waypoint system

  • How to use Unity's NavMesh pathfinding system

  • How to combine waypoints and NavMesh for complete pathfinding