|
Post by therealmethuselah on Nov 23, 2005 13:01:49 GMT -5
Here's a FPS script that I used for ZeldaMaker. It works great. Made by tsg1zzn Create Eventframes = 0; prevSec = current_time; totalSeconds = 0; lastSecFPS = 0; Step Eventframes += 1; if ( current_time > prevSec + 1000) { lastSecFPS = (frames * 1000 / ( current_time - prevSec)); frames = 0; prevSec += 1000; totalSeconds += 1; } Draw Eventdraw_text(16, 16, 'FPS: ' + string(lastSecFPS)); This will draw the FPS with two decimal places (ie: 29.87) You could change it to display more places by chaning the Draw EventmyFPS = string_format(lastSecFPS, 6, 4); draw_text(16, 16, 'FPS: ' + string(myFPS)); This will display like this:
|
|