InitialStepsWithMarauroa: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
OK, you have successfully compiled Marauroa and are wondering what to do next? |
OK, you have successfully compiled Marauroa and are wondering what to do next? |
||
<pre> |
|||
BUILD SUCCESSFUL |
BUILD SUCCESSFUL |
||
Total time: 3 seconds |
Total time: 3 seconds |
||
</pre> |
|||
Nice, isn't it? |
Nice, isn't it? |
||
| Line 9: | Line 10: | ||
If you are none of the above it is possible you are looking for http://arianne.sourceforge.net instead. |
If you are none of the above it is possible you are looking for http://arianne.sourceforge.net instead. |
||
=Configuration= |
|||
Once we have built Arianne the next step is to setup the configuration file. |
Once we have built Arianne the next step is to setup the configuration file. |
||
Each game must have a configuration file that will configure the server to run that particular game. Here is an example: |
Each game must have a configuration file that will configure the server to run that particular game. Here is an example: |
||
<pre> |
|||
<verbatim> |
|||
# Please don't remove. Needed for test cases. |
# Please don't remove. Needed for test cases. |
||
test_ATestString=ATestString |
test_ATestString=ATestString |
||
| Line 60: | Line 61: | ||
server_stats_directory=~/public_html |
server_stats_directory=~/public_html |
||
server_logs_directory=~/.marauroa |
server_logs_directory=~/.marauroa |
||
</ |
</pre> |
||
Let look at each section individually. |
Let look at each section individually. <br> |
||
==Database== |
|||
Our first item is *marauroa_DATABASE*, this attribute sets the type of database that you will use: |
Our first item is *marauroa_DATABASE*, this attribute sets the type of database that you will use: |
||
* |
* MemoryPlayerDatabase, this type of database is prebuilt in memory and so to modify it you need to recompile the server and manually edit sources to add new accounts. Obviously when application is shut down everything that has been modified is discarded. |
||
* JDBCPlayerDatabase, this is mainly a MySQL database. It won't run as-is on other SQL compliant databases because it uses MySQL features as special tables types to get transactions and auto_increment column types to generate pk. |
* JDBCPlayerDatabase, this is mainly a MySQL database. It won't run as-is on other SQL compliant databases because it uses MySQL features as special tables types to get transactions and auto_increment column types to generate pk. |
||
| Line 71: | Line 72: | ||
The next section describes the connection string to the database. |
The next section describes the connection string to the database. |
||
* jdbc_url=jdbc:mysql://127.0.0.1/marauroa |
* jdbc_url=jdbc:mysql://127.0.0.1/marauroa<br>This attribute explains where the database is running _(127.0.0.1)_and the name of the database _(marauroa)_. |
||
* jdbc_class=com.mysql.jdbc.Driver |
* jdbc_class=com.mysql.jdbc.Driver<br>this is the class that describes the driver used for this JDBC connection |
||
* jdbc_user=marauroa_dbuser |
* jdbc_user=marauroa_dbuser<br>username of the database account for marauroa |
||
* jdbc_pwd=marauroa_dbpwd |
* jdbc_pwd=marauroa_dbpwd<br>password of the database account for marauroa |
||
Remember that to setup the database you need to log in to MySQL as administrator: |
Remember that to setup the database you need to log in to MySQL as administrator: |
||
<pre> |
|||
mysql -u root |
mysql -u root |
||
</pre> |
|||
And after that run: |
And after that run: |
||
<pre> |
|||
create database marauroa; |
create database marauroa; |
||
grant all on marauroa.* to marauroa_dbuser@<serverip> identified by 'marauroa_dbpwd'; |
grant all on marauroa.* to marauroa_dbuser@<serverip> identified by 'marauroa_dbpwd'; |
||
</pre> |
|||
The marauroa_PORT section defines which TCP/IP port it will use. |
The marauroa_PORT section defines which TCP/IP port it will use. '''All''' the traffic of Marauroa is UDP based. |
||
The next section talks about the Role playing engine configuration: |
The next section talks about the Role playing engine configuration: |
||
| Line 94: | Line 97: | ||
* the1001 |
* the1001 |
||
* mapacman |
* mapacman |
||
The gane should be set with server_typeGame |
The gane should be set with server_typeGame |
||
| Line 102: | Line 106: | ||
* server_logs_directory defines where to store the logs. Please keep this one safe and private. |
* server_logs_directory defines where to store the logs. Please keep this one safe and private. |
||
=Running= |
|||
Once you have it configured, just run the server by executing: |
Once you have it configured, just run the server by executing: |
||
<pre> |
|||
java -classpath marauroa.jar;mysql-connector-java-3.0.7-stable-bin.jar marauroa.marauroad -c <game.ini> -l |
java -classpath marauroa.jar;mysql-connector-java-3.0.7-stable-bin.jar marauroa.marauroad -c <game.ini> -l |
||
</pre> |
|||
Make sure that you have the MySQL running too. Marauroa will build all the needed table structure for itself. |
Make sure that you have the MySQL running too. Marauroa will build all the needed table structure for itself. |
||
This will start Marauroa |
This will start Marauroa |
||
=Creating accounts= |
|||
Before anything else, you MUST create accounts for your players. The idea is simple enough, you can even wrap it in to a webpage interface, much like we did with http://gladiators.game-server.cc |
Before anything else, you MUST create accounts for your players. The idea is simple enough, you can even wrap it in to a webpage interface, much like we did with http://gladiators.game-server.cc |
||
<pre> |
|||
<game>.<game>createaccount -u <user> -p <password> -c <character> -e <email> |
<game>.<game>createaccount -u <user> -p <password> -c <character> -e <email> |
||
</pre> |
|||
For example in mapacman: |
For example in mapacman: |
||
<pre> |
|||
mapacman.mapacmancreateaccount -u root -p pazzw0rd -c MaSSive -e root@localhost.com |
mapacman.mapacmancreateaccount -u root -p pazzw0rd -c MaSSive -e root@localhost.com |
||
</pre> |
|||
Each game has a different number of parameters, check them out with the -h parameter. |
Each game has a different number of parameters, check them out with the -h parameter. |
||
=Testing= |
|||
To test that your connection is working use nullClient. It is a simple client that connects to the server, chooses a character and receives perceptions. If it works it means that everything else is also working. |
To test that your connection is working use nullClient. It is a simple client that connects to the server, chooses a character and receives perceptions. If it works it means that everything else is also working. |
||
<pre> |
|||
java -classpath marauroa.jar marauroa.nullClient root pazzw0rd MaSSive |
java -classpath marauroa.jar marauroa.nullClient root pazzw0rd MaSSive |
||
</pre> |
|||
=Playing with clients= |
|||
Please read the client pages at http://arianne.sourceforge.net |
Please read the client pages at http://arianne.sourceforge.net |
||