Difference between revisions of "QW physics ground"

From QWiki
*>Sss
(New page: placeholder)
 
*>Sss
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
placeholder
+
Previous part [http://wiki.quakeworld.nu/QW_physics_air]
 +
 
 +
Acceleration on ground
 +
 
 +
Here we have friction f.
 +
 
 +
f = 4 in TDM and 6 in TF.
 +
 
 +
[[Image:Addspeed ground.png]]
 +
 
 +
Theoretical part omitted.
 +
 
 +
Results.
 +
 
 +
Ultimately correct start.
 +
Start moving without turning (cos(gamma) = 1).
 +
At one frame before  reaching v_max (reached speed is v1 = v_max * (1-a*T)/(1-f*T))
 +
start turning: cos(gamma_best) = [(1 - a * T)/ (1 - f * T)] * V_max / v.
 +
 
 +
speed v1 is reached just in few frames so actually can start turning from the beginng.
 +
You will not loose too much time
 +
 
 +
 
 +
Ultimate reachable ground speed is v_ultimate = v_max * sqrt((a / f) * [(2 - a * T) / (2 - f * T)])
 +
 
 +
cos(gamma) dexreases to [(1 - a * T)/ (1 - f * T)] * sqrt((a / f) * [(2 - a * T) / (2 - f * T)]) =
 +
= 0.592, gamma = 53.7 degrees in TDM.
 +
 
 +
The bigger speed the less acceleration.
 +
At some point it is easier to accelerate in air than on ground.
 +
So unless you are jumping over very wide ditch maximal speed to which
 +
it make sense to accelerate on ground is
 +
v_reasonable = sqrt((V_max*V_max*aT*(2-aT) - 30^2)/(fT(2-fT)))
 +
 
 +
Ultimate and reasonable ground speed:
 +
<pre>
 +
---------------------------------------------------------------------------------------------------------
 +
| type | v_max | ultimate ground speed | reasonable ground speed |
 +
| | |-------------------------------|-------------------------------|
 +
| | | 72fps | 77fps | 72fps | 77fps |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| tdm player | 320 | 494.9 | 495.7 | 486.5 | 486.7 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| scout | 450 | 572.4 | 573.0 | 567.5 | 567.8 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| sniper | 300 | 381.6 | 382.0 | 374.2 | 374.1 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| soldier | 240 | 305.3 | 305.6 | 296.0 | 295.6 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| demoman | 280 | 356.2 | 356.6 | 348.2 | 348.0 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| medic | 320 | 407.0 | 407.5 | 400.1 | 400.1 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| hwguy | 230 | 292.6 | 292.9 | 282.8 | 282.4 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| pyro | 300 | 381.6 | 382.0 | 374.2 | 374.1 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| spy | 300 | 381.6 | 382.0 | 374.2 | 374.1 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| engineer | 300 | 381.6 | 382.0 | 374.2 | 374.1 |
 +
|-----------------------------------------------------------------------|-------------------------------|
 +
| civilian | 240 | 305.3 | 305.6 | 296.0 | 295.6 |
 +
---------------------------------------------------------------------------------------------------------
 +
</pre>
 +
 
 +
 
 +
Next part (moving in water and other liquid) [http://wiki.quakeworld.nu/QW_physics_water]

Latest revision as of 15:59, 19 August 2010

Previous part [1]

Acceleration on ground

Here we have friction f.

f = 4 in TDM and 6 in TF.

Addspeed ground.png

Theoretical part omitted.

Results.

Ultimately correct start. Start moving without turning (cos(gamma) = 1). At one frame before reaching v_max (reached speed is v1 = v_max * (1-a*T)/(1-f*T)) start turning: cos(gamma_best) = [(1 - a * T)/ (1 - f * T)] * V_max / v.

speed v1 is reached just in few frames so actually can start turning from the beginng. You will not loose too much time


Ultimate reachable ground speed is v_ultimate = v_max * sqrt((a / f) * [(2 - a * T) / (2 - f * T)])

cos(gamma) dexreases to [(1 - a * T)/ (1 - f * T)] * sqrt((a / f) * [(2 - a * T) / (2 - f * T)]) = = 0.592, gamma = 53.7 degrees in TDM.

The bigger speed the less acceleration. At some point it is easier to accelerate in air than on ground. So unless you are jumping over very wide ditch maximal speed to which it make sense to accelerate on ground is v_reasonable = sqrt((V_max*V_max*aT*(2-aT) - 30^2)/(fT(2-fT)))

Ultimate and reasonable ground speed:

---------------------------------------------------------------------------------------------------------
|	type		|	v_max	|	ultimate ground speed	|	reasonable ground speed	|
|			|		|-------------------------------|-------------------------------|
|			|		|	72fps	|	77fps	|	72fps	|	77fps	|
|-----------------------------------------------------------------------|-------------------------------|
|	tdm player	|	320	|	494.9	|	495.7	|	486.5	|	486.7	|
|-----------------------------------------------------------------------|-------------------------------|
|	scout		|	450	|	572.4	|	573.0	|	567.5	|	567.8	|
|-----------------------------------------------------------------------|-------------------------------|
|	sniper		|	300	|	381.6	|	382.0	|	374.2	|	374.1	|
|-----------------------------------------------------------------------|-------------------------------|
|	soldier		|	240	|	305.3	|	305.6	|	296.0	|	295.6	|
|-----------------------------------------------------------------------|-------------------------------|
|	demoman		|	280	|	356.2	|	356.6	|	348.2	|	348.0	|
|-----------------------------------------------------------------------|-------------------------------|
|	medic		|	320	|	407.0	|	407.5	|	400.1	|	400.1	|
|-----------------------------------------------------------------------|-------------------------------|
|	hwguy		|	230	|	292.6	|	292.9	|	282.8	|	282.4	|
|-----------------------------------------------------------------------|-------------------------------|
|	pyro		|	300	|	381.6	|	382.0	|	374.2	|	374.1	|
|-----------------------------------------------------------------------|-------------------------------|
|	spy		|	300	|	381.6	|	382.0	|	374.2	|	374.1	|
|-----------------------------------------------------------------------|-------------------------------|
|	engineer	|	300	|	381.6	|	382.0	|	374.2	|	374.1	|
|-----------------------------------------------------------------------|-------------------------------|
|	civilian	|	240	|	305.3	|	305.6	|	296.0	|	295.6	|
---------------------------------------------------------------------------------------------------------
 


Next part (moving in water and other liquid) [2]