Community Forums

Go Back   Enemy Territory: QUAKE Wars Official Community Site > Enemy Territory: QUAKE Wars Game Forums > QUAKE Wars Public Beta Archive

QUAKE Wars Public Beta Archive Relive the public beta version of the Strogg invasion!

 
 
Thread Tools
Old 06-19-2007, 03:21 PM   #1
FeaRog
Master Sergeant
 
Join Date: May 2007
Default Unlock FPS information and tuning tips

Hi all,

I've noticed a few questions about the FPS locking, so rather than respond in individual threads to queries I thought I'd create a new thread to avoid confusing things.

I hope this guide & explanation helps you all out some. Please remember that it isn't final yet, this is a beta and things can and will change!


BACKGROUND INFO

The most important thing to maintaining the perception of as game being smooth is a constant, consistently spaced framerate. I'm sure many of you have played console games - you'll have noticed that a game feels dead smooth until you get "hitches", happening in intense periods of activity, that make the game no longer feel smooth. These happen when the game can't achieve its target framerate (eg 30fps on NTSC) and drops a frame, momentarily going at 15fps. It usually feels better for a game to run at a constant 30fps than at 60fps but regularly dropping to 30fps.

The game (and physics) runs at 30fps, so the rendering also runs at 30fps unless it is unlocked from the game framerate.
There is a cvar - com_unlockFPS - which enables you to unlock the game and the renderer to some extent. This allows the renderer to draw more frames than just the 30fps.


CVARS

There are several cvars that can be modified to adjust how the unlocking behaves. Note that none of these are a universal solution - it is a heavily subjective thing, and depends a lot upon your hardware and software. Warning: This is a fairly technical explanation. I've tried to keep it pretty understandable.

com_unlockFPS - this is the master cvar. If you do not set this to '1' then it will never attempt to exceed 30fps.

com_unlock_timingMethod - this selects one of three timing methods for unlocked frames:

0: This will try rendering another frame whenever it estimates it has enough time left for rendering before the next game frame is done. This will give you the highest possible framerate, however it can lead to frame "bunching". To many (including myself) this feels really jerky - 200fps in the best case is no good if its regularly dropping to 60fps.

1: This is similar to method 0, but instead of squeezing in rendering whenever it can it tries to space them at even multiples of 30fps. This is a slight improvement over method zero in terms of smoothness, but sacrifices some FPS.

2: This is the same as method 1, but instead of estimating if it can fit another rendering frame using only the render time estimate it estimates using the total time of game + renderer. Hypothetical explanation: Lets say the time between two game frames was meant to be 10ms. Game + render time takes 5ms, leaving 5ms left. Rendering only took 2.5ms. Method zero would then render two more graphical frames before the next game frame - in effect feeling like the game should be running at 400fps but dropping a frame every 10ms, giving it a jerky feel. With this method it would only draw a single extra frame so it wouldn't feel sporadic. You'd only get 200ms however.

com_unlock_maxFPS - this only does anything if com_unlock_timingMethod is set to 1 or 2. This limits the maximum fps your PC will try to achieve. This will be rounded to the next lowest multiple of 30 - eg if you set this to 59 it will in effect be treating the maximum as 30. This helps to control the fluctuation sometimes prevalent.


There are a couple of other tuning cvars but those shouldn't really need much tweaking. com_unlock_safetyMargin adjusts how conservative the estimation is, and com_unlock_avgFrames is there to help ignore spikes & troughs in the estimation. The defaults of these should be fine for most people.


TUNING

The defaults are to unlock the FPS, with a maxFPS of 60 and timing method 2. This basically means that if your system is fast enough to exceed 60fps all the time then it will do a constant 60fps. If your system isn't fast enough to exceed 60fps at all times then it will fluctuate between 30 and 60fps. Lower end systems may well be unable to exceed 30fps most of the time - for these people you are probably best off disabling unlockFPS and satisfying yourself with a smooth 30fps. You can try to increase your FPS by lowering the graphics resolution & quality settings. A lot of middle-of-the-range systems can probably achieve a pretty regular 60fps with some tweaking here.
If you have a really good system you can probably do better than 60fps - in that case try increasing your maxFPS. I find that on my dev system here (2.4GHz Core 2 Duo, 7800GT, 2gig ram) I can do 90fps pretty constantly, so I have mine set to 90. You'll need to experiment a bit to find a level of this that doesn't fluctuate too much for your liking.

If the only thing you care about is the absolute maximum FPS then try setting com_unlock_timingMethod to zero! This is highly unlikely to feel smooth, but again it is totally subjective. Whatever floats your boat, hey


V-SYNC

If you have your monitor's refresh rate set to 60Hz and have v-sync enabled then you might as well set com_unlock_timingMethod to zero. This is because the new frame won't display until the evenly spaced 60fps point anyway - this is what timing methods 1 & 2 try to achieve. It will also limit you to a maximum of 60fps. Having V-sync enabled with refresh rate set to anything other than a multiple of 30fps will probably feel jerky.


EDIT:
USAGE

These cvars ("console variables") are adjusted using the console. If you are unfamiliar working with the Quake-style console then it is a good idea to read a guide first. ETQW for Newbies has a good description of how to make an autoexec config to make sure these settings stick around. CTRL+ALT+~ opens the console. To set the cvars so that they stick around for next time you start the game enter something like this at the console (or insert it into your config):

seta com_unlockFPS 1
seta com_unlock_timingMethod 2
seta com_unlock_maxFPS 60

The "seta" command "set"s the cvar and then "a"rchives it. Use this seta command to set each of the cvars.


MISC

I highly recommend that you also enter the following so that you can see what impact your settings are having:
seta com_showFPS 1

com_unlockFPS does not have any affect when you are not connected to a server. So don't worry if you're locked at 30 at the menu - thats normal. Connect to a server and test it there.

Note that there are a few bugs with it in the public beta build, meaning that sometimes in timing method 2 your framerate will drop to 30 and never be able to recover, and a few other things.

A generalization of the timing methods:
0 - max FPS with no regard to the "smoothness" of the FPS
1 - lower FPS than method zero but slightly more smooth
2 - lowest FPS of the three methods, but the most smooth

Method 2 is much more CPU speed dependant than the other two - if you have a fast CPU then method 2 will likely not cut your FPS a lot but will result in a much smoother framerate. Otherwise methods zero and one are more likely to yield a higher framerate.

Last edited by FeaRog : 06-28-2007 at 12:33 PM. Reason: Added more info
FeaRog is offline  
Old 06-19-2007, 03:24 PM   #2
NoControl
Lieutenant Major
 
Join Date: May 2007
Location: Finland
Default

Nice guide, thanks.
__________________
NoControl is offline  
Old 06-19-2007, 03:25 PM   #3
CommanderZx2
Staff Sergeant
 
Join Date: Jun 2007
Default

I believe the reasoning behind the 30fps is a console one, everyone knows that no one uses 30Hz on PC monitor and no one wants to be below 60fps. However lots of xbox 360 games run at 30fps.

This annoys me greatly.
CommanderZx2 is offline  
Old 06-19-2007, 03:28 PM   #4
sponge
Global Volunteer Force
 
Join Date: Apr 2007
Location: Rochester, NY
Send a message via ICQ to sponge Send a message via AIM to sponge Send a message via MSN to sponge Send a message via Yahoo to sponge
Default

Quote:
Originally Posted by CommanderZx2 View Post
I believe the reasoning behind the 30fps is a console one, everyone knows that no one uses 30Hz on PC monitor and no one wants to be below 60fps. However lots of xbox 360 games run at 30fps.

This annoys me greatly.
It is not a console one. It is actually to decrease load on the server: instead of having to run physics at 60 ticks per second ala Doom3/Quake4, they chose to do it at 30. Unlike D3/Q4, however, SD appeared to allow the renderer to run at any arbitrary rate.

With com_unlockfps 0, the game acts like Doom3 and Quake4: it will only render as many frames are there are game ticks. This is the old behaviour we've seen in previous id Tech 4 games.
sponge is offline  
Old 06-19-2007, 03:28 PM   #5
RR2DO2
Technical Director
 
Join Date: Apr 2007
Default

Quote:
Originally Posted by CommanderZx2 View Post
I believe the reasoning behind the 30fps is a console one, everyone knows that no one uses 30Hz on PC monitor and no one wants to be below 60fps. However lots of xbox 360 games run at 30fps.

This annoys me greatly.
That'd be an incorrect assumption, see sponge's post for some details.
RR2DO2 is offline  
Old 06-19-2007, 03:29 PM   #6
Colosus
Master Sergeant
 
Join Date: May 2007
Default

Quote:
Originally Posted by RR2DO2 View Post
That'd be an incorrect assumption, see sponge's post for some details.
Don't bring your logic into his assumptions.
__________________
Colosus is offline  
Old 06-19-2007, 03:30 PM   #7
CommanderZx2
Staff Sergeant
 
Join Date: Jun 2007
Default

Quote:
Originally Posted by RR2DO2 View Post
That'd be an incorrect assumption, see sponge's post for some details.
Then why not 60fps by default?
CommanderZx2 is offline  
Old 06-19-2007, 03:31 PM   #8
Colosus
Master Sergeant
 
Join Date: May 2007
Default

Mine runs at 60fps by default because my system can easily handle that and will never drop below 60fps.
__________________
Colosus is offline  
Old 06-19-2007, 03:31 PM   #9
sponge
Global Volunteer Force
 
Join Date: Apr 2007
Location: Rochester, NY
Send a message via ICQ to sponge Send a message via AIM to sponge Send a message via MSN to sponge Send a message via Yahoo to sponge
Default

Quote:
Originally Posted by CommanderZx2 View Post
Then why not 60fps by default?
Like I mentioned above, it would require an obscenely powerful server. D3/Q4 only have to simulate physics of a few players. ET:QW has to simulate player physics for 32 players, and then vehicles.

By default, the game should render at 60FPS. Some people are having trouble with it, hence this thread.
sponge is offline  
Old 06-19-2007, 03:33 PM   #10
CommanderZx2
Staff Sergeant
 
Join Date: Jun 2007
Default

Quote:
Originally Posted by sponge View Post
Like I mentioned above, it would require an obscenely powerful server. D3/Q4 only have to simulate physics of a few players. ET:QW has to simulate player physics for 32 players, and then vehicles.

By default, the game should render at 60FPS. Some people are having trouble with it, hence this thread.
I play on 100tick css servers with 64 players, pfft. It feels like it's limited by default to be capable of running off a non dedicated server.
CommanderZx2 is offline  
Old 06-19-2007, 03:33 PM   #11
RR2DO2
Technical Director
 
Join Date: Apr 2007
Default

Yes, CS has much simpler game logic though. Also, this doesn't have anything to do with listen or dedicated servers.

Last edited by RR2DO2 : 06-19-2007 at 03:39 PM.
RR2DO2 is offline  
Old 06-19-2007, 03:40 PM   #12
engie^benjy
Senior Captain
 
Join Date: May 2007
Location: Birmingham, UK
Default

Fantastic guide thanks, if i get a beta key this info will be a great help!

engie^benjy is offline  
Old 06-19-2007, 03:41 PM   #13
FeaRog
Master Sergeant
 
Join Date: May 2007
Default

Quote:
Originally Posted by engie^benjy View Post
Fantastic guide thanks, if i get a beta key this info will be a great help!
No problemo
FeaRog is offline  
Old 06-19-2007, 03:57 PM   #14
me666
Banned
 
Join Date: Jun 2007
Location: mp_beach
Default

Quote:
Originally Posted by sponge View Post
...instead of having to run physics at 60 ticks per second ala Doom3/Quake4, they chose to do it at 30.
as far as i suppose to know the physic in doom3 runs at 30Hz but not the renderer, which is capped at 60Hz...
me666 is offline  
Old 06-19-2007, 04:10 PM   #15
sponge
Global Volunteer Force
 
Join Date: Apr 2007
Location: Rochester, NY
Send a message via ICQ to sponge Send a message via AIM to sponge Send a message via MSN to sponge Send a message via Yahoo to sponge
Default

Negative. The Doom3 world updates and the framerate are both capped at 60. If the world updates were at 30 as you suggest, rendering at 60 frames would result in every other frame being identical. Thus, both the renderer and the physics are running at 60FPS in Doom3, Quake4, and Prey. This was lowered to 30FPS in ET:QW, but to make up, the renderer can render extra frames.
sponge is offline  
Old 06-19-2007, 04:21 PM   #16
cpt.whistlepants
First Sergeant
 
Join Date: May 2007
Default

Thanks FeaRog, please feed us some more technical info if you get time.
cpt.whistlepants is offline  
Old 06-19-2007, 04:50 PM   #17
renrut
Gunnery Sergeant
 
Join Date: Jun 2007
Location: Manchester, England
Default

Very informative thread, keep it up!
renrut is offline  
Old 06-19-2007, 04:54 PM   #18
dorkus
Banned
 
Join Date: Jun 2007
Location: Allupinyuz, CA
Default

Will this be the same for the final version? Capped at 30?
dorkus is offline  
Old 06-19-2007, 04:59 PM   #19
sponge
Global Volunteer Force
 
Join Date: Apr 2007
Location: Rochester, NY
Send a message via ICQ to sponge Send a message via AIM to sponge Send a message via MSN to sponge Send a message via Yahoo to sponge
Default

The physics will always run at 30. If you are rendering at 30FPS, you may have a weak PC, or need to tweak the cvars to adjust the framerate cap detailed above.

The ET:QW engine while uncapped seems to have a tendency to hang around multiples of 30, although I'm far from 100% sure about this so far. However, there needn't be physics = framerate as you have in D3/Q4/Prey
sponge is offline  
Old 06-19-2007, 05:02 PM   #20
Ashen-Shugar
Commander
 
Join Date: May 2007
Default

make this a sticky please
__________________
To the last, I grapple with thee; From Hell's heart, I stab at thee; For hate's sake, I spit my last breath at thee
Ashen-Shugar is offline  
Old 06-19-2007, 05:11 PM   #21
sponge
Global Volunteer Force
 
Join Date: Apr 2007
Location: Rochester, NY
Send a message via ICQ to sponge Send a message via AIM to sponge Send a message via MSN to sponge Send a message via Yahoo to sponge
Default

This post is linked from the FAQ above, so it's one degree separated from a sticky!

It was a few minutes ago, but someone probably removed it because of that.
sponge is offline  
Old 06-19-2007, 05:15 PM   #22
fungry
Master Chief
 
Join Date: Jun 2007
Default

knowledgeable!!! haha. will rmbr this thread for references should i get key!

or maybe till i get game >_>
fungry is offline  
Old 06-19-2007, 06:58 PM   #23
moonshield
Senior Captain
 
Join Date: May 2007
Location: q3dm6
Default

And what about Input? Just tried to play q3a with 30fps.. It feels like i had to hit a frame exactly when pressing a key.. I couldnt even jump.. Oo
moonshield is offline  
Old 06-19-2007, 07:19 PM   #24
VLM(ike)
Master Chief
 
Join Date: Jun 2007
Default

Great info from the source itself . Let's hope i get a key to try .
__________________
http://www.vegaslimo.si, luxury limousine service.
VLM(ike) is offline  
Old 06-19-2007, 07:27 PM   #25
sponge
Global Volunteer Force
 
Join Date: Apr 2007
Location: Rochester, NY
Send a message via ICQ to sponge Send a message via AIM to sponge Send a message via MSN to sponge Send a message via Yahoo to sponge
Default

Quote:
Originally Posted by moonshield View Post
And what about Input? Just tried to play q3a with 30fps.. It feels like i had to hit a frame exactly when pressing a key.. I couldnt even jump.. Oo
Quake3 actually runs at 20FPS internally by default, 30FPS on most servers nowadays as I understand it.
sponge is offline  
 


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:18 PM.