Digital Paint Discussion Board
Paintball 2: The Game => Paintball 2 Discussion => Topic started by: jitspoe on March 27, 2004, 05:33:14 AM
-
I'm trying to make the movement completely independent of the framerate, so I ran a few tests to see how high you jump at different framerates. The results weren't quite what I expected...
10fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos2_10fps.gif)
20fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos2_20fps.gif)
40fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos2_40fps.gif)
80fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos2_80fps.gif)
160fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos2_160fps.gif)
320fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos2_320fps.gif)
If you take a close look, you can actually jump HIGHER at 40fps than you can at 320. Here's some raw data at the peak of the curves:
40fps:
330
336
338
336
330
80fps:
330
332
333
333
332
330
160fps:
322
324
326
328
329
330
331
331
331
331
331
330
329
328
326
324
322
320fps:
316
317
318
319
319
319
319
319
319
319
319
319
318
317
316
So.... you can jump higher at 40fps... technically. That means the ability to land on taller objects at higher framerates must have something to do with the air stepping code, because I can jump onto things at 320fps that I can't at 40fps.
Weird.
-
You realize that just went over most of these peoples heads =)
So technically you cant jump higher at 320fps than you can at 40fps, but yet you still can actually land on top of higher objects at 320 over 40? So its like the matrix? You only think you jump higher, so therefore you do :D
-
Post removed
-
i thought i was the only one that did that
0110100101110100011100110010000001100011011000010110110001101100011001010110010000100000011000100110100101101110011000010111001001111001
-
Out of curiuosity.. why would you be able to jump higher at a lower fps??
-
Just a guess. Maybe because at higher framerates, since you have more frames during your jump, the top end of the jump smooths out more, whereas at 40 it peaks a bit. If you look at the actual numbers Jits posted, they decrease at the peak as framerate goes up. Thats what it looks like to me just by looking at the curves and the numbers. Of course under 40 is lower, but thats probably mostly because it just sucks when you get that low ;) You never want to be under 30fps anyway.
-
loss of precision. Quake2 uses an integer coordinate system. When you convert a float to the closest integer, the more times you do it, the more precision you lose.
Say I'm going from 1 to 2. In one step, if I go from 1, add 1.0, go to 2.0, convert it to an integer: 2. Works fine, but what if I do it in 4 steps? 1, add .25, get 1.25, convert to an integer: 1. Add .25, convert to an integer, still 1. Add .25... you get the idea. That's why at the highest framerate, if you look at the data there:
316
317
318
319
319
319
319
319
319
319
319
319
318
317
316
It never gets aboe 319 because the increments are so low -- not enough to reach the next integer.
Thus it baffles me that you can land higher when the actual hight you reach is lower...
-
Yeah I see what you're saying. I dont know. I wish I never gave up on programming, cuz this excrement is interesting me again. But I dont know any technical details anymore, just basic programing concepts.
-
Turns out it's not the air stepping code. I did some more tests. I put a series of boxes, each 1 map unit lower than the next. I could land on the 60 unit box at 40fps, but at 300, I could barely make the 58 unit box. Well, it's consistent with the graphs. Now I try sand trap. Whoa, totally different data.
40fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos3_40fps.gif)
80fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos3_80fps.gif)
160fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos3_160fps.gif)
320fps:
(http://www.planetquake.com/digitalpaint/images/devel/zpos3_320fps.gif)
What's different? The ground in Sand Trap is at -1056 quake units (-132 map units).
My theory at this point is that the difference is still caused by float to int imprecision. The more frames you have, the more imprecision. Since converting a float to an integer rounds DOWN to the closest integer, if you're ABOVE 0, a higher framerate makes you jump LOWER. However, rounding "down" a negative number (rounds down the absolute value), actually ends up giving you a HIGHER integer value (-10 > -10.1), thus the imprecision lets you jump HIGHER if you're BELOW 0, giving people with higher framerates more imprecision and the advantage.
-
ahhh yea what he said
-
Post removed
-
Make everything above 0 if you can.
Now I’m at a bit of a dilemma. I can fix the bug and make the jump height fairly consistent across different frame rates, but it will likely enrage the high-fps lpbs when they can no longer do things like backdoor pforest.
-
Thats fine Jitspoe.. I am a High-FPS LPB, and would really like to see some of that BS stoped. I dont think the maps were designed for that.. so people shouldent be allowed to do it, but thats me.
-
That would be fine, a high-FPS super LPB already has advantages on some people, this shouldn't be one. Besides, I'm sure you could do the good ol' 2 person one on pforest.
-
im a lpb i think fix the bug. but thats prob cause im not that good of a jumper anyways :D
-
/me 2nds
-
That is a very interesting discovery Jits. I vote that you should fix the bug. Theres just so many reasons for it, from the maps probably werent meant to be played that way to an increase strategy and competitiveness in matches.
-
I say fix it too, you already can jump high enough. I can do alot of jumps on 56k and still do fine. Thus, making the bigger jumps require more of a team effort and add more to the teamplay perspective the game was created on. I feel like, even though clans play as a team. It's more of everyone going their own way, and IF they die, recon back where people are. This should definetely make teamwork a bit more inticing.
-
I wanted to see just how bad this would get, so here it is at over 2000 fps (http://www.planetquake.com/digitalpaint/images/devel/zpos3_2000fps.gif).
-
Post removed
-
This also sucks more server bandwidth right? Meaning people who ping higher, try to send more packets during this, thus causing them to spike a bit while jumping with high fps?
If this is true, then people pinging like 70 and under have a huge jumping advantage than people pinging 100+. Not to mention any higher.
-
"If this is true, then people pinging like 70 and under have a huge jumping advantage than people pinging 100+. Not to mention any higher."
No. Ping and bandwidth are very separate, especially because Q2 uses UDP.
Your computer can fire off as many packets as you want it too, up to the bandwidth of your link. Ping just changes the latency of the reciept by the server.
If Q2 used TCP, then there is flow control imposed on your data, which limits the number of packets in flight. This is not a number of packets persay, as it is a number of bytes. If you send to many packets, you're going to likely overload some router along the path, increase your latency and cause the reliability mechanism to realzie it hasnt gotten an ACK within the expected round trip time. This will double the RTO and effectively half the window size per unit time for each packet that has to be re-transmitted. Therefore latency and throughput are somewhat inversely related in TCP communications.
-
Cal always making the simple man understand.
-
Someone who pings lower mostly means their packets have less delays on its way to the server. The longer a cable is the more delay is added. Any routers or switches in the way add some delay. The server its self adds a bit of delay. You could have a lot of bandwidth and still ping high. This is why satilite connections suck for gaming, cuz there is a huge delay involved in sending a packet to the satelite in space and then coming back down again to the server, then having to go through the whole thing again, more or less.
-
how could anyone even run q2 at 200fps?
how'd you do that jits?
-
Ahh i see, thanks cal! =]
-
Actually the ping and bandwidth are tied together in a way. The client maintains a history of packets sent so it can do proper prediction. If it doesn't get a reply from the server before the history fills up, you start getting phonejacked. So basically you have to have a fast computer, a low ping, AND plenty of bandwidth for super high jumps. I think the low ping is actually more important, because you can drop several packets and still be ok.
Here's a graph that shows the client history, so you can see what I'm talking about (80fps):
(http://www.planetquake.com/digitalpaint/images/devel/zpos_80fps.gif)
-
is that...jump hight?
-
So i was somewhat right. Ownage!
-
And dont ever limit jumping.. the day that happens is the day I never come back =p
I like the arcade-ish, Quake action style of Paintball. The jumps, I reluctantly admit, add to the game more than they detract from it (although the hill launching is a little cheap).
Refer: http://dynamic5.gamespy.com/~digitalpaint/yabb/YaBB.pl?board=general;action=display;num=1041378836;start=5#5
Why dont we poll on this jit?