Moving 100 + agents

Hello all,
I would like to know the best way to move 100 + units like an RTS with out a performance hit over a multiplayer game.

So far I can drag and select my units and have them all added to an array and I can get them all to move with a simple move to node but I notice once I am over 40 units I start dropping frames pretty hard.

I have been looking online for solutions and some people suggest using a the blackboard approach, others suggest creating it in C++ but I’m not good enough for that and others have suggested using a grid system with que system.

If you have tried any of these or you can recommend something that would work please let me know.

Did you try using an instanced static mesh actor instead of a separate actor for each unit? I’m not sure where the bottleneck is in your case, but that can help with any performance issues related to large numbers of actors.

Also I suggest taking a look at the info here which talks through how to identify where your bottleneck is.

Alternatively, the new Mass Entity framework is designed for optimizing this kind of stuff but there are two issues with it in your case:

  1. It requires C++
  2. There’s nothing public about how to use it in a multiplayer game, only single player. That said, I’ve seen there’s a MassReplication folder in the codebase which in theory should work for multiplayer.

I’d recommend you learn C++ because if you want to get serious about optimizing a UE game you’ll need to know some C++.