A flexible 2D MMORPG server
C++ C Lua PLpgSQL CMake Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CMake/Modules Fixed configure with old cmake Feb 3, 2013
docs Removed some outdated and not useful documentation Feb 25, 2013
example Do not make all attributes persistent Aug 31, 2013
libs/enet Fixed socklen_t typedef conflict in enet Apr 5, 2018
scripts Added basic questlog support Sep 13, 2013
src Fixed compile when using Lua 5.3 Jun 7, 2015
tools Added Upstart files Nov 28, 2013
.LICENSE-HEADER Added license header template Oct 19, 2011
.gitignore Added a few file to .gitignore Apr 27, 2013
.mailmap Added .mailmap file to clean up shortlog May 17, 2010
.travis.yml Make travis build with gcc 4.8 May 5, 2014
AUTHORS Maps are now configured in settings.xml too May 3, 2013
CMakeLists.txt Allow manaserv to be built with external ENet Jun 18, 2013
COPYING Start on files that enable compiling this, but don't expect it to com… Mar 19, 2005
ChangeLog Note that ChangeLog is no longer updated, like on the client Dec 6, 2009
Doxyfile Update some Doxygen settings Jan 10, 2013
INSTALL Removed obsolete autoconf files Oct 25, 2010
NEWS Start on files that enable compiling this, but don't expect it to com… Mar 19, 2005
README Made the scripts being able to install Feb 24, 2013
TODO Updated link to roadmap in TODO file Oct 24, 2010
accountserver.cbp Added -std=c++0x compiler flag to the codeblocks files Apr 13, 2013
gameserver.cbp Renamed character.cpp to charactercomponent.cpp Sep 8, 2013
mana.ico Add/fix win32 build rules Jan 29, 2010
print-backtrace.gdb Added the initial version of a server monitor Oct 17, 2009
runsrv.bat Removed some DOS newlines from mixed files Nov 11, 2008
setup-creator.sh Include Lua files in the project Mar 11, 2011

README

Setting up a Mana server
========================

COMPILATION

Before trying to compile, make sure all the dependencies are installed. For
each dependency the Ubuntu package name is listed as well as the website.

 * libsigc++ 2.0 (libsigc++-2.0-dev)  - http://libsigc.sourceforge.net/
 * libxml2       (libxml2-dev)        - http://xmlsoft.org/
 * Lua           (liblua5.1-0-dev)    - http://lua.org/
 * PhysFS        (libphysfs-dev)      - http://icculus.org/physfs/
 * SQLite 3      (libsqlite3-dev)     - http://sqlite.org/
 * zlib          (zlib1g-dev)         - http://zlib.net/

Optional dependencies:

 * MySQL         (libmysqlclient-dev) - http://dev.mysql.com/
   (replaces the SQLite 3 depency)


1) cmake .
2) make

The compilation should produce two binaries:

* manaserv-account - The account + chat server
* manaserv-game - The game server


SERVER DATA

The client and the server share a big part of the data. See the example/
subfolder for an example world data.


CONFIGURATION

The server loads its configuration from manaserv.xml, which it tries to find in
the directory where you're running the server from. An example file is located
at docs/manaserv.xml.example.

Default option values:

    accountServerAddress    localhost
    accountServerPort       9601
    gameServerAddress       localhost
    gameServerPort          9604

    worldDataPath           example


RUNNING

1. Run manaserv-account on one single computer. It will open three consecutive
UDP ports, starting from the one given by the configuration option
"accountServerPort". This first port is the one you should advertise to your
users. The configuration option "accountServerAddress" should contain the
public address the server runs on, as it will be sent to the users as the
address of the chat server, which happens to be the account server for now.

2. Run manaserv-game on multiple computers. Each game server will open one UDP
port given by the configuration option "gameServerPort". It will also connect
to the account server given by the configuration options "accountServerAddress"
and "accountServerPort". The configuration option "gameServerAddress" should
contain the public address of the computer the server runs on, as it will be
sent to the users. The file data/maps.xml contains the maps the server will
load and register on the account server; split it across your multiple game
servers, in order to balance the load.

Access to port "accountServerPort + 1" of the account server can be restricted
to connections from game servers only. Users do not need to access it.


INITIAL DATABASE SETUP

To initally setup the database run the following command:

	cat src/sql/sqlite/createTables.sql | sqlite3 mana.db

This will generate a database called mana.db according to the needs of the server.

For making a player admin do:

	sqlite3 mana.db "UPDATE mana_accounts SET level=255 WHERE username='MyAccount';"