项目作者: buxx

项目描述 :
Adventure, survival and cooperation role-game engine.
高级语言: Python
项目地址: git://github.com/buxx/rolling.git
创建时间: 2018-11-22T19:15:00Z
项目社区:https://github.com/buxx/rolling

开源协议:MIT License

下载


Rolling

Python tests

Server side of rolling game. See rollgui2 for client side.

Home image

To see information about how to play, please visit this page

Installation

A python3.10+ is required.

Following documentation assume you use debian 10 or similar OS. Additionally to Python3.10, you will need:

  1. apt-get install git build-essential python3-dev postgresql postgresql-server-dev-11

Python environment require

If you need to create a virtual environment, you can use the following:

  1. python3 -m venv venv

Then activate it in current terminal with:

  1. source venv/bin/activate

To install required python packages:

  1. pip install --upgrade pip setuptools wheel
  2. pip install -r requirements.txt
  3. python setup.py develop

Then install dev packages:

  1. pip install -e ".[dev]"

Generate a map

Need Rust

Write a text file (ex. myworldmap.txt) containg, for example:

  1. ::LEGEND
  2. ~ SEA*
  3. ^ MOUNTAIN
  4. JUNGLE
  5. HILL
  6. BEACH
  7. PLAIN
  8. ::META
  9. SPAWN:RANDOM:BEACH,
  10. ::GEO
  11. ~~~~~~~~~~~~~~~~~~~~~~~~~
  12. ~~~~~~~~~~~~~~~~~~~~~~~~~
  13. ~~~~~~~~~ፆ^ፆፆ~~~~~~~~~~~~
  14. ~~~~~~~~ፆ^^^∩ፆ~~~~~~~~~~~
  15. ~~~~~~~⡩ፆ∩∩∩∩⡩~~~~~~~~~~~
  16. ~~~~~~⡩ፆፆ∩∩∩ፆፆ⡩~~~~~~~~~~
  17. ~~~~~~⡩ፆፆፆፆፆፆፆ⡩~~~~~~~~~~
  18. ~~~~~~⡩⠃⠃⠃ፆፆፆፆ⡩~~~~~~~~~~
  19. ~~~~~~⡩⠃⠃⠃⠃⠃⠃⡩~~~~~~~~~~~
  20. ~~~~~~~⡩⠃⠃⠃⠃⡩~~~~~~~~~~~~
  21. ~~~~~~~~⡩⡩⡩⡩~~~~~~~~~~~~~
  22. ~~~~~~~~~~~~~~~~~~~~~~~~~
  23. ~~~~~~~~~~~~~~~~~~~~~~~~~

Then, generate zones maps:

  1. cargo run myworldmap.txt --height 64 --width 64 --output-dir myzones

Start server

You need a server config file: Copy template with:

  1. cp server.ini.tpl server.ini

Then modify content with your configuration. Note: SMTP is only required for forgotten password.

  1. rolling-server --host 127.0.0.1 --port 5002 --debug ./myworldmap.txt ./myzones ./game ./server.ini

Where ./myworldmap.txt is previously created world map text file, ./myzones previously generated zones folder and ./game the config folder (you can use repository folder or copied and modified one).

Use docker image

To build docker image:

  1. docker build . -t rolling:latest

To run server:

  1. docker run -v <local path containing world.txt>:/world -v <local path containing zones>:/zones -v <local path containing game config>:/game -v -v <local path for db>:/db rolling:latest

Reload configuration without stop server

  1. kill -SIGHUP <pid>

Look at server logs to ensure everything is ok. If config produce error at load, config is not replaced.

Roadmap (fr)

See here : https://github.com/users/buxx/projects/4/views/1