| 39 | A Synchronisable is a class, which is going to be synced with the server. A Synchronisable contains several variables (A ship would have its position and speed as synchronised variables). All of the Classes registered as Synchronisable with its variables are collected by GamestateClient, and are packed in a Gamestate. A Gamestate is basically a list of all Synchronisables. The Gamestate is then compressed and sent by ClientConnection as a packet to the server. GamestateManager also receives new Gamestates from the server, which gets decompressed, unpacked and sent to the client game. This process syncs all Synchronisables to the server. |