Skip to content

P1X-in/tanks-of-freedom-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tanks of Freedom Server

Tanks of Freedom

Tanks of Freedom II

Indie Turn Based Strategy in Isometric Pixel Art

This project is a server for Tanks of Freedom and Tanks of Freedom II games. It allows players to share custom maps. It also enables online play for ToF 1.

Client

For the source code of the clients please visit https://github.com/w84death/Tanks-of-Freedom and https://github.com/P1X-in/tanks-of-freedom-ii

Requirements

  • Python 3.11.x or newer
  • MySQL 5.x server
  • MySQL driver for Python 3.x
    • pkg-config
    • python3-dev
    • default-libmysqlclient-dev
    • build-essential
  • Virtualenv and PIP (recommended)

Deployment

  • clone the source
  • Create virtualenv for the application
    • virtualenv -p /usr/bin/python3 flask
    • source flask/bin/activate
  • install requirements.txt using pip
    • pip install -r requirements.txt
  • create empty database and fill it using sql/database_bootstrap.sql file
    • run database migrations from sql folder
  • configure app in tof_server/config.py (.dist provided)
  • use run.py script to test if app works
  • bind the app to the webserver of your choice (example .wsgi for apache2 provided)

Commands

Server has a few commands that are useful for managing it. So far there are only two for fixing map thumbnails, but more could be added.

In order to use a command:

  • cd into the server folder
  • source {virtualenv folder name}/bin/activate
  • flask --app tof_server admin {command name} (optional args)
  • "admin" group name is used for existing commands, but others could be used as well

Official pages:

The MIT License (MIT)

Copyright (c) 2016 P1X

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Server for Tanks of Freedom game.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages