Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Frames per second counter?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
berrberr




PostPosted: Wed Nov 15, 2006 9:27 pm   Post subject: Frames per second counter?

Hi I was wondering if anyone has an example, or can explain how to make an FPS counter and display it on the screen. I ahve searched for a while, and only found examples of ways to decrease the frame rate, and not actually display it. I want an FPS counter because I'm testing out different methods of drawing graphics for my game in order to speed it up. Thanks Razz
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Wed Nov 15, 2006 9:31 pm   Post subject: (No subject)

well FPS is Frames Per Second right? So count how many Frames (or iterations of your loop) happen per second (6000 milliseconds), if the amount of frames in that time is over the amount you want, don't draw another frame, if it is under or equal to the number of FPS you want, then draw the image.
berrberr




PostPosted: Wed Nov 15, 2006 11:11 pm   Post subject: (No subject)

Thanks for the reply, but Im not quite sure oyou understood what I'm asking for. I want to display how many frames are being displayed per ssecond on my program and not adjust the fram rate...just display it.
Dan




PostPosted: Thu Nov 16, 2006 1:23 am   Post subject: (No subject)

[Snippit] FPS Limiter

[tutorial]Frame per Seconds
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
NikG




PostPosted: Thu Nov 16, 2006 10:37 am   Post subject: (No subject)

Freakman wrote:
So count how many Frames (or iterations of your loop) happen per second (6000 milliseconds)...
Isn't that 1000 miliseconds per second?

berrberr, even if you don't want to actually limit the fps of your program, what Freakman said and the two links Hacker Dan provided should help you achieve what you want. All you have to do is reset your framecounter after every second.
Clayton




PostPosted: Thu Nov 16, 2006 11:37 am   Post subject: (No subject)

Errr... Yes, I was thinking of something else that i was working on which required a 6 second check. If you just want to output the amount of Frames, its still the same process as an FPS limiter without the limiting Razz
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: