#Optimisation and frame rate

32 messages · Page 1 of 1 (latest)

rustic crow
#

Im working on a very low poly game with almost zero shape movement.
I use a 2021 iMac with 8gigs of ram and an M1 chip.

Picture 1: I made the logic of the game and ran it like this, in windowed mode. The only thing that really moves is the camera3D. when i move that, i get around 60fps. If i fullscreen the game, my fps goes down to 30.
Picture 2: i wanted to now work on making the game look better. I added fog and other environmental changes, but now in windowed mode i get 30fps, and fullscreen is at 10fps or worse, and my computer starts overheating.

Now i understand that adding fog and other such changes would definitely slow the game, but i dont get why it should be this slow. Even without the fog, getting 30fps when absolutely nothing is happening is quite sad. Would any of you know how i could fix this?

loud tangle
#

have you played any other games? what was your fps like there? Because 8gb ram is quite.. mid..

rustic crow
#

lol yeah i agree my ram isnt the best but the only game ive played is minecraft

#

i average 60fps there with a lot of optimization mods

#

if i play without optimization my cpu becomes a frying pan unless i lower fps down to 30

#

but yk id expect minecraft to be more cpu heavy with all that rendering

#

the game im making is barely anything

loud tangle
#

ya

loud tangle
#

do you have a lot of _process() code?

rustic crow
#

zero actually

#

my code isnt even that heavy

#

i have about 11 gd files

#

two of which are global variables and global signals

#

and all of them average to about 40 lines of code

loud tangle
#

11 gd files with 40 lines each?

rustic crow
#

no no averaged

#

like

#

one has just 5 lines

#

another has 78 lines

#

another has 10 lines

#

average of all that = ~ 40

loud tangle
#

i see

#

in your code, apart from _process(), is there anything that keeps updating?

tender marlin
#

this seems like a GPU bottleneck by your statement that said: "when windowed is 60fps, when fullscreen is 30fps"

#

Try a few things:

  • run in compatibility mode (it uses opengl instead of vulkan, if your notebook doesnt support vulkan properly, it can be very slow)
  • remove shadows
  • draw less, put your camera angle mostly looking down, fewer meshes showing on camera, fewer drawcalls
rustic crow
#

and..

#

i get like 60+ frames in windowed mode AND fullscreen, so thats a win

#

but i guess you win some you lose some

#

either way, thank you for your inputs!