Sync

Synchronization or Sync is the way that two separate states keep updated in a way that both can see the same data and not cause reference problems.

In Symphony of Empires there are two types of synchronizations:

Lua state
The Lua state is the state used by mods to modify and interact with the world - most of the synchronization is done locally on the server and does not require modders to take care of it, as it is already handled by the Lua API.

Server-Client
In this type of synchronization most of the world state is updated in batches to maximize performance gains. There are two layers, the networking layer and the game data layer.

Networking layer
This layer is taken care of by the UnifiedRender which helps to transmit data using a basic protocol (it's mostly intended as a way to send containers over the internet) over the system's TCP protocol.

Data layer
Most of the data is encapsulated between packets which are not to be confused with TCP packets.