GameDesign: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
imported>StephenIerodiaconou No edit summary |
||
| Line 16: | Line 16: | ||
</pre> |
</pre> |
||
So let's define the reply to each message. |
So let's define the reply to each message. First, let's clarify that the best way of modelling this system is using finite automates, (a finite state machine) where, based on the input, we change the state we are currently in and produce an output. |
||
<pre> |
<pre> |
||
| Line 211: | Line 211: | ||
To configure Marauroa to work with a JDBC source we need to modify the configuration of the JDBC Connection. |
To configure Marauroa to work with a JDBC source we need to modify the configuration of the JDBC Connection. |
||
So open the configuration file marauroad.ini ''(or |
So open the configuration file '''marauroad.ini''' ''(or whatever you choose to name it)'' and edit the next fields |
||
<pre> |
<pre> |
||
marauroa_DATABASE=JDBCPlayerDatabase |
marauroa_DATABASE=JDBCPlayerDatabase |
||
| Line 221: | Line 221: | ||
</pre> |
</pre> |
||
jdbc_class |
* ''jdbc_class'': This field tells the engine what Driver to use for database access. Please refer to your software manual to see the multiple options. |
||
| ⚫ | |||
| ⚫ | |||
* ''jdbc_user'': This is the username for the database |
|||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
| ⚫ | |||
<pre> |
<pre> |
||
create database marauroa; |
create database marauroa; |
||
| Line 237: | Line 235: | ||
</pre> |
</pre> |
||
The rest of code is handled by the server itself, and will create the tables if they don't |
The rest of code is handled by the server itself, and it will create the tables if they don't exist. |
||
=PlayerContainer Explained= |
=PlayerContainer Explained= |
||
PlayerContainer is the data structure that contains all of the |
PlayerContainer is the data structure that contains all of the information about the players while the game is running. |
||
It consists of a list of RuntimePlayerEntry objects |
It consists of a list of RuntimePlayerEntry objects and is heavily linked with the PlayerDatabase, so we can hide the complexity to GameManager. By making PlayerDatabase hidden by PlayerContainer we achieve the illusion that managing the runtime behavior we modify automatically the permanent one. |
||
RuntimePlayerEntry is the structure that contains the information of the player while it is online. <br>RuntimePlayerEntry contains: |
RuntimePlayerEntry is the structure that contains the information of the player while it is online. <br>RuntimePlayerEntry contains: |
||