I am working on RTS with a lot of actors so I can share my experience.
- Avoid skeletal meshes - every skeletal mesh, autmatically spawns more stuff to handle it
- Try to pack all of the changing transforms in least possible nodes/calls. Grouping ticks is one way but also don’t split up set location / rotation / scale to different calls. It may sound obvious, but I did split them sometimes for code readability or I just wasn’t thinking about it.
- Avoid many components in actor that moves - every component calls it’s own transform change.
- Timelines are heavy becuase they are separate components, moving with tick is better, grouping ticks in one manager is a lot faster, but ticking from c++ is always the best.
- In the end, changing transform is heavy itself, so just try to not update stuff you don’t need to. ie - you have projectile that goes offscreen - update only it’s collision component (or the other thing you use for detecting hits), don’t update visuals, static mesh / particle transform.
- Don’t loop trough hundreds of anything in Blueprint. It’s a bummer but BP for loops are extremly heavy when big (the performance cost grows exponentially with the loop size).
Either use C++ loops, or cut loops to chunks (less than 100 would be ok I think, I didn’t test it explicity). Or just be creative, a lot of times you probably don’t have to loop trough everything. - and you can try to use Instanced static mesh if you have a lot of the same meshe everywhere. It could boost performance a lot but it’s usually the pain to work with and can lead to some unexpected challenges.
- Dont stick to one solution - make a base of your projectile, but be prepared for branching it to different childs. I would deffinitely make Boulder example an Actor with static mesh and stuff, but making a static mesh for a Laser that hits target instantly seems like overkill.
- There is this saying not to optimize prematurely. Make a prototype, spawn an extreme amount of everything and run it with profiler as fast as posisible. you might be suprprised what is costly and what is not, it might save you time.
Also I did a post on reddit some time ago on similar topic, you can check it out, maybe you’ll find it helpfull.
https://www.reddit.com/r/unrealengine/comments/13y9pyk/optimizing_the_game_for_hundreds_of_entities_for/