• 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 Cannot change game speed...

DaveInDev

Member
Hi there,

I am in windows 10, with a windowed game.

Despite all my efforts, I cannot change the game speed which stays at 60, even if I have room for speed...

I tried :
- changing options / general / game speed to 90 or anything else
- using game_set_speed (note that game_get_speed reflects the change, but nothing happens...)
- tweaking display_set_timing_method
- tweaking vsync on/off on the option/windows/graphic.

I display the variable "fps" that stays at 60.
game_get_speed show 90.
And the fps_real runs around 180-300.

Is it possible that Windows is using VSYNC and is forcing GMS2 to follow VSYNC rate ?

--------------
By the way, I do not really understand this fps_real variable : in the manual it's said :
" the fps is the number of CPU steps that GameMaker Studio 2 is actually completing in a second up to a maximum value of the room speed itself. To get the true fps, ie. the actual number of cpu steps per game step, use the fps_real variable ".

I understand the first part. There is a "desired fps", and then a obtained fps, that can be lower if there is too many calculation in one step (and then the game seems to slow down, because GMS does not use delta time). But what is this "true fps", which in my case seems to be higher than the FPS... Is it the FPS that GMS could achieved if it was not restricted by the room_speed ? Because in any case, it seems that the number of calls to "step events" per second is always the limited "fps" and not this "fps_real"...
 

Evanski

Raccoon Lord
Forum Staff
Moderator
Game speed
Fps
and Real fps

are all different things :)
Personally I focus on FPS as my main sample
by default it should be set to 60
meaning every step of your game is 60 frames per 1 second
60 is generally the best set for this but for whatever reason
go to
game options > main > game frames per second and change that to your desired FPS
Note this will make your game run faster and slower and could cause a list of bugs and issues
 

DaveInDev

Member
thx @EvanSki , that's what I understood, but as I told before, changing "options > main > game frames per second " does not change anything...

And for my game (which is more a simulation), I'd like both behaviour :
- running at a constant 60 FPS
- or unleashing the speed to go as fast as possible to accelerate the simulation.
 

DaveInDev

Member
Oh F... , I forgot that somewhere I used display_reset to change antialiasing AND also vsync.....
Without vsync, everything is fine.
And as I suspected, when using vsync, fps_real is only describing the potential FPS you can obtain without vsync.
Without vsync, fps and fps_real are identical.
 

DaveInDev

Member
fps and fps_real are identical without VSync? That sounds odd as they shouldn't be...
Not precisely the same, but they are very close. I suppose that fps is more an average and fps_real refreshed at every step, no ?
Instead, with vsync, FPS is steady 60 and fps_real can be fluctuating around 250 (for my game).
 
Top