200 NPC on screen at once FPS?

200 NPC on screen at once FPS?

How would I achieve this? would I need to have a powerful computer?

Low poly NPCs gta 4 quality or gta sa quality really low poly characters 200 individual NPC ais moving around a map?

I was solving the exact same problem for my own game.

The key points are:

  • Don’t use ACharacter / CharacterMovementComponent at all
  • Instead, you can use APawn class for your NPCs
  • For the movement, the best case is to implement a managed system instead of individual movement components/controllers.
  • Look for ECS (entity-component-system) pattern
  • Disable Tick for all the NPCs
  • Disable overlaps between the NPCs themselves
  • The best case if you can disable all the collisions for them and implement your own collisions if needed (as simple as possible)
  • Optimize all the animations

In my case, I’ve went from 10 FPS for 200 NPCs to 60 fps for 200 NPCs and even more (up to 400-500, then it still degrade), all on the same pc. Here is my demo of 5000 actors moving with a very basic ECS implementation.

General advice is to use the profiler to find the heavy places and fix them one way or another.