Jump to content
IGNORED

How do you measure framerate ?


Recommended Posts

I have to draw  about 100 sprites on screen so, of course, framerate drops.

I'm on progress to optimize it but apart looking if sprites anim are smooth or not, I don't know how to measure the improvment.

So, is there a way to measure the framerate ?

 

I found this post but I'm not sure how to use clock() with tgi_busy()....

Edited by KanedaFr
Link to comment
Share on other sites

Most games have 0 as background, so setting color 0 to $FF and later to 0 you can see (if you have visible background) the amount to "time" (scan lines) your loop takes.

It if flickers, then you need more than one frame.

 

Link to comment
Share on other sites

I use a full screen 1bit full size scaled sprite for the background ;)

My point is not to see if it slows down (I know it does) but to 'profile' my actual rendering method and to measure if my future optimizations let me gain some cycles or not

Link to comment
Share on other sites

1 hour ago, KanedaFr said:

I use a full screen 1bit full size scaled sprite for the background ;)

My point is not to see if it slows down (I know it does) but to 'profile' my actual rendering method and to measure if my future optimizations let me gain some cycles or not

That's what setting FDA0 for, I usualy have a scotch tape besides the screen where I make marks. But if you are already < 60FPS, you may enable HBL interrupt for fine grained time or VBL for a coarse measurement.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...