Framerate Misconception

|
The FPS (frames per second) benchmark is often misinterpretted by newbie game programmers. A common question on the Gamedev.Net forums is "Why is my framerate dropping so much?" The poster usually goes on to say that with a blank screen being cleared their FPS >1000 and as soon as they draw a triangle it is down to 500, or so.

This is because of the common misunderstanding of what the framerate represents. It represents how many times the scene is being drawn per frame. What you should really be interested in is how long it takes to draw a scene. Most top end games aim for somewhere around 30FPS, that is the scene is getting rendered 30 times per second and that it takes 1/30 second to draw. Back to the original example, a scene rendering at 1000FPS is being drawn in 0.0001 seconds. If the FPS is halved to 500FPS, the kneejerk reaction is that it is going substantially slower. Actually the frame is being drawn twice as slow in 0.002 of a second. This is very unsubstantial, a time-taken increase of 0.001 seconds.

Take an example at the other end of the scale, if your scene is presently being drawn at 60FPS and you add some new lovely feature and it is now being drawn at 30FPS, that is a step up from 0.016 of a second to 0.033. You are stepping up by 0.016 of a second, which means that what you have added is 16 times more expensive than in the previous example..

Don't be shocked to find your FPS dropping rapidly in the early stages of adding features to your renderer, be more focused on how expensive certain rendering features are.

0 comments: