Ai character hit on performance

A late recommendation. I use hundred of AI controlled NPC´s with behavior tree and perceptions. To make this to work without network and server performance hit, some actions have to be taken.

  1. Use NPC trigger volume, telling players are around, and enable/disable AI accordingly.
  2. Enable/Disable AI with SpawnDefaultController/Unposses.
  3. Hide disabled NPC´s.
  4. Enable/Disable ticks for NPC and all it´s components.
  5. Set NPC mesh draw distance.
  6. Consider to disable dedicated server tick´s and set tick interval to other then zero.
  7. Sometimes you may have a low rate timer to replicate values instead of movement replication.
  8. Let client do calculation along with server for smooth effect, server correct client with low replication rate. i.e. a ship increase/decrease speed according to +/- difference from server.