Chapter 1. Behaviors – Intelligent Movement

In this chapter, we will develop AI algorithms for movement by covering the following recipes:

  • Creating the behaviors' template
  • Pursuing and evading
  • Arriving and leaving
  • Facing objects
  • Wandering around
  • Following a path
  • Avoiding agents
  • Avoiding walls
  • Blending behaviors by weight
  • Blending behaviors by priority
  • Combining behaviors using a steering pipeline
  • Shooting a projectile
  • Predicting a projectile's landing spot
  • Targeting a projectile
  • Creating a jump system

Introduction

Unity has been one of the most popular game engines for quite a while now, and it's probably the de facto game development tool for indie developers, not only because of its business model, which has a low entry barrier, but also because of its robust project editor, year-by-year technological improvement, and most importantly, ease of use and an ever-growing community of developers around the globe.

Thanks to Unity's heavy lifting behind the scenes (rendering, physics, integration, and cross-platform deployment, just to name a few) it's possible for us to focus on creating the AI systems that will bring to life our games, creating great real-time experiences in the blink of an eye.

The goal of this book is to give you the tools to build great AI, for creating better enemies, polishing that final boss, or even building your own customized AI engine.

In this chapter, we will start by exploring some of the most interesting movement algorithms based on the steering behavior principles developed by Craig Reynolds, along with work from Ian Millington. These recipes are the stepping stones for most of the AI used in advanced games and other algorithms that rely on movement, such as the family of path-finding algorithms.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.235.144