• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Alternatives to lag correction.

Colt .45 killer

Grizzled Veteran
May 19, 2006
3,987
775
'Ello all.

Well I was discussing lag correction on another forum, and was making some theorizations about alternate systems and hybrid systems.

Long story short I got on the subject of lag correcting the bullets.


How would that work?

Why thank you for asking, I was hoping you would!

Upon firing your weapon in game the data would all get nicely packed up and sent to the server along with some kind of an internal time stamp. Upon arrival at the server, instead of spawning that bullet right in front of you as it would with a freshly fired munition as it does now, it would correct its starting position for the lag delay. ( numerically acquired by that time stamp, or by other methods ). First it would calculate where your bullet would be at firing time + lag ammount of flying time, and verify that by that point it wouldent have hit anything. Thus meaning if you fire your weapon at a wall with sufficient lag, the bullets will hit that wall, not spawn on the other side. If the bullet hits something in the period 'before it spawns' then it is not spawned and all is fine. If not, then the bullet starts is spawned at the place where it would be if there wer no lag between you and the server.

But, what benefits would all this extra mathy type stuff give? And what are the negatives?


Well put simply, this would alleviate almost all of the leading problems the game has now. One caveat to that being ones where you are in CQB and the delay before the message gets to the server is enough for the enemy player to step out of your line of fire.

So above all 'short distances' of say under 20M this would allow players to consistently lead a moving target, no matter their lag, no matter their ping. As it is now, leading for range is extemely sensitive to the server you play on, get used to it on one, and you are useless on another server.

Cons? Well there is some extra calculation involved in doing this.


What exactly would this mean for bullet spawning locations?

Well, suppose your lag is 150ms. one millisecond is .001 of a second, so this means that your connection to the server has a .15 of a second lag. If your weapon of choice at that point was a K98K firing bullet with a muzzle velocity of 760M/S that would mean that 'in real life' your bullet would have flown 114 meters before it even leaves the barrel of your gun in game. This would correct it so that .15 of a second after firing, your bullet WOULD be 114 meters down range.

Also, as a second example say you play on that server all the time, then for some reason have to play on another server ( your first one was empty ). Suppose your ping on this server is either 70 or 120. Without writing all of the math again this means that your bullets would be 53.2 and 91.2 meters behind their real life counterparts.

Suppose on the first of these servers you are a crack shot with your rifle, and are very good at hitting running targets. If the runner you are trying to hit is running 2m/s ( slower than HOS run speed ) and the runner is moving perpendicular to your position. Without even bothering to get to the trigonometry here, he will move .14, .24, and .3 of a M at pings 70, 120, and 150. Meaning a perfect perpendicular shot that would hit middle torso on any of those respective pings would for the most part be a miss at any of the other pings.


Your thoughts on the practicality of this?
 
*Makes a post requiring technical knowledge and applied thought*

*Wonders why no one responds*

:p

lol

Anyway, this would be VERY nice to have. You don't know how many times i aim a little forward of my target and everytime i miss, no matter how many times i try, my ping is a bit of a dancer, and gets from 100 to 150 (even 200 sometimes :( ) in the same game. It's hard to find the right space to leave (also while calculating the enemy path and spees, all in a second when they exit smoke or around the corner)

Server needs to do a lot more work, both CPU and Network traffic would multiply exponentially by the number of players\bullets shot. Go figure what would mean on a 64 player server, with many mgs\smgs... receive, calculate, update, send back to all clients the results... for every single shot made??? That will made ping getting back in account imo, so we practically have an overloaded server unable to handle all those extra connection in time.

On CPU it would weight, but maybe not so much to not justify it. After all, it would be all server processed, the clients just get the results, shouldn't be too heavy imo.

But, i'm not IC tech or anything, so this are just my 2 cents.
 
Upvote 0
This method would require the server to record all data regarding player locations (remember, it's not just "A was here for 10 seconds, it's A@xyz11:00:111, A@xyz11:00:112, etc.), then hold onto them for few moments (maybe a second or little more), and every time someone shoots, retrieve the relevant data then do the hit calculation.

Servers are overloaded now (hence 64 player servers getting extra 100 ping upon entering). This would kill it.
 
Last edited:
Upvote 0
First it would calculate where your bullet would be at firing time + lag ammount of flying time, and verify that by that point it wouldent have hit anything.
This is kind of like saying "we'll get a bunch of hydrogen, and then after we've set up a stable fusion reaction...". :) That verify step is the complicated part, and if you can do that, you don't really to fuss over projectile virtual locations.

However, the general bent of your idea is roughly similar, in broad sketches, to how the Source engine does its latency compensation. It's a robust system, but as Gaizokubanou says, when you're throwing projectiles into the mix, the memory and performance costs just explode.
 
Upvote 0
Actually, I deliberatly left out keeping track of the players postions, because that means lag correcting the players locations. My suggestion was JUST to lag correct the bullets.


Please don't read beyond what I've written. I realize there are still cases there where bullets can miss that should have hit, however this was a minimal addition to the game that would improve shooting, especially with varying pings.
 
Upvote 0