- 1st FPS meaning: Frames Per Second. This refers to the number of frames that the engine renderes every second, on average.
- 2nd FPS meaning: First Person Shooter. Games such as Quake and Unreal Tournament are FPSes.
The average frame-time for most game projects is around 10ms to 30ms, anything above 100 fps does not make any difference at all for the slow human eye. What really provides the impression of smooth rendering is a constant framerate and, that's most important on modern flat screens, use of v-sync.
On a multitasking OS the worst that can happen to your game is some other processes that consume a lot of processing power. So make sure they can't cause too many problems by raising your games task priority a little bit. The "above normal" priority will do a good job in most cases here.
Also make sure to measure the rendering time for every frame. If you have a lot of frames that take more than 1/60th of a second, just adjust the game to target 30 fps. Keeping constant 30 fps will provide a much better impression than trying to do 60 fps and skipping a frame every now and then.
Also try to tune your frame rate to the display refresh rate. 60 fps on a 100 Hz screen just look awful, better waste some time and try to use 50 fps.
You don't really need to call Sleep() at all if you don't also use vsync. It might improve smoothness of the animations, but it will reduce your overall framerate in some cases. My advice was meant for projects that target a smooth, synchronized framerate with vsync switched on. If you just want to achieve the highest framerate possible it's indeed better to just loop without wasting any time at all.
So the two possible goals someone wants to achieve in his application can either be highest possible framerate, with the drawback of having a lot of tearing artifact, especially on flat screens, or to target smooth rendering and animations, that is where I was heading towards in my posts. The best framerate for a 60Hz flatscreen is 60 fps and for 100Hz it is 100 fps.
If your application needs a lot of rendering power and you can not achieve these framerates in (almost) every frame, it is better to go for half the refresh rate of the screen (30 fps or 50 fps) and make sure you "waste" at least enough time every frame, so that all frames are rendered with the same framerate. It will feel more fluent, because the human eye is very sensitive to fluctuations in the framerate.
I don't know if you see the point in what I just said, but if you try it you may even be surprised to see how even 30 fps can feel very smooth if you just do it in the described way. I was surprised to see a game that was rendering even slower (20 fps on a 60Hz flatscreen), but just because they made sure that every frame took 50ms to render it gave the impression of smooth animations.
The related game loop discussion is here.
- Frame rate - Wikipedia
- QueryPerformanceCounter - for game loop calculations
- Gameloop etc questions - forum topic with useful information for FPS limitations