clearifications
This commit is contained in:
parent
f4ae989ab3
commit
93052126e2
1 changed files with 38 additions and 69 deletions
107
report.lyx
107
report.lyx
|
@ -4939,30 +4939,29 @@ The game virtual machine module
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
This module holds the game logic of a game and is responsible for the VM
|
This module is responsible for the VM associated with each game.
|
||||||
associated with each game.
|
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The game VM contains the state of the VM and a table token associated with
|
The game VM contains a connection to the GDL VM and a table token associated
|
||||||
a running game.
|
with a running game.
|
||||||
The game VM is started by the table module.
|
The game VM is started by the table module during its initialisation.
|
||||||
The table module hands over a token used for identification to the game
|
The table module hands over a token used for identification to the game
|
||||||
VM during initialization.
|
VM during the initialization.
|
||||||
During initialization a new VM instance and various objects associated
|
During the initialization a new GDL VM instance and various objects associated
|
||||||
to the VM instance are created.
|
to the GDL VM instance are created.
|
||||||
Callbacks to Erlang are registered into the VM and the source code of a
|
Callbacks to Erlang are registered into the GDL VM and the source code
|
||||||
game is loaded into the VM, finally the game is ready for startup.
|
of a game is loaded into the GDL VM, finally the game is ready for startup.
|
||||||
The only means for a game to communicate with the VM is through usage of
|
The only means for a game to communicate with the GGS is through usage
|
||||||
a provided interface.
|
of a provided interface.
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The VM itself makes it possible for the game developer to program in the
|
The GDL VM itself makes it possible for the game developer to program in
|
||||||
programming language covered by the VM.
|
the programming language covered by the GDL VM.
|
||||||
In future releases, more game VMs will be added to support more programming
|
In future releases, more GDL VMs will be added to support more programming
|
||||||
languages.
|
languages.
|
||||||
Since the game VM keeps track of the correct table, the game developer
|
Since the game VM keeps track of the correct table, the game developer
|
||||||
does not need to take this into consideration when programming a game.
|
does not need to take this into consideration when programming a game.
|
||||||
|
@ -4986,7 +4985,8 @@ reference "sec:Communication-with-the-GDL-VM"
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The code which is run in the VM is uploaded to the GGS prior to each game.
|
The code which is run in the GDL VM is uploaded to the GGS prior to each
|
||||||
|
game.
|
||||||
Allowing the clients to upload code allows clients to run any game.
|
Allowing the clients to upload code allows clients to run any game.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -5008,12 +5008,18 @@ Game data from all games on the GGS is stored in the database backend of
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
In the GGS prototype the database module is using a database management
|
In the GGS prototype the database module is using a database management
|
||||||
system called Mnesia.
|
system called Mnesia .
|
||||||
Mnesia ships with the standard Erlang distribution and is a key-value store
|
Mnesia ships with the standard Erlang distribution and is a key-value store
|
||||||
type of database.
|
type of database.
|
||||||
Mnesia is designed to handle the stress of telecoms systems, therefore
|
Mnesia is designed to handle the stress of telecoms systems
|
||||||
it has some features specifically tailored for telecoms which are not commonly
|
\begin_inset CommandInset citation
|
||||||
found in other databases.
|
LatexCommand citet
|
||||||
|
key "667766"
|
||||||
|
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
, therefore it has some features specifically tailored for telecoms which
|
||||||
|
are not commonly found in other databases.
|
||||||
Key features of the Mnesia database are:
|
Key features of the Mnesia database are:
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -5029,16 +5035,6 @@ Distribution of the database system
|
||||||
Fault tolerance
|
Fault tolerance
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
|
||||||
\begin_inset CommandInset citation
|
|
||||||
LatexCommand citet
|
|
||||||
key "667766"
|
|
||||||
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The features of Mnesia originally intended for telecoms prove very useful
|
The features of Mnesia originally intended for telecoms prove very useful
|
||||||
for the GGS as well.
|
for the GGS as well.
|
||||||
|
@ -5049,8 +5045,8 @@ The features of Mnesia originally intended for telecoms prove very useful
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
Game data will not be lost when a game is stopped or has gone down for any
|
Game data will not be lost when a game is stopped or has gone down for any
|
||||||
reason.
|
reason.
|
||||||
This makes it possible to continue a game just before the failure without
|
This makes it possible to continue a game from the point just before the
|
||||||
having to start the game from the beginning.
|
failure without having to restart the complete game.
|
||||||
|
|
||||||
\begin_inset ERT
|
\begin_inset ERT
|
||||||
status open
|
status open
|
||||||
|
@ -5070,7 +5066,7 @@ textbf{Mnesia}}{Database server used in the GGS}
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Standard
|
\begin_layout Standard
|
||||||
The GGS stores the game state in the distributed Mnesia database, from which
|
The GGS stores the game state in the distributed database Mnesia, from which
|
||||||
the state can be restored in the event of a crash.
|
the state can be restored in the event of a crash.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
@ -5083,7 +5079,7 @@ world
|
||||||
\noun default
|
\noun default
|
||||||
and
|
and
|
||||||
\noun on
|
\noun on
|
||||||
Localstorage
|
localStorage
|
||||||
\noun default
|
\noun default
|
||||||
.
|
.
|
||||||
The
|
The
|
||||||
|
@ -5094,13 +5090,13 @@ World
|
||||||
This sort of game data may change during the runtime of the game.
|
This sort of game data may change during the runtime of the game.
|
||||||
The
|
The
|
||||||
\noun on
|
\noun on
|
||||||
Localstorage
|
localStorage
|
||||||
\noun default
|
\noun default
|
||||||
contains data independent of the game state.
|
contains data independent of the game state.
|
||||||
Game resources, constants and global variables are all examples of data
|
Game resources, constants and global variables are all examples of data
|
||||||
that reside within the
|
that reside within the
|
||||||
\noun on
|
\noun on
|
||||||
Localstorage
|
localStorage
|
||||||
\noun default
|
\noun default
|
||||||
.
|
.
|
||||||
To store a value within the database, not only is the table token and the
|
To store a value within the database, not only is the table token and the
|
||||||
|
@ -5208,8 +5204,12 @@ tt GGS.sendCommandToAll(command, args)}
|
||||||
|
|
||||||
\emph default
|
\emph default
|
||||||
.
|
.
|
||||||
The localStorage is a convenient way to store global data and other variables
|
The
|
||||||
separated from the game state.
|
\noun on
|
||||||
|
localStorage
|
||||||
|
\noun default
|
||||||
|
is a convenient way to store global data and other variables separated
|
||||||
|
from the game state.
|
||||||
Unique ids called game tokens are generated for hosted games so that they
|
Unique ids called game tokens are generated for hosted games so that they
|
||||||
are not mixed up.
|
are not mixed up.
|
||||||
\begin_inset ERT
|
\begin_inset ERT
|
||||||
|
@ -5755,37 +5755,6 @@ TODO: Go in to more detail about how the world, player and localstorage
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\begin_layout Standard
|
|
||||||
\begin_inset Note Note
|
|
||||||
status open
|
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
|
||||||
My idea here is that we describe the Erlang-js (which failed, but nontheless),
|
|
||||||
v8, UUID and other external communication.
|
|
||||||
We shouldn't describe sockets here though..
|
|
||||||
or..
|
|
||||||
maybe?
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\begin_layout Plain Layout
|
|
||||||
Also discuss how we allow GDLs to communicate with Erlang, this is
|
|
||||||
\begin_inset Quotes eld
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
external
|
|
||||||
\begin_inset Quotes erd
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
to thre GDL.
|
|
||||||
Discuss the GGS world object (there is a reference to this secxtion for
|
|
||||||
that purpose)
|
|
||||||
\end_layout
|
|
||||||
|
|
||||||
\end_inset
|
|
||||||
|
|
||||||
|
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Section
|
\begin_layout Section
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue