GameMaker Set number of steps and FPS using game_set_speed [SOLVED]

I'm using GMS2 and I want to set the number of steps to 60 and FPS to 60. Usually I'd use room_speed to set the steps, but according to the documentation that variable is obsolete. I want to set the game speed using the microseconds per game frame (MPF)value instead of FPS. What is the MPF value that is the equivalent to 60 FPS? I know the documention says 33333 microseconds = 30 FPS, so I would think 66666 is 60, but that doesn't work. Using that value only slows the game down. Also, is there a formula I can use to get the number of steps per second?
 

davawen

Member
The MPF is how much time a frame take, so if you increase it, it's going to take longer for a frame to pass.

To get 60 FPS, you want to divide 3333 by two.
 
The MPF is how much time a frame take, so if you increase it, it's going to take longer for a frame to pass.

To get 60 FPS, you want to divide 3333 by two.
Oh, ok that makes sense! Thanks, is there a way to calculate steps per second? I assume that is still independent of the FPS value.
 

TsukaYuriko

☄️
Forum Staff
Moderator
The formula is 1 / FPS. That's the duration of one frame in seconds.

1 / 30 ≈ 0.033333 (33333... µs).
1 / 60 ≈ 0.016666 (16666... µs).

Not sure why you would do this rather than just setting the FPS directly, but if it's what you want... there you go.
 
The formula is 1 / FPS. That's the duration of one frame in seconds.

1 / 30 ≈ 0.033333 (33333... µs).
1 / 60 ≈ 0.016666 (16666... µs).

Not sure why you would do this rather than just setting the FPS directly, but if it's what you want... there you go.
That's how my client wants it... I dunno why either, but thanks.
 
Top