Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 12 and Version 13 of code/doc/Network


Ignore:
Timestamp:
May 24, 2018, 3:17:55 PM (7 years ago)
Author:
varyo
Comment:

FS18: The group who went through the Network Engine to debug decided to upload a small overview of the internals for those in the future who dare to try to fix it :)

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/Network

    v12 v13  
    3434 * network::Host::isServer(): return true/false (whether we are in server/client mode)
    3535 * other functions (not really meant to be used outside the network engine)
     36
     37== Overview Internal Dataflow through the Network Engine ('18) ==
     38[[Image(network_overview.png, 78%)]]
     39A 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.