Avoid FPS drops when spawning much actors by spawning them earlier, but invisible?

Hello,

if there are much actors spawning at a specific time in a game, this can cause a FPS drop. Is it a legit way to spawn them earlier in the game but make them invisible, maybe on the loading screen, and when they are “spawned” later in the game just set the new transform and make them visible? Would that help with the FPS drops?

Thank you,

Thilo

It might help. If you make them ‘hidden in game’, because the system doesn’t have to draw them. You would still get the ‘hit’ from spawning a lot of actors though, actors cost FPS.

Give it a go!

Yes, it works. Could go even further. In a presentation about performance in Robo Recall they said that they even “recycled” actors to avoid FPS drops, so for example made a pool of projectile-actors and didn’t destroy them if they hit a wall, but made them invisible and put them back into the pool.

Object Pool Plugin in Code Plugins - UE Marketplace

( not mine ).

Wasn’t too hard to implement it by myself. Currently looking for people having a look at it since this will be a critical point in my game: https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1775531-please-have-a-look-at-my-actor-pool-implementation