Seems like you execute too much logic inside your blueprints that is slowing you down (or you just have too many active blueprints that all execute logic).
Approximately how many actors/fishes did you have in your level when you took those stat informations? And how many do you need (so if you would have a system that would activate/inactivate them based on the distance to the player, then how many active actors/fishes would you need?)
You cannot have tick on every actor in the scene. That’s the problem.
The flyweight design pattern mentioned above is a good start. The Publisher/Subscriber pattern is good too.
In this pattern, a BP_FishController (publisher) calls a Swim function in each BP_Fish (subscriber). The Swim function determines the movement for each fish independently. This can be done every tick. So now, only one actor (BP_FishController) is on Tick, and not 500 or so. You can use message delegates, register each fish in an array, or use a “GetAllActors” node.
the tick interval to .02 ( possibly between .01 and .02 )
Very roughly speaking, that’s gonna make them tick half as much. For the timeline, it wont make any difference, but for the things on tick, they will move half as fast, unless you have already compensted for machine power using ‘world delta seconds’.
Try a few a first, see what it’s like. When you strike the right zone, they will be a tiny bit jerky ( very slight ), but will be using much less CPU.
Also, could you show what you have a tick in your typical fish?
I also have a similar problem, im making a big open world survival game with over 150 actors in world, like trees that can be cutted down, stones that can be mined, etc
How should i implement the culling thingy?
I started by spawning everything wiht everything off, its working well, and the player has a sphere with a begin overlap and when something overlaps with it it become visible, but i forgot that i made them spawn with everithing off, so it has no collision, so no overlap, so no begin overlap event.
What should i do?|
I tried cull distance volume, i have LOD’s on everything.