injx's Framerate-Dependent Physics Calculator

Scroll down and read the documentation for more info. This calculator will probably only work in Internet Explorer, as it needs VBScript.


g_gravity
com_maxfps
jump velocity

cl_maxpackets (optional)





Jump Height
Height Above Standard

Min Upstream Bandwidth Required


Most Jump Height MaxFPS

Top 4 Recommended MaxFPS Settings
Best --> 1.
2.
3.
4.
(almost always the default of 800)
FPS
units/sec (270 for Quake)

Packets/sec





Units
%

Kbps (requires MaxPackets to be input)


> Use MaxPackets >

(near to your current com_maxfps)
> Use MaxPackets >
> Use MaxPackets >
> Use MaxPackets >
> Use MaxPackets >



- injx


Documentation
The calculator above illustrates how framerate can affect player physics in Quake 3. It takes the input framerate and calculates how high a jump will achieve using this framerate, based on the g_gravity setting. It also shows how much higher this jump is than a 'standard' jump, expressed as a percentage for easy comparison.

By 'standard' jump, I mean the theoretical jump that would occur if framrate had no effect on the height of a jump - or if you selected a framerate that has no resultant effect on the physics.

You can use the calculator above to see how any valid framerate affects your jump height. It also gives the max jump height framerate to be used with the input gravity setting and recommended framerates based on the framerate you input. The 4 recommended framerate settings are listed in order of jump height.

As cl_maxpackets is also linked to your framerate, the calculator also displays the best MaxPackets settings to use with each framerate. You should choose the largest value your connection can handle from those listed. For more information on how MaxFPS affects MaxPackets, click here.



So how does the framerate affect player physics?

Basically, your position is calculated every time a frame is rendered by Quake. So if you are using a higher framerate, your position will be calcualted more times per second.

In Quake 3, the standard gravitational field strength is 800 units/second2. Also, as there is no air in Quake, there is no air resistance to affect your movement. When you press your jump button - whether you are stood still, running, whatever - you are instantly given a vertical velocity of 270 units/second upwards. This initial velocity is fixed and never changes. So, when you jump there are 2 factors involved: 1) Your 270 units/second of upwards velocity and 2) The 800 units/second2 of deceleration caused by gravity.

As Quake has to calculate your position for every frame, it calculates the effect that gravity is having on you every frame. However, every time it calculates your new position, direction and speed, it has to remember that the Quake world is discrete. It is all based around a very fine grid matrix where the smallest division is called a unit. Therefore, when it is calcualting players' positions and velocities etc., they cannot be half-way between one unit and another unit. They have to snap exactly to an exact position, to a particular unit. There is no in-between. But the biggest effect is due to the velocity also being rounded to an integer, in order to save bandwidth, which gives large framerate-dependent rounding errors.

This means there is a rounding error in the results of Quake's calculations and it is these rounding errors which causes the differences in movement - most noticeably when jumping.

Indeed, many players say they feel like they are 'floating' when they first try one of the magic framerates that has a large effect, such as 125fps.

However there is another side to the story. Just as some framerates can appear to reduce the effect of gravity, others can actually appear to increase the effect of gravity, which can serve as a disadvantage through loss of height.



FAQs


Q. Why does the MaxFPS I enter change to a different value when I press 'Calculate'?

A. Quake does not accept just any old value for com_maxfps. The only valid values it uses are those which are equal to 1000/x, where x is an integer. For example, 125 is a valid value because it is equal to 1000/8. If you enter a value which is not valid, Quake will automatically use the next valid value up from what you have set. For example, the default value of com_maxfps, 85, is not a valid value, therefore Quake will use ~90 (1000/11) even though your com_maxfps will remain on the 85 setting. Also this explains the effect that you may have seen in Quake yourself - if you reduce your com_maxfps from 125 to 120 you will still get 125fps on the fps meter. This calculator takes this into account and will adjust any invalid MaxFPS values in the same way Quake does.


Q. What if my FPS is not consistently at the same value?

A. If your PC can not achieve your MaxFPS value constantly and your framerate fluctuates over a range of values then your height will vary depending on what your framerate is doing during a jump. There is no way to calculate this unless you can record the framerate at each frame. You will get a variety of rounding errors which will add together. With a constant framerate, each of these errors is the same. But with a fluctuating framerate they will all be different. Therefore your jump height could be anything. You might get them cancelling each other out to result in your jumps being the same as a 'standard' jump. You may get a small increase in height, you may get a small decrease. There is little you can do to calculate it. As a general point, I can tell you that whatever result a fluctuating framerate has on your height, it is unlikely to be as great as one resulting from a fixed framerate.


- injx