diff --git a/report.lyx b/report.lyx index 47a8ee2..8411cd5 100644 --- a/report.lyx +++ b/report.lyx @@ -3308,25 +3308,59 @@ name "sec:Communication-with-external" \end_layout \begin_layout Standard -A game launched on the GGS is run with help of a virtual machine. +A game launched on the GGS is run within a virtual machine. For each programming language supported, there is a virtual machine that - interprets it and an interface for communication between the GGS, the game - and the players playing the game. - Callbacks written in Erlang are registered to the vm for the interface + interprets the game. + Furthermore an interface for communication between the GGS, the game and + the players playing the game must be present. +\end_layout + +\begin_layout Standard +The reason for the GGS requiring a communication channel between the game + VM and Erlang is in part because the GGS makes heavy use of callbacks. + Callbacks written in Erlang are registered to the VM for the interface to work. It is only with the help of the interface that the game developer can access - the game state and share data between players. - The interface provides access to three objects called World, Player and - Localstorage. + the game state and send messages between players. + The interface provides access to three objects called +\emph on +world +\emph default +, +\emph on +player +\emph default + and +\emph on +localstorage +\emph default +. The game state is safely stored in a database and retrieved for manipulation - by a call for the World object. - Interaction with the players is done the same way using the Player object + by a call for the world object. + Interaction with the players is done the same way using the player object instead. - The Localstorage is a convenient way to store globals and other variables + The localstorage is a convenient way to store globals and other variables seperated from the game state. Unique id:s called gametokens are generated for hosted games so that they are not mixed up. +\end_layout + +\begin_layout Standard +\begin_inset Note Note +status open + +\begin_layout Plain Layout +TODO: Go in to more detail about how the world, player and localstorage + objects are implemented. + Also discuss localstorage and how it derives from the webstorage standard + in detail. + This is a great point on how we try to follow standards. +\end_layout + +\end_inset + + \end_layout \begin_layout Standard