Networking mode: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
>TheFrz
m (woops)
>Illviljan
(Removed full explanation, it was too out dated and didn't add anything particular that the symptoms/causes/mitigation didn't address..)
Line 1: Line 1:
[[File:Lockstep.png|right|thumb]]
[[File:Lockstep.png|right|thumb|350px]]


Path of Exile has three '''networking modes''', that each use a different way to keep the game client and server synchronized. Players can choose which one to use in the main menu game settings.
Path of Exile and other online games uses various '''networking modes''' to make sure that the player and server stays as synchronized as possible even though the distance between the player and server may be large.  


==Modes==
=Modes=
===Lockstep===
In Path of Exile there are three networking modes, that each use a different way to keep the game client and server synchronized. Players can choose which one to use in the main menu game settings.
 
==Auto==
This mode automatically switches between predictive and lockstep mode, depending on the player's latency. The threshold ping is around 150 milliseconds.<ref name="threshold" />.
 
==Deterministic lockstep==
The deterministic lockstep mode perfectly synchronizes the client with the server, and will stop potential unfair deaths caused by [[#Desync|desync]]. Bear in mind that this mode may cause stuttering, depending on the player's latency, like in strategy games such as Starcraft and MOBAs like Dota 2.
The deterministic lockstep mode perfectly synchronizes the client with the server, and will stop potential unfair deaths caused by [[#Desync|desync]]. Bear in mind that this mode may cause stuttering, depending on the player's latency, like in strategy games such as Starcraft and MOBAs like Dota 2.


When the player performs an action, it is sent to the server for confirmation before it is shown to the player. In this mode everything will stay completely in sync, including all monsters. There is a delay equal to the player's latency to the server. If they suffer from an internet lag spike, everything stops moving until the player receive more data. This mode is recommended for players with low latency to the server.
When the player performs an action, it is sent to the server for confirmation before it is shown to the player. In this mode everything will stay completely in sync, including all monsters. There is a delay equal to the player's latency to the server. If they suffer from an internet lag spike, everything stops moving until the player receive more data. This mode is recommended for players with low latency to the server.


===Predictive===
==Client predictive==
In predictive mode, actions appear to occur immediately but can get out of sync under some circumstances. While things appear to happen immediately, the actual actions are still delayed by the player's latency behind the scenes. This mode may cause desync, but is probably the best choice for player with more than 100ms of latency to the server.
In predictive mode, actions appear to occur immediately but can get out of sync under some circumstances. While things appear to happen immediately, the actual actions are still delayed by the player's latency behind the scenes. This mode may cause desync, but is probably the best choice for player with more than 100ms of latency to the server.


===Auto===
===Desync===
This mode automatically switches between predictive and lockstep mode, depending on the player's latency. The threshold ping is around 150ms<ref name="threshold" />.
Desync is a situation where the game client on a player's computer and the PoE server is out of sync with each other, specifically with the position of players and monsters. This is because information does not travel instantly from the client to the server over the internet. To not allow cheating the server's decisions take precedence over the client.<ref name="desync_manifesto" /> This means a heavily desynced player may actually be standing next to monsters when they appear to be safe from the player's point of view. This is different from network lag (high latency), and desynced clients can still have low ping.  
 
==Desync==
{{cleanup|reason=Source material needs to be incorporated into the article, not posted verbatim.}}
 
Desync is a situation where the game client on a player's computer and the PoE server is out of sync with each other, specifically with the position of players and monsters. Obviously the server's decisions take precedence over the client, so a heavily desynced player may actually be standing next to monsters when they appear to be safe from the player's point of view. This is different from network lag (high latency), and desynced clients can still have low ping.
 
Players can only desync when they use the predictive networking mode. With lockstep mode, there is no desync.


===Symptoms===
====Symptoms====
The following are possible symptoms of desync:
The following are possible symptoms of desync:


Line 31: Line 29:
* Taking damage from invisible effects. Generally damage is much better synced than positions or visual effects.
* Taking damage from invisible effects. Generally damage is much better synced than positions or visual effects.


===Causes===
====Causes====
* Stunning. If your client does not realize you were stunned, following actions, especially movement, may not actually take place on the server.
* Stunning. If your client does not realize you were stunned, following actions, especially movement, may not actually take place on the server.
* Line of sight. If you use a skill that requires line of sight, you may have line of sight on the client but not on the server. This may cause a skill to fail to execute (e.g. {{sl|Leap Slam}}) since the targeted location is not legal, or even cause your character to move forwards in order to establish line of sight ({{sl|Barrage}} being one of the most severe examples).
* Line of sight. If you use a skill that requires line of sight, you may have line of sight on the client but not on the server. This may cause a skill to fail to execute (e.g. {{sl|Leap Slam}}) since the targeted location is not legal, or even cause your character to move forwards in order to establish line of sight ({{sl|Barrage}} being one of the most severe examples).


===Mitigation===
====Mitigation====
* Switching to [[#Lockstep|lockstep mode]], granted you have a low enough latency to the server (lower than 100 ms).
* Switching to [[#Lockstep|lockstep mode]], granted you have a low enough latency to the server (lower than 100 ms).
* The [[Chat Console|chat console]] command <kbd>/oos</kbd> will manually synchronize you with the server. Some players bind this command to a macro using software like [http://www.autohotkey.com autohotkey]. Using a macro that sends /oos for you when you press one button (with AHK or some other tool) is legal and not against GGG's rules.<ref name="Autohotkey"/> <kbd>/oos</kbd> has a cooldown of 10 seconds.
* The [[Chat Console|chat console]] command <kbd>/oos</kbd> will manually synchronize you with the server. Some players bind this command to a macro using software like [http://www.autohotkey.com autohotkey]. Using a macro that sends /oos for you when you press one button (with AHK or some other tool) is legal and not against GGG's rules.<ref name="Autohotkey"/> <kbd>/oos</kbd> has a cooldown of 10 seconds.
Line 44: Line 42:
* For melee characters, a long weapon range, notably from [[Master of the Arena]], will help ensure that enemies you are trying to attack are actually in range. {{sl|Multistrike}}'s automatic targeting can help ensure you are actually attacking enemies.
* For melee characters, a long weapon range, notably from [[Master of the Arena]], will help ensure that enemies you are trying to attack are actually in range. {{sl|Multistrike}}'s automatic targeting can help ensure you are actually attacking enemies.


===Full explanation===
=Version history=
[http://www.pathofexile.com/forum/view-thread/175363 This forum thread] explains desync in full detail. Notable sections are quoted below (bolded text in original):
{{VersionHistoryTable}}
 
{{VersionHistoryRow|2.0.0}}
:Let me begin by saying that '''absolutely every game that is played online has to deal with desync.''' Every single game without exception. This is because that information does not travel over the internet instantaneously. Data traveling between two different machines, it could be a client and a server or even two clients directly connected to each other, takes a typically very small amount of time. [...] Half a second may not sound like a lot but in a game like PoE where dozens of things are happening on screen at once and you need to react within a fraction of a second, a whole half second can quickly be the difference between life and death.
* Lockstep was introduced to the game.
 
|}
:To combat desyncs, '''some games choose to use a game architecture that rigidly forces every game state to stay synchronized at all times.''' Obviously this has the benefit that the different game stats on the various different machines are never out of sync with each other. This has the downside that any action you want to take (pressing a key or clicking your mouse) has to travel to the game server and be confirmed and then that server confirmation needs to travel back to you before you're actually allowed to take that action. If you have very low latency, then you won't notice this delay between you pressing a button and the corresponding action occurring on screen. If it takes half a second between when you press a button and when your character takes an action then you're definitely going to notice. '''This''' sort of synchronization scheme '''works very well for slower games where not a lot is happening at once''' and the player doesn't need to make split second reactions (strategy games and MMOs for example).


:'''In games like PoE''' where the action is happening very quickly and the player needs instant feedback, '''enforcing''' this '''rigid synchronization is impossible. The combat would be unresponsive and the game would simply be unplayable.''' What you need a scheme that allows the player's actions to occur instantaneous on the player's computer and then synchronization occurs after the fact behind the scenes. This is exactly what most games do to varying degrees, including games like Diablo 3. Basically any online game that requires instantaneous player feedback. The result is that these games are always at least slightly out of sync with the server but they give the player instantaneous feedback and feel very fluid. There's no way to avoid that. The goal becomes to cover it up so players don't notice it and to hopefully keep it from becoming a big issue.
=References=
 
:[...]
 
:The issue really comes up when you have dozens of these actions all occurring at once. Your character is moving and attacking, a whole bunch of enemies are moving and attacking. All of this information needs to go back and forth between the server and the client. '''Both the server and the client are running simultaneously game state simulations and the goal is to keep these two game states as synchronized as possible''' even though both game states only have a fraction of the information they need, the information they do have can be hundreds of milliseconds out of date, and the information is constantly changing. [...] This is where more pronounced desyncs occur (what players typically refer to when they talk about desyncs). When one side is lacking a piece of information and continues to run it's version of the game state simulation using out of date and incorrect data.
 
:Desync wouldn't be a big issue if you could synchronize the entire game state on both sides a few times per second. Bandwidth isn't free, though. In fact, it's quite expensive. '''If GGG tried to synchronize the client and server even just once every second across all the clients currently playing it would overwhelm their available bandwidth by orders of magnitude.''' [...]
 
:'''Desyncs are much more likely to occur in situations where many things are going on at once''', when there are many monsters are screen, if they're moving quickly, if they're in a confined space, when you use skills that cause you to move and attack very quickly (whirling blades for example).
 
:So what can be done to help alleviate desync? As I already said, synchronizing the entire game state regularly is too expensive no matter how big the game or rich the company.
 
==See also==
* [https://www.pathofexile.com/forum/view-thread/710359 Development Manifesto - Desync]
 
==References==
{{reflist|refs=
{{reflist|refs=
<ref name="threshold">{{cite web|author=Negativefrags|date=April 10, 2015|title=Re-write of netcode with A4 to reduce dsync?!|url=https://www.reddit.com/r/pathofexile/comments/324u94/rewrite_of_netcode_with_a4_to_reduce_dsync/cq7x4qr/|publisher=Reddit|accessdate=July 5, 2017}}</ref>
<ref name="threshold">{{cite web|author=Negativefrags|date=April 10, 2015|title=Re-write of netcode with A4 to reduce dsync?!|url=https://www.reddit.com/r/pathofexile/comments/324u94/rewrite_of_netcode_with_a4_to_reduce_dsync/cq7x4qr/|publisher=Reddit|accessdate=July 5, 2017}}</ref>
<ref name="Autohotkey">https://www.pathofexile.com/forum/view-thread/475864/page/1</ref>
<ref name="Autohotkey">{{cite web|author=Jess_GGG|date=Jul 24, 2013|title=Autohotkey|url=https://www.pathofexile.com/forum/view-thread/475864/page/1#p4198034|publisher=Path of Exile Forums|accessdate=July 5, 2017}}</ref>
<ref name="desync_manifesto">{{cite web|author=Chris_GGG|date=Apr 15, 2014|title=Client-server Action Synchronisation|url=https://www.pathofexile.com/forum/view-thread/889669|publisher=Path of Exile Forums|accessdate=July 5, 2017}}</ref>
 
}}
}}


[[Category:Path of Exile]]
[[Category:Path of Exile]]

Revision as of 19:59, 12 July 2017

Path of Exile and other online games uses various networking modes to make sure that the player and server stays as synchronized as possible even though the distance between the player and server may be large.

Modes

In Path of Exile there are three networking modes, that each use a different way to keep the game client and server synchronized. Players can choose which one to use in the main menu game settings.

Auto

This mode automatically switches between predictive and lockstep mode, depending on the player's latency. The threshold ping is around 150 milliseconds.[1].

Deterministic lockstep

The deterministic lockstep mode perfectly synchronizes the client with the server, and will stop potential unfair deaths caused by desync. Bear in mind that this mode may cause stuttering, depending on the player's latency, like in strategy games such as Starcraft and MOBAs like Dota 2.

When the player performs an action, it is sent to the server for confirmation before it is shown to the player. In this mode everything will stay completely in sync, including all monsters. There is a delay equal to the player's latency to the server. If they suffer from an internet lag spike, everything stops moving until the player receive more data. This mode is recommended for players with low latency to the server.

Client predictive

In predictive mode, actions appear to occur immediately but can get out of sync under some circumstances. While things appear to happen immediately, the actual actions are still delayed by the player's latency behind the scenes. This mode may cause desync, but is probably the best choice for player with more than 100ms of latency to the server.

Desync

Desync is a situation where the game client on a player's computer and the PoE server is out of sync with each other, specifically with the position of players and monsters. This is because information does not travel instantly from the client to the server over the internet. To not allow cheating the server's decisions take precedence over the client.[2] This means a heavily desynced player may actually be standing next to monsters when they appear to be safe from the player's point of view. This is different from network lag (high latency), and desynced clients can still have low ping.

Symptoms

The following are possible symptoms of desync:

  • "Rubberbanding": When the game resyncs players may be "teleported" back to their actual position. Depending on how severely they were desynced, this may be up to several rooms away.
  • A monster standing still, neither attacking nor taking damage. This means the monster is actually in a different position.
  • Area of effect skills may appear to affect monster outside the area of effect. This means the monster is actually inside the area of effect on the server.
  • Items always drop from the actual position of the monster, which may be far from the apparent position.
  • Taking damage from invisible effects. Generally damage is much better synced than positions or visual effects.

Causes

  • Stunning. If your client does not realize you were stunned, following actions, especially movement, may not actually take place on the server.
  • Line of sight. If you use a skill that requires line of sight, you may have line of sight on the client but not on the server. This may cause a skill to fail to execute (e.g. Leap Slam) since the targeted location is not legal, or even cause your character to move forwards in order to establish line of sight (Module Error: Too many skills found with q_where = skill.active_skill_name="Barrage". Please choose only one of the following ids:
    ExileBarrageStrDexMasterAlly - Deals 50% less Damage, Fires Projectiles sequentially, Fires 12 additional Projectiles, 40% less Attack Speed (page)
    ExileBarrageStrDexMasterAlly2 - Deals 50% less Damage, Fires Projectiles sequentially, Fires 45 additional Projectiles, 75% less Attack Speed (page)
    being one of the most severe examples).

Mitigation

  • Switching to lockstep mode, granted you have a low enough latency to the server (lower than 100 ms).
  • The chat console command /oos will manually synchronize you with the server. Some players bind this command to a macro using software like autohotkey. Using a macro that sends /oos for you when you press one button (with AHK or some other tool) is legal and not against GGG's rules.[3] /oos has a cooldown of 10 seconds.
  • Attacking from place (default Shift) will prevent you from moving due to desync. This is especially useful for ranged skills.
  • Try not to use movement skills near corners or doorways, as you may not have line of sight on the server.
  • Avoid running through enemy packs or tight openings.
  • The Quartz FlaskQuartz FlaskLasts 6.00 Seconds
    Consumes 30 of 60 Charges on use
    Phasing
    +10% chance to Suppress Spell Damage
    Requires Level 27Right click to drink. Can only hold charges while in belt. Refills as you kill monsters.
    allows you to pass through enemies, which can prevent rubberbanding caused by your path being blocked by enemies on the server.
  • For melee characters, a long weapon range, notably from Master of the Arena, will help ensure that enemies you are trying to attack are actually in range. Module Error: No skills found with q_where = skill.active_skill_name="Multistrike"'s automatic targeting can help ensure you are actually attacking enemies.

Version history

Version Changes
2.0.0
  • Lockstep was introduced to the game.

References

  1. Negativefrags (April 10, 2015). "Re-write of netcode with A4 to reduce dsync?!". Reddit. Retrieved July 5, 2017.
  2. Chris_GGG (Apr 15, 2014). "Client-server Action Synchronisation". Path of Exile Forums. Retrieved July 5, 2017.
  3. Jess_GGG (Jul 24, 2013). "Autohotkey". Path of Exile Forums. Retrieved July 5, 2017.