• 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!

SOLVED FPS is half my game speed?

IGameArt

Member
I have a game that i'm porting to gms2, an older project of mine. The game speed is set to 60 fps, yet the fps is capped at 30, which it wasn't in 1.4. As far as I can tell by searching through my code, there are no calls to change the game speed to 30 fps instead of 60. It is unbearably slow for a game that's really not doing much in terms of intense calculations.

One odd thing to note, gamespeed_fps seems to return zero instead of 60.

I'm kind of confused and could use some direction from you lovely folks!

[Solution]
Disable vsync because vsync on windows is terrible and will break your game ;)
 
Last edited:
S

Sybok

Guest
A quick glance at the manual suggests that gamespeed_fs is an enumeration, so it’s not surprising that it returns zero.

Code:
game_get_speed( gamespeed_fps )
As for your problem, very odd.

Out of interest, how does it run if you turn on (or off depending on your default). How does it run with sync off and room speed at 9999? Framerate-wise that is. Obviously object may run fast if delta time isn’t in play. But more interested in frame rate performance at this stage.
 

IGameArt

Member
So i've disabled v sync and that uncapped my frame rate so now the game can run at up to over a thousand frames, which really baffles me. Why does vsync behave differently in gms2 than it did in gms1.4?
 
S

Sybok

Guest
VSync works the same between both. So it’s a strange one. The other thing I’d suggest is playing with ‘sleep margin’, found in the windows properties. That one is well known to be the root of grievances like this.

I think by default it is now 10. I’d try 1 and see if that makes any difference.
 
S

Sybok

Guest
If this is solved, please mark it with the 'Solved' tag, and share your solution.
What made you think it was solved?


Edit - Ah, I see he tagged as so.

Yes, I’d like to hear what the final solution was too, having invested time in to helping you.
 

TheouAegis

Member
GMS1 likely did not use as many surfaces. Your computer hardware could not handle GMS2's surfaces. It's not Windows, it's your hardware. I first experienced this in GM8, personally. I had a simple game with one additional surface and vsync accidentally enabled. It was only slow on one PC, not others.
 
Top