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

Real fps or room speed?

F

frozenwisp

Guest
So what should I use real_fps or room_speed. I ask this because I plan on rewriting a old engine of mine how ever I would like to know the pros and cons of each the variables. As building a good engine requires a good foundation.
 
C

CheeseOnToast

Guest
room_speed will only return what the current speed the room is set to, you can use real_fps/fps to see how many frames your game is making.
 
P

Paolo Mazzon

Guest
Just a little clarification, real_fps is how many frames the engine is processing a second, and fps is how many your game is processing. (So fps may be 60 but real may be 487)
 

csanyk

Member
I believe that delta time is the way to go on this.

room_speed is the target frames per second that the game will run at, if it can. If the hardware can't keep up with what you programmed, it will fall short. I like to use it for calculating times for alarms and such, rather than using magic numbers; eg, time = room_speed * seconds

fps is the actual fps, but capped at room_speed; that is if the engine is running faster than room_speed, fps will return room_speed.

fps_real is more for benchmarking, to see how your game is performing. You can use it for diagnostics, debugging, and optimization. It only updates once per frame, though.

delta_time tells you the exact time in microseconds between the last frame and the current frame. This can be used to adjust speeds and achieve smoother motion.
 
Top