Jump to content

- - - - -

How Does Hsr Work "under The Hood?"


1 reply to this topic

#1 Felio

    Member

  • PipPipPipPipPipPipPipPip
  • Philanthropist
  • Philanthropist
  • 1,721 posts

Posted 04 September 2013 - 04:28 PM

And is it hit-state rewind or host-state rewind? I've seen both.

I get that the idea is that if someone is playing and sees their shot hit, but the simulation on the server and the target see it miss, the server is supposed to apply the damage anyway.

The server has to somehow make a distinction between a near miss and something that "should have" hit.

Does it get this distinction from the shooter's client? Does it say, "Hey, we got a hit over here! Did you see that?" and the servers says, "No, but it looks to be within reason, so I'll allow it. Gratz bro!"

Or is the server carefully tracking ping, where people are aiming, where and when targets are moving, and when people are firing, then mixing all of that data into some kind of soup and watching for shots that meet certain parameters?

I'm thinking it is probably the latter, because 1) The former could be susceptible to hacks, asking "Did you see that shot?" after every shot. And 2) It seems more likely that problems would crop up with the latter, and people have reported problems.

#2 Syllogy

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,698 posts
  • LocationStrana Mechty

Posted 04 September 2013 - 04:57 PM

http://mwomercs.com/...rewind-phase-1/

Quote

In a client server game, lag compensation is all about improving a player's experience when they have a higher than normal ping to the server. When working correctly, lag compensation techniques should make it feel like your ping is not having a negative effect on your gaming experience – like your ping is not even there. In this phase of the feature, we are specifically focusing on weapons of the trace fire variety. This includes the laser, flamer and machine gun. You can expect similar improvements for your favourite ballistic weapons in the future.

So what is this change really all about? Well, unless you have a perfect internet connection, you may have noticed when firing your lasers that you often have to lead your shots ahead of your target; the higher your ping, the further ahead you would have to lead – very annoying, we know. This feature addresses exactly this problem. A picture is worth a thousand words, so here are two pictures:

What you see when you are lagging

Posted Image

What the server sees when you are lagging

Posted Image

From your perspective, it looks like you should be hitting that Jenner dead on, but from the perspective of the server it looks like you are completely missing! Don't worry, things are not hopeless. The server can do something smart and simple to ensure you land the hit you are expecting.

If the server kept track of all the past positions of the Jenner, the server could then use your ping to figure out exactly where the Jenner was on your screen when you shot. Lo and behold the blue box. It is lined up exactly with what you see on your screen. We sometimes call this blue box the rewound position of the Jenner. It's only a box in this picture for simplicity, but in reality all of the Jenner's geometry is actually moved back to this position. Now that the server knows where the Jenner should be, it can move the Jenner back to this spot, shoot your laser, see if you hit, then put the Jenner back to its original spot. Bam, your laser hits just like you expect.

Wait, does that mean a malicious hacker player can now teleport me to random places and hit me? No, the reason is that the rewound position is only always a valid server position – just in the past. The firing player does nothing to control this position, it is inferred by the server based on their ping. For that reason, if your ping bounces all over the place, you might notice that it is just as hard to hit targets with the lag compensation as it is without it, because the blue box will be constantly bouncing back and forth with your ping.

That does it for this lag compensation explanation. If you have question or concerns, feel free to post on the forums.

Edited by Syllogy, 04 September 2013 - 04:57 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users