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

GameMaker Simple Game is lagging.. fps_real in the hundreds.

A

Ayziak

Guest
So I've been making a pretty simple game, but on some devices, it lags from 60fps to around 45. I'm not new to Gamemaker lag, I've worked with delta_time before, but I'd rather try to find the core problem here, instead of hiding it.

Each room is 10000px square, with <100 objects, half of which have no code and are simply decoration.

What I find odd is that fps_real is in the hundreds., while fps is still 0.5x - 0.9x the room speed of 60.

This game was imported from 1.4, where on every device I tried it on it ran smoothly.

Any ideas?
 

RangerX

Member
Does the debugger show anything suspicious?
You might also want to put a higher sleep margin (max 15 for a 60fps game)
 
A

Ayziak

Guest
Does the debugger show anything suspicious?
You might also want to put a higher sleep margin (max 15 for a 60fps game)
Thanks for your quick response!

The debug looks normal, and changing the sleep margin doesn't seem to change anything. I've tried creating an empty room with nothing but an object to draw the fps, and it's still around 50.
 

Ido-f

Member
Just throwing an idea out there, maybe it has something to do with vsync, synchronising with monitor refresh rate?

target platform game options, graphics tab:
Use synchronization to avoid tearing: This toggles v-sync on or off (v-sync is used to synchronise your game update speed to the refresh rate of the monitor). Note, that if you have a game with a room speed of 120 and the player has a monitor with a refresh rate of 60, turning this option on will lock your game speed to 60 too. This is off by default.
 
A

Ayziak

Guest
Just throwing an idea out there, maybe it has something to do with vsync, synchronising with monitor refresh rate?

target platform game options, graphics tab:
Oh it's funny, I just came to that idea 5 minutes ago, but there's no setting for vsync in Android game options, and changing it in code doesn't do anything. (and it's disabled for windows, but fps still caps at 60)
 
Top