Fullscreen mode speeds up variable processing

Hey :I
I’ve been working with this program for a few weeks or so, and I quite like it, but something has consistently bothered me is that whenever I set fullscreen on it speeds up the variable drastically.

For example, I have gravity in a platformer setup that increases the player’s downward velocity gradually after jumping, so something like this: If groundcontact = 1, increase gravitymultipier by 1.

This works fine in windowed mode, but the player collapses the ground immediately from a jump when it’s in fullscreen. I sent it to someone else and the same happened for them, so it’s not just my computer.

This have been fixed in the lastest version of GDevelop (the fullscreen switch was disabling the fps limit and the Vsync).
However, your program logic should be time independant. The TimeDelta() expression is mainly here for that : it returns the duration since the last frame.
So, in your case, it allows you to adjust the increasing/decreasing speed of your variable : add X * TimeDelta() to your variable with X the number of incrementation per second.

See : wiki.compilgames.net/doku.php/gd … _timedelta
(and don’t forget to read the red box : don’t use that for forces as they are already expressed in pixels per second).

Thanks! I’ll get to downloading that new version.
Also thanks for the info on Timedelta. I’ll likely use that, but is doing it just by frames reliable or should I switch completely to Timedelta?

You should not rely on frames. Some systems may not be able to run your game at 60 FPS (considering you’ve set a 60 fps limit) and without TimeDelta(), the game will look slower. :wink: