InstallingStendhal

From Arianne
Revision as of 18:36, 19 February 2005 by imported>MiguelAngelBlanchLardin (Edit the Marauro ini file)
Jump to navigation Jump to search

Install MySQL

Download the appropriate MySQL install package from http://dev.mysql.com/downloads/

Also download the java connector library from the same place (it's called "MySQL Connector/J" ), unzip it, and make sure it is on the classpath when running maraurorad later.

Download Maraurora

Download Maraurora from http://www.arianne.cx/ or check out the cvs version and build it.


Start MySql

Refer to the MySql installation documentation for details.

If you used the noinstall package, you can run bin/mysqld.exe.

Make sure to edit the configuration files to disallow external access if you are just going to use it for local testing, or simply use a firewall to block external access to the database.


Create a MySql user and database for the game

Run the sql client (bin/mysql.exe on the windows noinstall package). Paste the following lines to the prompt that opens:

   create database stendhal;
   grant all on stendhal.* to <user>@localhost identified by '<password>';

It should produce output similar to this:

 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 1 to server version: 4.1.10
 
 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
 mysql> create database stendhal;
 Query OK, 1 row affected (0.03 sec)
 
 mysql> grant all on stendhal.* to testuser@localhost identified by 'testpass';
 Query OK, 0 rows affected (0.00 sec)
 
 mysql>


Create Marauroa.ini file

To create the marauroa.ini file you need to can write it by hand, copy from another place or use our application to generate it.
To launch the application that will generate the marauroa.ini file write:

  java -cp marauroa-XXX.jar marauroa.server.generateini

It is a text application that will ask you for values. Let's see it.

Marauroa - arianne's open source multiplayer online framework for game developme
nt -
(C) 1999-2005 Miguel Angel Blanch Lardin

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


Write name of the .ini file (marauroa.ini):
Using "marauroa.ini" as .ini file

Write name of the database (marauroa): stendhal
Using "stendhal" as database name

Write name of the database host (localhost):
Using "localhost" as database host

Write name of the database user (marauroa_user): stendhal_user
Using "stendhal_user" as database user

Write value of the database user password (marauroa_pass): stendhal_passwd
Using "stendhal_passwd" as database user password

In order to make efective these options please run:
# mysql
  create database stendhal;
  grant all on stendhal.* to stendhal_user@localhost identified by 'stendhal_pas
swd';
  exit

Write UDP port used by Marauroa (>1024): 32160
Using "32160" as database user password

Marauroa is a server middleware to run multiplayer games. You need toadd a game
to the system so that server can work. Actually Arianne has implemented several
games:
- stendhal
- mapacman
- the1001
If you write your own game, just write it name here.
You will be asked for more info.

Write name of the game server will run: stendhal
Using "stendhal" as game

Setting RPWorld and RPRuleProcessor for Stendhal
Make sure Marauroa can find in CLASSPATH the folder games/stendhal/*
NOTE: Copy games generated in stendhal inside folder that contains marauroa.jar
file

Write turn time duration in milliseconds (200<time<1000)): 300
Using turn of "stendhal" milliseconds

Write path for logs generation (./)):
Using path "./" for log generation

Write path for statistics generation (./)):
Using path "./" for statistics generation

COMPLETE---
Generating "marauroa.ini" file
Generated.

Copy Stendhal to the Maraurora classpath

For example copy the stendhal jar to the same folder where the compiled code for Maraurora is.


Start the server

Run the maraurora.bat file (or create an equivalent shell script if in unix).


Start the Stendhal client

TODO: We need a bat file or such for starting the client.