• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Higher FPS than room speed

Pandavim

Member
Hey everyone,
I'm currently making a game on GMS, and I enabled the debug overlay to see how well it ran. It turned out that I was getting crazy high fps (like 200 - 500) and I was wondering if that is how many frames my CPU is actually processing every second or how many frames my CPU could process every second. The game seems like it's running at the speed it would if it were running at 60 fps. I'm just concerned in case the high fps could unnecessarily damage my hardware. The room speed of my game is 60. Thanks!
 
W

whale_cancer

Guest
Actual framerate is capped to room speed. There is no danger of damaging your hardware.
 

Micah_DS

Member
It may seem a bit confusing, but there is fps_real, and there is also fps. Not to mention, there is room_speed as well.

fps_real will always be above the fps, fps should be running at exactly what room_speed is set to, but if the game lags, fps will drop a bit.

AND HERE'S MY ATTEMPT TO EXPLAIN THE 'WHY':
This might not be the best way to explain it, as I'm mostly self-learned and my terminology may be odd, but the real fps is not referring to how fast your game logic runs. Actually, it's not even showing how fast it could run, but it is showing how fast your game program is running (check out fps_real and fps). Your game program doesn't execute your game's logic unless it's at a time when it needs to, being in timing with your desired room speed (this may not be an accurate explanation when it comes to the async functions though).
It works this way due to needing some cpu processing overhead in order maintain the game's speed, so the game will run smoothly despite varying processing loads caused by your program and/or any other programs that may be utilizing the same core that your game is using.

I hope I actually explained that well enough. But yeah, it's quite normal for the real fps to be about three times as fast as the room speed, or even more.

Also, it's worth noting that if you change your room speed to something higher, GameMaker will automatically adjust the game's priority 'under the hood', and when you turn up your room speed, you'll see your real fps shoot up to accommodate the new speed. This is one reason why I always die a little inside when people max room speed to 9999.... I can't imagine any case where that isn't a massive waste of cpu.
 
Last edited:
Top