Polarith AI
1.8
Filtered Environments and Game Objects

Both Filtered Environments and the Game Objects list are methods to define what behaviours perceive for sampling the world of their agents.

With the help of Filtered Environments, it is possible to assign whole environments to an agent's behaviour by labeling environment components. Valid labels are listed in the agent's steering filter component if it has one. If a valid environment is assigned, the behaviour will perceive every game object which is referenced in it. This method should be preferred over using the game objects list because it is much more performant when there are multiple agents/behaviours perceiving the same things, and it is a good way of organizing your scene for the movement AI.

The Game Objects list is used to reference game objects directly instead of using the whole perception pipeline. Note that this method may be handy for very simplistic behaviours but it can also get quiet expensive if it is overused. Imagine you have 100 agents and 10 objects which must be perceived by every agent and multiple behaviours. By using the perception pipeline, the data of the 10 objects are unpacked (cached for multithreading support) only once, resulting in 10 operations. If you assign the 10 objects using the game objects list, there will be 10 unpack operations for every agent/behaviour, resulting in 1000 operations instead of just 10.

Imprint