I am making a game like 20 minutes till dawn and I have a question about optimization.
The game does not have as many bullets as possible enemies, that is, the enemies are more).
Having tested the game on different PCs I got the following limits at which to play becomes uncomfortable (<60 fps):
I5 8300H and GTX 1050 - 250 enemies,
I5 10*** and RTX 3060 - 480 enemies,
I5 12***K and RTX 3060 TI - 680 enemies.
I also found that when these entity thresholds are reached, the CPU and video card load is not peak to peak, but much lower.
On a PC with rtx 3060(ti), the load on the GPU is about 5-20 percent and the load on the CPU is about 15%.
On a pc with a GTX 1050 ( my pc :(((( ) the load on the GPU is about 20% and the load on the CPU is about 40%.
Also, RAM consumption on all PCs did not exceed 500MB.
So, I would like to know how I can optimize this kind of game, get tips and help
I know about the object pool, however in my case I don’t need it, my problem comes solely from the enemies. I need a way to optimize them. All I have done now is disable and enable visibility on and off screen.
Sounds like you figured it out then! Would be interesting to understand what is going so wrong with your enemy node implementation as to cause such significant FPS degradation with a not so huge amount of instances.