Desync and why it's fixable

Typical Scrotie pontificating explanation (optional)
Desync is a situation where the gamestate according to the client differs from the gamestate according to the server. In other words, on the server a monster may be in one location, but on the client it appears in a different location; alternatively, on the server a monster may be dead, but on the client the monster appears to be alive.

Why does desync occur in PoE? Sadly, it's something which is very fixable.

The Path of Exile client is highly responsive to player input. When you left-click to move somewhere, or right-click to use a skill, the client version of the gamestate is effected immediately. Because it takes a small amount of time (often 1/10 of a second) to transmit data across the internet, the server gamestate is slightly behind when it comes to player input; it receives and executes the play command after the client receives and executes the command.

You can verify this by launching Path of Exile, going outside of town, disconnecting your network, and trying to use some skills. You'll notice that the skills animate just fine, even though they deal no damage.

However, monster movement and monster skill use is done entirely server-side. Once the server decides how monsters are going to move, attack, and use skills, it then sends that data over the internet to the client. Thus, as far as monster movement and skill use goes, the server gamestate is slightly ahead of the client; it receives and executes monster actions before the client receives and animates them.

You can verify this by launching Path of Exile, going outside of town, finding some monsters without drawing their attention, then disconnecting your network and seeing how they behave. You'll notice that the monsters stand perfectly still and do nothing, rather than pursuing you as usual.

Because the client gamestate is a simulation, and the server gamestate is the true gamestate, what this means is that, on the client, monster reactions are sluggish and actually represent what monsters were doing about 1/5 of a second ago. For example, imagine a doorway which doesn't look blocked on the client, but will become blocked in 1/5 of a second. When your character tries to move through, it happens on the client, but by the time the command gets to the server, the door is blocked, and you don't actually get to move through. The client is now desynced, and will eventually receive a resync (rubberband/teleport) that undoes the character moving through the blocked doorway.

Almost all desync in PoE is caused by position discrepancies between the client and the server.

The way to fix this isn't rocket science; GGG should incorporate monster AI and decision-making on the client, rather than having to wait for server response. If it does this properly, monster movement and skill use on the client can be just as reactive as player movement and skill use, causing the client gamestate to be consistently ahead of the server, for both player and monster positions. This would greatly reduce the amount of sync issues.

Changing the current combat math system wouldn't be either wise nor necessary, because those calculations can be requested by the client when skills — monster or player — are activated, and in most cases the numbers can be received before the skill actually connects. The emphasis isn't on client-side damage calculation, but on accurate client-side prediction of monster movement and skill use, so that the client can begin animations without waiting on the server.

From a security perspective, the one risk associated with this is that the server would have to provide the client with a seed at the beginning of each instance; this seed would be used to ensure that random behavior by monsters is the same on both the client and the server (for example, if Dominus has a 20% chance to use the Touch of God, then the client could use the seed to know the server's answer in advance). A hack could capture this seed, and attempt to use it to predict enemy behaviors before they occur (so, in essence, a hack that tells you when Dominus is about to use Touch of God, so you can clear the area faster). A hack using a similar method already exists, commonly called maphack, which uses the terrain-generation seed sent by the server to fill out the mini-map without the need to explore it. Foiling a predictive hack may be difficult, but I feel that the benefit of such a hack is minimal for the malicious user, and that the overall gain in desync reduction outweighs the cost in hackability. (On the other hand, using a seed for terrain is lazy, and GGG should change that system to one which feeds users map data bit by bit over time, making maphack impossible.)

Putting the client consistently ahead of the server (chronologically) isn't a full removal of all desync; there would still be some desync caused by variable latency (not how much latency you have so much as how much your latency fluctuates). However, it would help fix a lot of the issues that we currently have, for markedly improved performance.
Due to widespread confusion as to what I'm actually suggesting here (perhaps due to the original explanation), I made two flowcharts. For the TL;DR just look for the bold text.

Before (current system):

Client simulation renders ________ after player input:
  • Your skill/movement animations immediately
  • Monster skill/movement animations a full ping
  • Other players' skill/movement animations a full ping (half theirs, half yours)
  • Damage calculation a full ping (but hopefully before your skills actually connect)
Server gamestate renders ________ after player input:
  • Your skill/movement animations a half ping
  • Monster skill/movement animations a half ping
  • Other players' skill/movement animations a half ping
  • Damage calculation a half ping

After (my suggestion):

Client simulation renders ________ after player input:
  • Your skill/movement animations immediately
  • Monster skill/movement animations immediately
  • Other players' skill/movement animations a full ping (half theirs, half yours)
  • Damage calculation a full ping (but hopefully before your/monster skills actually connect)
Server gamestate renders ________ after player input:
  • Your skill/movement animations a half ping
  • Monster skill/movement animations a half ping
  • Other players' skill/movement animations a half ping
  • Damage calculation a half ping
When Stephen Colbert was killed by HYDRA's Project Insight in 2014, the comedy world lost a hero. Since his life model decoy isn't up to the task, please do not mistake my performance as political discussion. I'm just doing what Steve would have wanted.
Last edited by ScrotieMcB on Nov 29, 2013, 8:47:42 PM
Just logged in the reiterate that no desync dosent mean hackers will go crazy

Because cheating already regularly in PoE
"
Just logged in the reiterate that no desync dosent mean hackers will go crazy
The game's design is actually pretty security-conscious, and the number of hacks are minimal compared to what easily could be with a less security-conscious design. Of course, there are still holes in that defense, but it's actually devilishly hard to make a PoE bot, and very few things which can outright be hacked. It's a good thing that the server doesn't trust the client very much.

Also, fixing the maphack issue will, in turn, hurt botting; almost all bots use "maphack" (rendering terrain using the seed provided) for navigation control.
When Stephen Colbert was killed by HYDRA's Project Insight in 2014, the comedy world lost a hero. Since his life model decoy isn't up to the task, please do not mistake my performance as political discussion. I'm just doing what Steve would have wanted.
Last edited by ScrotieMcB on Nov 27, 2013, 4:54:32 AM
could someone explain the use and purpose of the /oos command and why can't it be executed automatically / more frequently?
"
Just logged in the reiterate that no desync dosent mean hackers will go crazy

Because cheating already regularly in PoE
RMT is not cheating to GGG. RMT = players willing to spend money on the game.
I'm more annoyed by desync QQ threads than I am by actual in-game desync.

"
RMT is not cheating to GGG. RMT = players willing to spend money on the game.


ROFL

You are saying RMT is the same thing as the microtransactions to GGG.

There's no way, at all, that RMT is not cheating. Because it is and always has been.
Scrotie, whats your opinion on if desync (fixable or not) is a matter of "too late" at this time? As in, not fixable due to how the system is currently made and would require a re-scripting of the game from the ground up?
And if you close your eyes, does it feel like your exalt almost hit this time~
"
I'm more annoyed by desync QQ threads than I am by actual in-game desync.
[Removed by Admin]
Last edited by Simon_GGG on Dec 1, 2013, 7:39:33 AM
"
Dynuel wrote:
could someone explain the use and purpose of the /oos command and why can't it be executed automatically / more frequently?

The /oos command sends a request to the server to send position data on the surroundings to the client. The client then rubberbands everything back to where the server said it was. If it automatically triggered every now and again, the result would be more bandwidth used and the maximum amount of desynch being decreased to the interval between data being sent.
"
"
I'm more annoyed by desync QQ threads than I am by actual in-game desync.
[Removed by Admin]


How about you practice what you preach there [Removed by Admin]
Man_Mode
Last edited by Simon_GGG on Dec 6, 2013, 8:20:09 AM

Report Forum Post

Report Account:

Report Type

Additional Info