in Draw Event i have a simple code
...
draw_text('FPS' + string(fps));
...
and it just shows
FPS : 0
What went wrong? Can anyone explain?
Note : The line is NOT the only code in draw event, there's other code too.
Posted 23 May 2012 - 07:38 AM
Posted 28 May 2012 - 01:15 PM
I've been using GMS Beta for now, and trying to measure fps by using the built in global var - fps. It just returns 0.
in Draw Event i have a simple code
...
draw_text('FPS' + string(fps));
...
and it just shows
FPS : 0
What went wrong? Can anyone explain?
Note : The line is NOT the only code in draw event, there's other code too.
Posted 28 May 2012 - 01:49 PM
There is something wrong with that code. In Studio, you should you use a high resoultion timer instead.
I've been using GMS Beta for now, and trying to measure fps by using the built in global var - fps. It just returns 0.
in Draw Event i have a simple code
...
draw_text('FPS' + string(fps));
...
and it just shows
FPS : 0
What went wrong? Can anyone explain?
Note : The line is NOT the only code in draw event, there's other code too.
Not sure what's wrong with the this piece of code. But I've read that you should fix your game to use 30 or 60 fps only for iOS applications.
Posted 31 May 2012 - 10:08 PM
lastTime = 0;
frames = 0;
timeNow = 0;
frames += 1;
timeNow = current_second;
if (timeNow > lastTime)
{
fps_str = string(frames);
frames = 0;
lastTime = timeNow;
}
draw_text(10, 20, 'FPS: '+fps_str);
0 members, 0 guests, 0 anonymous users