game-state-sync
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "game-state-sync", | ||
"description": "Tools for keeping clients in sync with server game state", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -11,6 +11,5 @@ # game-state-sync | ||
The `unreliable` variants can deal with data sent from one side doesn't reach the other side, or arrived in the wrong order (think UDP), | ||
while the `reliable` variants **require** that each sent piece of data from server reaches the client in the right order and vice versa (think TCP). | ||
The `unreliable` variants can deal with data sent from one side doesn't reach the other side, or arrived in the wrong order (think UDP), while the `reliable` variants **require** that each sent piece of data from server reaches the client in the right order and vice versa (think TCP). | ||
The `Diff`-suffixed variants sends differential updates as opposed to the whole state on every publish. | ||
The `Diff`-suffixed variants sends differential updates as opposed to the whole state on every state publish. The `Server` part takes a single function `diffStates(newState, oldState)` that returns the difference between two states, while the `Client` part takes a single function `applyDiff(oldState, diff)` which returns the new state by using the old state and the difference returned from `diffStates`. Essentially, `applyDiff(oldState, diffStates(newState, oldState))` should equal `newState`. | ||
@@ -17,0 +16,0 @@ ### Same process |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23396
102