Coder Social home page Coder Social logo

stefanbeller / manaserv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mana/manaserv

2.0 3.0 0.0 10.07 MB

A flexible 2D MMORPG server

Home Page: http://manasource.org/

License: GNU General Public License v2.0

Lua 3.80% C++ 79.18% Objective-C 1.52% Shell 0.03% C 15.47%

manaserv's Introduction

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.

 * 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 server depends on parts of the client data and also has its own data
repository. These are the 'manadata' and 'manaserv-data' repositories.
Currently, manaserv expects these to be merged into a single 'data' directory.

1) Clone manadata and manaserv-data next to the manaserv repository
2) Symlink a 'data' directory in manaserv to manaserv-data
3) Symlink the following files from manaserv-data to manadata:

  * data/items.xml - Item definitions
  * data/monsters.xml - Monster definitions
  * data/maps/*.tmx{.gz} - Maps


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

    serverPath              .
    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';"

manaserv's People

Contributors

ambiwlans avatar bjorn avatar blue112 avatar dotdash avatar exceptionfault avatar iceslice avatar jaxad0127 avatar jurkan avatar kagejittai avatar ko2fan avatar mashu avatar nymacro avatar philipp-s avatar postremus avatar rogierpolak avatar silene avatar stefanbeller avatar turmfalke2 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.