I get the same questions about QW and fps every now and then. People ask me what's the best configuration for cl_physfps/cl_maxfps/whatever and I've written about it quite a few times on the forum too. This made me wonder if I should write it down as a guide or in my blog, and since people actually read these blogs to some degree I'll add it here. I could write it as a guide on news but let's put it here this time.
IMPORTANT UPDATE!The cl_earlypackets feature obsoletes parts of this guide, so in case you are using the cl_earlypackets you should set cl_physfps 77 and cl_maxfps to whatever value is good for you, preferrably being at least your monitor refreshrate or more. There are no multiplication rules of any kind anymore (neither cl_physfps nor monitor refreshrate matters) so you are free to use 200fps, 300fps, 400fps or whatever if you wish.
Let's get started then. This information applies to ezQuake with fps independent physics enabled (of FPS-I) used with CRT monitors. Requires settings:
cl_independentphysics 1
cl_nolerp 0
pushlatency 0 (older clients)
There are three things that need to be taken into consideration:
1) Frames per second (combination of physfps/maxfps)
2) Monitor's refreshrate
3) Mouse's refreshrate
The usual
"the more the better" applies here, but only to a certain point and going above that won't make any difference. So lets see what we got now:
1) FRAMES PER SECONDIt's somewhat important to make
cl_maxfps multiplication of
cl_physfps because of the internal timings of the ezQuake client, at least if the framerate difference isn't big.
Why you ask? Well, let's just put it this way:
cl_physfps 77 has update rate of 12,98ms at which it sends data to the server. If you have
cl_maxfps 154 it means that your frametime (visible frame updates) is exatly half the time it takes to send one
cl_physfps update. So, for every phyfps you get two frameupdates from maxfps at the exactly same frametime (12,98ms) which makes it perfect. If you have
cl_maxfps other than multiplication of
cl_physfps it causes the information from screen update come before or after the physfps causing internal desync or "jittering" (ie. physfps gets the info what to send to server at varying intervals making it more or less inaccurate).
Check the picture:
As you can see, regardless of the starting time (sync vs desync) of the
cl_maxfps it will ALWAYS update
cl_physfps at the same time, no matter what thanks to combined frametime that matches physfps update interval. Also notice that at 100fps the place where
cl_maxfps gives updates to
cl_physfps changes every frame which will eventually lead to an uneven update (1 update vs 2 updates per physfps).
When the framerate grows big enough, this limitation loses its grip at some point making it irrelevant. Small jittering will still occur but it's not really noticeable.
IMPORTANT NOTE:/cl_maxfps 0 isn't generally a good idea since the framerate will vary a lot depending on the situation, making updates really irregular. This, of course, has no real impact on anything as long as your fps range is 1000-3000fps, but if it goes from 120 to 400 then it matters a lot.
2) MONITOR'S REFRESHRATEThe higher the better, it's that simple. You can try syncing the refreshrate with your maxfps but it doesn't really matter as long as you run at least 150Hz or more. Even lower refreshrates work pretty good, so if your monitor doesn't support 150Hz, even 100Hz can be enough, though not as good. If you can't get at least 150Hz but are limited to 100Hz only, then you should try to match fps that is close to a multiplication of that refreshrate, for example 308fps is close to 100Hz * 3 and so on.
3) MOUSE REFRESHRATEAffects how many times you get to update your frames with input. Basically yet again more is better but after certain point it doesn't really matter. For example 500Hz mouse is as good as 1000Hz mouse, with less system resource (cpu) usage where 250Hz mouse can feel worse. The main idea should be that your mouse refreshrate should be higher than your fps. This allows at least one update from input to each frame, at least in theory. You don't want to leave one frame without input update, do you?
So what do we make it from here?A simple formula that goes like this:
monitor Hz <= maxfps <= mouse Hz
While considering the stuff I already mentioned above.
Sync everything and you get smooth experience (125Hz monitor, 125fps, 125Hz mouse). Sync parts of it with very high refreshrates and you'll get smoother experience (150Hz monitor, 500fps, 500Hz mouse). To make it overkill, use very high refreshrates with slight desync (150Hz monitor, 13*77=1001fps, 1000Hz mouse).
EXAMPLES:Entry level : 150Hz monitor, cl_physfps 77 + cl_maxfps 154, 500Hz mouse
Entry level + : 154Hz monitor, cl_physfps 77 + cl_maxfps 154, 500Hz mouse
In both cases, you can try setting the cl_maxfps to 231, 308, 385, 462, 539, and so on
Improvisation : 150Hz monitor, cl_physfps 77 + cl_maxfps 500, 500Hz mouse
Improvisation + : 150Hz monitor, cl_physfps 77 + cl_maxfps 1001, 1000Hz mouse
In these cases we are trying to maximize the effect of the mouserate by hitting maxfps to it or very close to it. Also notice that even if maxfps 500 isn't X * 77 it still feels really good. 13 * 77 = 1001fps with 1000Hz mouse is even better, if you can spot the differences that is (my guess here on differences would be: placebo).
UPDATE 19.12.2008 - Settings for 60Hz TFTEver since I got my 24" BenQ G2400WD (reviewed
here) I've been testing different settings for it. There are few settings that seem to be pretty nice, let's check them:
1) cl_physfps 77, cl_maxfps 300 or 308- Depending on which one feels better for you, you can try syncing/multiplying either monitor's refreshrate (5*60=300) or cl_physfps (4*77=308).
- Feels nice, but not perfect.
2) cl_physfps 77, cl_maxfps 500- Ignore refreshrate and cl_physfps, instead use maxfps = mouserate.
- Feels about the same as above, doesn't look as good though.
3) cl_physfps 75, cl_maxfps 300- Even match, 4*75=300 and 5*60=300, mouserate should be at least 500Hz.
- Looks the best of these three.
- Feels the best of these three.
- I can still finish ztricks2, which should be a good indicator of the possible speed loss due to physfps of 75 and not 77. (READ: speed loss seems to be minimal)
UPDATE 19.07.2009 - Settings for 120Hz TFT1) cl_physfps 77, cl_maxfps 308 or moreQW does not look any better or smoother with higher values than say, 616fps. I chose 308fps for my setup just to make input a bit more responsive, but I think this has only placebo effect