O'Reilly logo

Game AI Pro 2 by Steven Rabin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4

Vision Zones and Object Identification Certainty

Steve Rabin

4.1 Introduction

Within games it is common for human AI agents to have a very simplistic vision model. This model usually consists of three vision checks performed in this order (for efficiency reasons): distance, field of view, and ray cast. The distance check restricts how far an agent can see, the field-of-view check ensures that the agent can only see in the direction of their eyes (not behind them), and the ray cast prevents the agent from seeing through walls. These reasonable and straightforward tests culminate in a Boolean result. If all three checks pass, then the agent can see the object in question. If any of the checks fail, the agent cannot see the object.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required