Merge branch 'master' of github.com:jeena/GGS-report

This commit is contained in:
Jonatan Pålsson 2011-05-12 22:11:16 +02:00
commit 3742e1d5b5
2 changed files with 26 additions and 8002 deletions

View file

@ -3219,8 +3219,7 @@ Erlang is not a very popular language for game development, therefore the
interface to different virtual machines which would run the game code. interface to different virtual machines which would run the game code.
This way a game developer can write the game in his favorite language while This way a game developer can write the game in his favorite language while
the server part still is written in Erlang and can benefit from all the the server part still is written in Erlang and can benefit from all the
advantages of the Erlang language. advantages the Erlang language provides.
In this section, a few potential languages are given.
\end_layout \end_layout
\begin_layout Subsection \begin_layout Subsection
@ -3229,20 +3228,21 @@ JavaScript
\begin_layout Standard \begin_layout Standard
JavaScript is a prime GDL candidate for the GGS. JavaScript is a prime GDL candidate for the GGS.
The language is very flexible, a general knowledge of the language is present The language is very flexible, and a large base of developers within the
in the computer science community, furthermore there are virtual machines web community is using this language on the client side within the browser
readily available for JavaScript. and therefore are used to it.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
JavaScript has gained a lot of popularity lately, it is used in large projects JavaScript, as a interpreted script language, has gained a lot of popularity
such as in other fields of computer science lately.
It is used as a server side language in large projects such as
\emph on \emph on
Riak Riak
\emph default \emph default
\begin_inset Foot \begin_inset Foot
status open status collapsed
\begin_layout Plain Layout \begin_layout Plain Layout
\begin_inset Flex URL \begin_inset Flex URL
@ -3260,7 +3260,7 @@ http://wiki.basho.com/An-Introduction-to-Riak.html
\end_inset \end_inset
, or
\emph on \emph on
CouchDB CouchDB
\emph default \emph default
@ -3315,22 +3315,17 @@ https://github.com/languages/
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
Since the GGS is intended to be connected to several different GDL VMs the Apart from that there are virtual machines with bindings to Erlang readily
choice for the first language implemented for the GGS prototype seems not available for JavaScript which are provided by organisations like Mozilla
only to depend on the technical features of the GDL chosen, in this case and companies like Google.
JavaScript. In the end this choice was more or less arbitrary since the GGS is intended
A different, albeit still important non technical feature of JavaScript to be able to run several different GDL VMs, and one had to be the first.
is the familiarity with the language of the members of the GGS development
team.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
The popularity of JavaScript in the programming community, in combination
with the availability of several different JavaScript virtual machines
was an important influence in choosing JavaScript as the main control language
for our GGS prototype.
\begin_inset ERT \begin_inset ERT
status collapsed status open
\begin_layout Plain Layout \begin_layout Plain Layout
@ -5019,7 +5014,7 @@ The VM itself makes it possible for the game developer to program in the
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.
If a method within the game sends data to a player, the data is delivered If a method within the game sends data to a player, the data is delivered
to the player in the correct running game. to the player in the correct game.
The same game token is used to store the game state in the database. The same game token is used to store the game state in the database.
Therefore, no game states can be mixed up. Therefore, no game states can be mixed up.
\end_layout \end_layout
@ -5038,7 +5033,7 @@ 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 VM is uploaded to the GGS before 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
@ -5062,7 +5057,7 @@ Game data from all games on the GGS is stored in the database backend of
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 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, therefore
it has some features specifically tailored for telecoms which are not commonly it has some features specifically tailored for telecoms which are not commonly
found in other databases. found in other databases.
@ -5093,9 +5088,9 @@ key "667766"
\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 purposes of the GGS as well. for the GGS as well.
The fault tolerance and speed of Mnesia are very valuable tools, the fast The fault tolerance and speed of Mnesia are valuable tools, the fast key/value
key/value lookups permit many lookups per second from the database. lookups permit many lookups per second from the database.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -5156,9 +5151,9 @@ 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
name of the namespace required, but a unique key so that the value can name of the namespace required, but an unique key so that the value can
be successfully retrieved or modified later. be successfully retrieved or modified later.
The key is fully decidable by the game developer. The key is decidable by the game developer.
\end_layout \end_layout
@ -5167,8 +5162,8 @@ The interface of the database module is an implementation of the upcoming
W3C Web Storage specification. W3C Web Storage specification.
Web Storage is intended for use in web browsers, providing a persistent Web Storage is intended for use in web browsers, providing a persistent
storage on the local machine for web applications. storage on the local machine for web applications.
The storage can be used to communicate in between browser windows (which The storage can be used to communicate among browser windows (which is
is difficult when using cookies), and to store larger chunks of data difficult when using cookies), and to store larger chunks of data
\begin_inset CommandInset citation \begin_inset CommandInset citation
LatexCommand citet LatexCommand citet
key "webstorage:website" key "webstorage:website"

File diff suppressed because it is too large Load diff