Jump to content

Question For Ask The Devs? "did Han Shoot First?"


2 replies to this topic

#1 NomadicCanuck

    Member

  • PipPipPip
  • The 1 Percent
  • 53 posts

Posted 14 May 2015 - 11:35 AM

Hi all,
Lately I've noticed some behaviour when coming down to the final few shots. My lasers vs. inbound ballistics and it seems like the ballistics always "hit first". I suspect there's an explanation about latency and when hits are calculated.

So my question is, how is latency handled for hit detection and when, exactly, are laser hits applied?

For example,
Lets assume pilot 1 has a 20ms ping, and pilot 2 has a 1500ms ping, Pilot 3 has 8 hitpoints left
Time 0:00:00 Pilot 1 fires LL (at Pilot 3), Pilot 2 fires AC20 (at Pilot 1, distance=270)
Time 0:00:20 Server receives Pilot 1's laser data...
Time 0:01:00 Pilot 1 fires another LL (at pilot 3)
Time 0:01:20 Server receives Pilot 1's laser data...
Time 0:01:50 Server receives Pilot 2's ac/20 data

In a perfect world...
Pilot 1 would be dead at 0:00:25, (270 / 650 * 60ms)
Pilot 3 would have taken 3.75 damage (25/60ms * 9 damage) with 4.25 remaining

However, due to the time line above Pilot 1 thinks he's shot twice and hit for at least 9+ damage killing Pilot 3. Pilot 2 doesn't get any feedback until after this all occurs and pilot 3... is he dead or does he have 4.25ms remaining?
How long does the server wait before calculating the whole mess?

Does the server bundle up all the events for a certain period, sort them into some queue and play them back? or does it apply them as soon as they are received and try to fix it up later? Do ballistics hit first to save on the processing time of calculating all those laser ticks?

All of this because I *think* I shot my lasers before my enemy pulled the trigger on his AC/5... I died and didn't seem to have the damage recorded although I am sure I gave him a full alpha laser to the red center...

Question two:
How does the server handle latency when there is a great delta between players ping times.
If there is a 20ms player and a 300ms player, does the server come up with an average ping time and apply mech positions at that average? Do matches with closely related ping times have more accurate hit detection?

And... the rambling post comes to an end.
Regards,
Nomadiccanuck

#2 Wintersdark

    Member

  • PipPipPipPipPipPipPipPipPipPipPip
  • 13,375 posts
  • Google+: Link
  • Twitter: Link
  • LocationCalgary, AB

Posted 14 May 2015 - 11:43 AM

Server authentication with timestamps via HSR. So, ping has little to nothing to do with it.

The server always plays back everything on it's own clock, applying the players ping to it - that's what Host State Rewind is.

So, yeah, it ends up being fair but not necessarily what either player "sees". And, if pings are large enough, this can result in some things that look like OMG HAX! You see that a lot with players moving into cover and getting shot after they're in cover (because the firing player did hit them, from his perspective).

That's also the big stumbling block for collision, and why it's so difficult. It's one thing for shots to be half a second offset, it's another for a mech that (for you) you never touched to knock you down.

#3 NomadicCanuck

    Member

  • PipPipPip
  • The 1 Percent
  • 53 posts

Posted 14 May 2015 - 11:57 AM

Being hit behind cover is one thing; But rewinding a death is another.

Does the server have to wait until all clients have 'reported in' before a death can be registered? If you have someone with a mega-ping, would this mean that you could be dead a second or two before it is actually displayed?

Is there an ultimate cut-off of HSR time before the server finally goes, "yeah, I think we've got enough data to confirm you're dead"?

That would explain a lot of whinging I hear...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users