InitialStepsWithMarauroa

From Arianne
Revision as of 16:52, 9 April 2007 by imported>MiguelAngelBlanchLardin (Running)
Jump to navigation Jump to search

OK, you have successfully compiled Marauroa and are wondering what to do next?

  BUILD SUCCESSFUL
  Total time: 3 seconds

Nice, isn't it? Basicly, if you have built a Marauroa server it must be because you either want to play with the server a bit yourself or because you want to run your own game server or because you are a developer who wishes to develop your own game.

If you are none of the above it is possible you are looking for http://arianne.sourceforge.net instead.

Configuration

Create a MySQL database and user

Run the sql client (bin/mysql.exe on the windows noinstall package). Replace <user> and <password> with the desired values and paste the following lines to the prompt that opens:

    create database marauroa;
    grant all on marauroa.* 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 marauroa;
  Query OK, 1 row affected (0.03 sec)
  
  mysql> grant all on marauroa.* to stendhal_user@localhost identified by 'stendhal_passwd';
  Query OK, 0 rows affected (0.00 sec)
  
  mysql>

Create server.ini file

To create the marauroa.ini file you need to can write it by hand, copy from another place or use game application to generate it.
Please refer to game documentation about how to write it.

Running

Once you have it configured, just run the server by executing:

  java -classpath .;mysql-connector-java-3.0.7-stable-bin.jar;log4j.jar -jar marauroa.jar -c <game.ini>

NOTE: On Linux use : instead of ; to define the classpath.

NOTE: You may change what it is logged by default, so you need to edit the log4j.properties file. For example:

# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=INFO, Console, File

# Paste all logger entries with a threshold of WARN to the console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%-4r %-5p %c %x - %m%n

log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=server.log
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

# Disabled debug messages for stendhal...some 10 thousand logs each minute is
# way too much
log4j.logger.marauroa.server.game.RPServerManager=WARN


Make sure that you have the MySQL running too. Marauroa will build all the needed table structure for itself.

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

  <game>.<game>createaccount -i marauroa.ini -u <user> -p <password> -c <character> -e <email>

For example in mapacman:

  mapacman.mapacmancreateaccount -i marauroa.ini -u root -p pazzw0rd -c MaSSive -e root@localhost.com

For example in Stendhal:

 Initial Steps With Stendhal

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.

  java -classpath marauroa.jar marauroa.nullClient root pazzw0rd MaSSive

Playing with clients

Please read the client pages at http://arianne.sourceforge.net