ABSTRACT

Intelligent position selection for agents–that is, analyzing the environment to find the best location for a given behavior–has evolved rapidly as spatial query systems such as CryENGINE's Tactical Point System (TPS) and Unreal Engine 4's Environment Query System (EQS) have matured. In modern implementations, a single spatial query generally consists of the following components: sample points, generator, generator origin, test, and test subject. This chapter assumes a basic familiarity with publicly available query system implementations such as TPS and EQS. The simplest method of dynamically generating a set of sample points is to create a localized 2D grid on the surface of the agent's environment. Grids are not the only way to arrange our generated sample points. A custom generator can produce items along walls, arranged in rings, hexes, along waypoint graphs, inside Voronoi cells, or countless other configurations depending on the situation. Spatial queries can even represent artificial life simulations.