Hey :) How to get the number of frames ingame??

Just starting out? Need help? Post your questions and find answers here.
RedmoonX
User
User
Posts: 26
Joined: Mon Jan 17, 2005 9:54 am
Location: Sweden
Contact:

Hey :) How to get the number of frames ingame??

Post by RedmoonX »

like instead of "SetFrameRate()" i want to do this ingame to check
how many fps the program has "GetFrameRate()"
but i cant find anything :(

is it any algorithm to get fps??

RedmoonX
^^
-
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

In rough:

c=gettickcount()
repeat
game-code
f+1
if gettickcount()-c>1000
fps=f
f=0
c=gettickcount()
endif
loop
Post Reply