? FPS Counter? (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Another contest? You asked for it!

FPS Counter?

  • #1 ✎ 82 Warrior Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies I would like to know how to make a Frames Per Scond counter for my game. Posted
  • #2 ✎ 112 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies MAINCNT returns the number of frames displayed since SmileBASIC was launched. You can take a MAINCNT value before, then take it again one second later, or sixty milliseconds, and find the difference in the values. Posted
  • #3 ✎ 1304 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Usually what I do is something like: VAR OLDMS=MILLISEC VAR AVGSPEED=1/60*1000 WHILE 1 ... VAR SPEED=MILLSEC-OLDMS 'get speed in milliseconds per frame OLDMS=MILLISEC AVGSPEED=(AVGSPEED*10+SPEED)/11'smoothing PRINT 1000/AVGSPEED 'convert to millisec/frame to frames/sec WEND The FPS will ideally be 59.834 (not 60) Posted Edited by 12Me21
  • #4 ✎ 82 Warrior Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself Drawing I like to draw! Hobbies Ah yes thanks, this will be helpful! The team i’m in has both the o3ds and n3ds so we needed to compare performance. Posted