Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Can someone give me a detailed explanation about frame rate and fps concepts?

share|improve this question
7  
In this context "frame rate" and "fps" are synonymous. However, you might also see the term "fps" in relation to the genre of the game - First Person Shooter. –  ChrisF Sep 7 '11 at 15:04
    
And some recent related news: techreport.com/articles.x/21516 –  Byte56 Sep 9 '11 at 16:43
add comment

3 Answers

up vote 38 down vote accepted

"Frame rate" and "FPS" (frames per second) are usually the same thing. A "frame" is usually a single image in the series of images presented to your screen rapidly so as to give the illusion of motion in your game, and so the terms generally refer to how many of those images your game can simulate and produce within one second.

FPS is often used as a crude measurement of performance, but it's important to remember that it's a non-linear measurement: the difference between 30 and 60 FPS is much larger than 60 and 90 FPS.

Occasionally you will see the term applied in a context where "frame" doesn't refer directly to a unit of graphics/simulation processing overall, but to something narrower in scope. The idea is the same, though: how many of these steps does the program produce within one second.

share|improve this answer
    
+1 I didn't know it's non-linear. Is it more like an y = log(x) curve, then? –  ashes999 Sep 7 '11 at 14:53
3  
One advantage to achieving and maintaining a FPS higher than the eye can reasonably consume is that is protects you from the occasional downward spike in FPS dropping you to a point where visual artifacts could be detected. The human eye's flicker fusion point tends to be around 60 FPS, in any case. –  Josh Petrie Sep 7 '11 at 15:14
1  
@bane: It's true that the eye stops detecting flicker sometime between 50 and 75Hz, but the human eye can see far more than that in "pictures per second". US military research has shown pilots can identify planes better-than-chance having only seen them for 1/220th of a second. Still, the limiter in any practical environment is going to be your display technology - usually 60Hz. –  user744 Sep 7 '11 at 15:59
3  
@bane: ms/frame is the first measurement you should be looking at for optimization purposes. This is the reciprocal of frames/second; you should not be looking at frames/second for optimization purposes unless you remember that it's really got this non-linear relationship to how good your optimizations are. Josh's link goes into great detail. –  user744 Sep 7 '11 at 17:57
1  
I'm nitpicking here, but framerate and fps are not "the same thing". Literally, fps is one unit for measurement of framerate. Just as meters is one unit for measurement of length. –  Laurent Couvidou Oct 18 '12 at 11:21
show 8 more comments

A "frame" is once around the game loop:

while( game_running ):
    update()
    draw()

update() involves things like

  • Reading user input
  • Computing enemy next moves

draw() is just drawing the current state of the game, as computed by update().

So here a "frame" is BOTH an update/draw cycle. FPS (frames per second) is a rough measure of how many times you can do your basic game loop per second, so by that its a rough measure of game performance.

Any number of things can be the bottle neck in your frame rate. It could be the CPU intensive AI code. It could be your collision detection routines before you added a reasonable space partitioning scheme. It could be the GPU itself.

If it contains an accurate physics solver, your physics solver will need to perform more than one iteration step per "frame" displayed (CarSim for example requires something like 1000 iterations every 1/60 second, simply to retain stability in the solution).

share|improve this answer
1  
-1 for necessarily coupling display refresh rates to game logic refresh rates. Your definition needs work. Please, inform yourself first, or you are potentially misinforming others. This is generally very bad for performance, and immediately rules out the use of any deterministic simulation characteristics, i.e. proper realtime physics calculations and multiplayer capabilities relying on same. These are the kind of fundamentals that are neither difficult to understand nor to implement. –  Nick Wiggill Sep 7 '11 at 21:02
    
Interestingly I was going to include something about this, but for the purposes of explaining what a frame is, I think this is adequate. I'll add something on the VIRTUAL SECOND later. –  bobobobo Sep 7 '11 at 21:11
    
I shall gladly remove the negative once you have. –  Nick Wiggill Sep 7 '11 at 21:31
    
I don't agree completely with your answer. To use your own example, physics engines often run much faster like 1000 times per second. This is often phrased as 'the physics engine runs at 1000 fps'. I would define frames per second as: 'how many times all work is done by a given system per frame'. This keeps the definition wide enough to apply also to physics engines and other subsystems that run at their own pace in games. Hopefully it's not too vague. –  Roy T. Sep 7 '11 at 21:47
    
-1, Josh's third paragraph covers the same ground as your entire answer without getting bogged down in irrelevant details. –  user744 Sep 7 '11 at 22:35
add comment

FPS = frames per second. A frame is basically your screen with something drawn on it. 60FPS means that something draws on your screen 60 times in one second. Because our eyes (or should I say the image processing cortex in the brain) is limited, if you draw something on very fast and move it each time - it will seem like it moves to our brain. That's how cartoons are done.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.