Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

game-state-sync

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

game-state-sync - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc