2D Game Optimization

First of all, I want to apologize for any writing errors. I am Brazilian, and my English is not the best. I am using ChatGPT to translate.

I am using version 4.28
I’m having some issues optimizing my 2D game. I’m making a 2D game similar to Vampire Survivors, but I’m experiencing FPS drops on slightly weaker machines. I don’t know what I could do to improve the FPS. I’m already using forward shading, but I’m not sure which options I should disable to increase the FPS. My idea was to disable most of the rendering options, such as lighting and rendering effects, to achieve better performance with a large number of enemies. However, I’m not really sure what I should do.

are you sure your bottleneck is from GPU?

try run the game, press the ~ key to open the command line and
type : stat unit

that will give you the current frame time like this:

image

game is CPU
draw is GPU

from here you are aware if your problem is a graphic problem or a code problem.

those numbers are in milliseconds. to get the frame rate equivalent in FPS do 1 / value

These are the results I obtained from the test. The problem is clearly with the CPU. However, what can I do to reduce usage and maintain the number of enemies on the screen?

Note: Sorry for everything in Portuguese, but I hope you can understand.
Note: When I did this test, I reduced the enemy’s damage to 0 to have the maximum number of enemies on the screen without dying. For some reason, this caused the FPS to drop from 120 to 30.

No problem.

I am from Uruguay and speak spanish :slight_smile:

it’s very hard to point the logic problem you are facing without knowing what are you doing in the code. Looking at the screenshot, the game doesnt seems to be too cpu consuming but there is something that is exhausting the CPU.

2 Likes

Ok, so probably any other lighting or graphic settings I change won’t increase my FPS?
What tests could I do to find out which blueprint might be causing the FPS drop?

1 Like

you must decrease the GAME: number. just start unpluging stuff from the logic and test to see when you have a drastic time change.

1 Like

have some idea of what it might be, almost certain it’s a problem with the enemy’s programming loop or something like that. Thank you, I’ll look into it and when I find it, I’ll probably come back to the forum asking how to fix it.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.