Talk:Client-side prediction

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Antilag[edit]

Please don't mix up antilag and csp. They might be related, but not necessarily. Marked as dubious for now.


—Preceding unsigned comment added by 193.219.93.218 (talk) 07:28, 25 November 2008 (UTC)[reply]

Future of CSP[edit]

The last sentence: "As technology evolves, network latencies are getting lower. When/If latencies get so low as to be unnoticeable, client side prediction will not serve a purpose anymore." is misleading.

Assuming that the foundations of physics don't crumble, information cannot be transmitted faster than the speed of light. When you calculate how long it takes for light to get around the Earth and then factor in human reaction speed you'll quickly see that client side prediction is going to be required for twitch based games forever.

Even if in the far future we do find a way to transmit information faster than light, unless it's completely instantaneous we'll still need client side prediction for inter-planetary games that we'll likely want to play.


Agreed. One could easily say "As processing power evolves, processor speed increases to infinity" but that doesn't necessarily make it true (don't mention quantum, guys :P) --Gigitrix (talk) 20:26, 13 June 2008 (UTC)[reply]

Normal human visual reflexes kick in within 150-300 milliseconds. Smooth computer animation requires 24-30 frames per second to seem like it's all blended together into continuous movement. That's a range of 30-40 milliseconds. Anything that happens in less than 30 milliseconds will happen so fast that the player won't notice a difference. The screen will display the same picture, no matter how low the ping is, when it's lower than 30 milliseconds. The [speed of light] is 299,792,458 meters per second. The mean circumference of the Earth is 40,041.47 km, or about 40 million meters, so the distance from one side of the planet to the other is about 20 million meters. Light could travel that distance about 15 times in 1 second. That gives us a ping of about 66 milliseconds. Remember that figure I mentioned for human reflexes? Not much will happen in 66 milliseconds, and with good reflexes, it would still be in the range of normal reflex response time.

Of course, this doesn't mean that CSP will be worthless in the future, but it won't be so important if you have a good connection. The muzzle velocity of an M16 is 975 meters per second. In 1/15th of a second, a bullet from an M16 might travel 62 meters, or about 203 feet. At that range, if both players fire at the same time (in real time) they can kill each other simultaneously when they get the packets from the other player. Below that range, they'll be fairly easy targets, and most people won't die instantly from a gunshot wound. Again, they can simply kill each other if they both fire at the right time. With a ping of 66 milliseconds, everything can be resolved after it happens. NorsemanII (talk) 09:16, 22 October 2009 (UTC)[reply]

Misleading[edit]

I think that maybe the whole article is a little misleading or maybe my understanding of client-side prediction is wrong. I belive that client-side prediction not only applies to FPS and/or the player him-/herself. If other players movements and actions is extrapolated isn't that also client-side prediction? --192.16.134.69 (talk) 06:15, 1 August 2008 (UTC)[reply]

  1. It isn't limited to the FPS genre. I reworded the first sentence because it was entirely misleading.
  2. CSP typically refers to extrapolation based on the local player's input that assumes the server will respond similarly. --Mrwojo (talk) 05:32, 19 December 2008 (UTC)[reply]
(Sorry to reply to myself.) I found few unique sources that support either definition, so #2 above may be incorrect. --Mrwojo (talk) 01:31, 20 December 2008 (UTC)[reply]

Duke Nukem 3D[edit]

I can't find ANY reference that Duke Nukem 3D had client-side prediction before Quake, or even had it at all. The only references that I can find seem to be references directly from the information posted in this article. If no one has a good reference or can at least show it's factual, I'm going to pull it out. Does anyone have any info? Nairebis (talk) 14:53, 23 March 2014 (UTC)[reply]

Nope, I'm not saying for sure it isn't true, but every reputable source lists Quake as the first. That change saying DN3D instead of Quake has been there for 10 years at this point with no source found. I've made an edit to remove it. If someone has the time they could go through the Duke Nukem 3D source code and actually check if there's any client-side prediction there. Nition1 (talk) 02:14, 20 September 2016 (UTC)[reply]

Look first at the Build Engine source code: [1] In KENBUILD.ZIP, there is SRC.ZIP. In there is BUILD2.TXT, where I (whoops - gave away my identity ;-) describe 'KLAG-0 Technology'. This is an exact description of client-side prediction. (I just wasn't familiar with the term at the time.) In Duke Nukem 3D's GAME.C, you'll find 2 functions: fakedomovethings() and fakedomovethingscorrect(). They handle client side prediction exactly as described in BUILD2.TXT. I will add that Duke Nukem 3D supported prediction for both player orientation AND player position. Also, it was one of the last big features to make it into the game before the original shareware release which occurred on January 29, 1996. I remember working with Todd Replogle over the phone to help him implement the lag-free network play in his code during the Christmas 1995 break - needless to say, he and the rest of the guys in the 3D Realms office were all excited to finally have modem play 'fixed'. ;-) Awesoken (talk) 12:43, 20 September 2016 (UTC)[reply]

So sorry to have been the one that removed DN3D as being first Ken, I never saw your comment here until just now. Thankfully someone else did eventually come back and correct it, and I even ended up coming back myself and adding references to those two functions you mention a couple of years ago, still without having seen your comment here where you'd already pointed to them. At least this confirms I referenced the right functions!
Thanks for all your great work. I hope the record stays firmly corrected from now on. Nition1 (talk) 22:51, 21 November 2022 (UTC)[reply]

References