Page 1 of 1

checking frame rate

PostPosted: Mon Nov 28, 2011 6:16 am
by DollMaster
how does one check the fps in their game? and what is a good normal/healthy frame rate? tried searching for a tutorial on how to include one, but had no luck. thanks.

Re: checking frame rate

PostPosted: Mon Nov 28, 2011 6:37 am
by akr
try

textNumber=frame

in your text actor

Would start with 25 fps. Depends on target.

Re: checking frame rate

PostPosted: Mon Nov 28, 2011 7:21 am
by lcl
No, akr, that won't work.
frame is just the number of the current frame and it grows all the time.
To get the fps, one has to use real_fps

@DollMaster: You can use the akr's code, but change frame to real_fps
And to change fps, go to game properties and there you can see a number which is 30 by default. You can change it to anything. :)

Re: checking frame rate

PostPosted: Mon Nov 28, 2011 9:41 am
by akr
Thanks. You are right.

Re: checking frame rate

PostPosted: Mon Nov 28, 2011 10:00 am
by Leif
what is a good normal/healthy frame rate?


If we talk about smartphones - 24 FPS is quite good. Enough to play normally and discarges battery not so fast.
But ! More important is - stability of FPS. When FPS is stable (for example 23-24 and not lower, when 24 is max ) your game runs smooth. If FPS are unstable - differs from 0 to 24 during rintime - actually noone can play such game.

To make game stable most important is not to overload it with great amount of actors or with great-size actors.

Re: checking frame rate

PostPosted: Mon Nov 28, 2011 2:11 pm
by Hblade
Code: Select all
int FPS=round(real_fps);
sprintf(text, "Frame Rate: %d", FPS);


That will display your frame rate. This code needs to be put in "Draw Actor" on a text actor.

Re: checking frame rate

PostPosted: Tue Nov 29, 2011 6:35 pm
by DollMaster
thanks guys.

Re: checking frame rate

PostPosted: Tue Nov 29, 2011 8:10 pm
by Hblade
np