Original Post — Direct link
almost 4 years ago - /u/Scriptacus - Direct link

Originally posted by DirtyProjector

What’s strange though, is that the game IS registering the hit. When I get no regs it hits the model (visual cue) and I hear the tick noise of it hitting (audio cue) so I’m confused why it was not actually registering the hit. You’d think there would be no feedback from the game that the tracer hit if the issue was that the projectile missed the object.

The way it works is that you send an input to the game to "fire". That input is processed on both your client, and the server (also known as prediction. The processing on the server is slightly delayed due to ping, which is where lag compensation comes in, but that's another topic)

The client runs all of the same logic that the server runs for your position, the angle you fired at, projectile velocity, enemy location, etc... and determines that you hit your target. The client then plays blood effects, hit sounds, etc... Meanwhile, the server is running the same logic with the same parameters, and it's expected that it will get the same result. Except with this bug, one of the variables used by the server and the client for the calculations was different, meaning the server was getting a different result, leading to no-regs. In APEX (and a lot of other games) certain parts of a hit are client side, (blood, audio) and certain parts are server side (crosshair "X" and damage numbers). You'll notice that the X and damage numbers are always slightly delayed, depending on your ping.

As for lag compensation; when the server receives the "fire" command from the client, it also receives a timestamp that lets it determine where all of the relevant entities were on the clients machine at the time they fired. The server then "rewinds" time for all of the entities to match the clients view at that moment, and simulates all of the projectiles, movement, angles, etc... to determine if the client scored a hit.

almost 4 years ago - /u/tangentiallogic - Direct link

Originally posted by EmperorClydeFrog

Thanks for taking the time to do an ELI5, I know a lot of people on this sub have been asking for some kind of explanation, just out of curiousty-sake!

Pff, if that was an ELI5 all you people here must be have been the smartest 5 year old kids ever, and I've been here long enough that I don't buy that :P