Does anyone have a simple summary of how the netcode works in MWO? I have heard conflicting things in matches, and scenarios where landing a full laser burn on a light mech leads to barely any ticks of damage has me wondering what is the case.
Is it client side, where any hit shown to the client is sent to the server?
Is it server side positioning where we need to "lead" our shots? Or delay our shots behind a moving target, such that in either case a "miss" on client side could lead to a Hit on server side?
Any help is appreciated!
Summary Of Netcode?
Started by Phr00t_, Apr 14 2021 05:50 PM
6 replies to this topic
#1
Posted 14 April 2021 - 05:50 PM
#2
Posted 14 April 2021 - 07:49 PM
The hit detection is server side, but has some counter-lag mechanics to try and calculate where you are aiming in relation to when you shot. AKA: If you shot at a target and hit it on your screen, the server will try to take into account your lag and (in theory) give you a hit if you could hit the target at that time.
It's not a perfect thing. Unstable ping can cause very unpredictable results with HSR (Host State Rewind). It likes as steady of a ping as possible, even if it is high ping.
Some people "always hit what they are shooting at", while others experience "I hit it on my screen, but it's not dealing the damage to my target". I myself have times where solid hits wreck targets, and other times where I can pelt everything I have into that (for me) visually stationary target and deal almost no damage to it despite a couple volleys landing. More often than not, I find that HSR does it's job and usually works as intended. Just... sometimes it has off moments...
It's not a perfect thing. Unstable ping can cause very unpredictable results with HSR (Host State Rewind). It likes as steady of a ping as possible, even if it is high ping.
Some people "always hit what they are shooting at", while others experience "I hit it on my screen, but it's not dealing the damage to my target". I myself have times where solid hits wreck targets, and other times where I can pelt everything I have into that (for me) visually stationary target and deal almost no damage to it despite a couple volleys landing. More often than not, I find that HSR does it's job and usually works as intended. Just... sometimes it has off moments...
#4
Posted 14 April 2021 - 11:03 PM
The only think I would add is that long ago, these counter-lag mechanics were not properly in place - you had to lead targets with lasers. This is no longer the case, but I suspect that this history is partly (but not totally) responsible for people's propensity to blame problems on the game's netcode.
#5
Posted 14 April 2021 - 11:19 PM
HSR is honestly pretty amazing tech, but it too falls apart if you have a lot of packet loss.
To be fair, everything falls apart if you have a lot of packet loss.
To be fair, everything falls apart if you have a lot of packet loss.
#6
Posted 16 April 2021 - 08:44 PM
As already described, in the early Beta days, there was no lag compensation so everyone relied on lasers because you could adjust your lead on the target mid-fire until your cursor turned red. (All shots are server authoritative. Everything of consequence always has been.) Spiders were notoriously good at evading damage. Little buggers. Then PGI implemented HSR which will adjust for your ping and the ping of other players, up to a point (think it's 500 ms per player, so up to a max of 1 second difference?) Anyway, what it does basically is when your computer says "I shot this weapon at this angle," it checks your ping and rewinds all player movements back to that time on the server, then calculates whether or not your shot hit. Things like velocity and gravity are calculated too. The reason this works for player movement as well is because that's all server authoritative too*. So if you have a 50 ping (that should be 25 ms delay one-way), it takes your computer 25 ms to get player positions. You fire at it. Then that takes 25 ms to get to the server. The server takes those delays into account and calculates whether or not it should count. That's why a stable ping is more important than a high ping, (to a point). With high ping, you can have a scenario where you duck behind cover, then suddenly your torso explodes because you were shot while in the open by an enemy but that determination was delayed due to lag and the damage is applied once it's calculated.
*Mech movement is server authoritative too, but your local client moves your mech forward without first waiting for confirmation from the server. If it did, you'd have noticeable stuttering with moving at all. The server still has to confirm your move was valid so sometimes you'll see your mech jerk or jump around the map or crash into walls. This is because of lost or delayed packets and what happened on your local machine didn't get confirmed on the server and it forced-corrected your mech's location. Colliding with other mechs will generate odd behavior more than anything because your client does not see the mech in your way but on the server it is, then it has to relay that data back to both players. As long as ping is low, it's not bad. Pings of <150 ms are perfectly playable. 250+ is still playable but it could impact your experience. And again, I think HSR gives up after 500 ms and cannot rewind match data any further than that. For the real technical details, use Ash's link above. I'm going off of memory.
*Mech movement is server authoritative too, but your local client moves your mech forward without first waiting for confirmation from the server. If it did, you'd have noticeable stuttering with moving at all. The server still has to confirm your move was valid so sometimes you'll see your mech jerk or jump around the map or crash into walls. This is because of lost or delayed packets and what happened on your local machine didn't get confirmed on the server and it forced-corrected your mech's location. Colliding with other mechs will generate odd behavior more than anything because your client does not see the mech in your way but on the server it is, then it has to relay that data back to both players. As long as ping is low, it's not bad. Pings of <150 ms are perfectly playable. 250+ is still playable but it could impact your experience. And again, I think HSR gives up after 500 ms and cannot rewind match data any further than that. For the real technical details, use Ash's link above. I'm going off of memory.
Edited by TheCaptainJZ, 16 April 2021 - 08:45 PM.
#7
Posted 18 April 2021 - 10:20 PM
Which led to such fun things as Raven stacking... Speaking of memories.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users





















