Can someone give me a detailed explanation about frame rate and fps concepts?
"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.
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.
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).