"Awareness" refers to an entity's view of the surrounding world with
regards to how the entity could navigate. We use Recast/Detour to build
a navmesh for the entity.
However, since each world can have many NPCs, each one with their own
mind, we don't want to keep a complete navmesh for each single mind.
This will quickly become expensive. Therefore we want to share
awarenesses between multiple entities of the same type. So, for example,
all fishes handled by the same ai client will share one single awareness
of the world.
This to some degree involves some cheating, since AI minds now might get
knowledge of the world they otherwise wouldn't have. We consider this to
not be such a big issue. If this is unacceptable for some worlds these
should then disable awareness sharing and take the resource hit.
This is needed in order for types to work. Note that we currently can't
handle dynamically changing rules; we get all rules up front. This will
have to do for now though.
This is the cleanest way currently. But perhaps we should try to retain
the minds and see if the thoughts can be transferred when connected
again?
This would be a future operation though.
The idea is that the aiclient runs in a separate process and handles all
AI functionality.
This is done by having a "possession" client which recieves possession
requests from the server, and spawns new AI clients for each request.