Skip to content

Battle for Planet Isotrident is an epic strategy game implemented in HTML5 and WebGL, which can be played online against other players, or in single player mode against AI opponents

License

Notifications You must be signed in to change notification settings

Isotrident/Isotrident

Repository files navigation

BATTLE FOR PLANET ISOTRIDENT

'Battle for Planet Isotrident' is an open-source turn-based strategy game. It can be played in any HTML5 capable web-browser and features in-depth game-play and a wide variety of game modes and options. Your goal is to build cities, collect resources, organize your government, and build an army, with the ultimate goal of creating the best civilization. You can play online against other players (multiplayer) or play by yourself against the computer. There is both a HTML5 2D version with isometric graphics and a 3D WebGL version of Isotrident.

Isotrident is free and open source software. See License for the full license document.

Please contribute patches upstream here: https://github.com/freeciv/freeciv-web

Currently known servers based on Isotrident:

Freeciv-web HTML5 version: Freeciv-web

Overview

Isotrident consists of these components:

  • Isotrident - a Java web application for the Isotrident client. This application is a Java web application which make up the application viewed in each user's web browser. The Metaserver is also a part of this module. Implemented in Javascript, Java, JSP, HTML and CSS. Built with maven and runs on Tomcat 8 and nginx.

  • Freeciv - the Freeciv C server, which is checked out from the official Git repository, and patched to work with a WebSocket/JSON protocol. Implemented in C.

  • Freeciv-proxy - a WebSocket proxy which allows WebSocket clients in Isotrident to send socket requests to Freeciv servers. WebSocket requests are sent from Javascript in Isotrident to nginx, which then proxies the WebSocket messages to freeciv-proxy, which finally sends Freeciv socket requests to the Freeciv servers. Implemented in Python.

  • Publite2 - a process launcher for Freeciv C servers, which manages multiple Freeciv server processes and checks capacity through the Metaserver. Implemented in Python.

  • pbem is play-by-email support.

  • freeciv-earth is code to generate Freeciv savegames from a map captured from mapbox.

Isotrident WebGL

Isotrident WebGL is the 3D version, which uses the Three.js 3D engine. More info about the WebGL 3D version can be found for developers and 3D artists.

Running Isotrident on your computer

The recommended and probably easiest way is to use Vagrant on VirtualBox.

Whatever the method you choose, you'll have to check out Isotrident to a directory on your computer, by installing Git and running this command:

 git clone https://github.com/isotrident/isotrident.git --depth=10

You may also want to change some parameters before installing, although it's not needed in most cases. If you have special requirements, have a look at configuration.sh.dist and WEB-INF/config.properties.dist, copy them without the .dist extension and edit to your liking. Don't change the .dist files, they are the ones from the repo.

Running Isotrident with Vagrant on VirtualBox

Isotrident can be setup using Vagrant on VirtualBox to quickly create a local developer image running Isotrident on latest Ubuntu on your host operating system such as Windows, OSX or Linux. This is the recommended way to build Isotrident on your computer.

  1. Install VirtualBox: https://www.virtualbox.org/ - Install manually on Windows, and with the following command on Linux:
sudo apt-get install virtualbox
  1. Install Vagrant: http://www.vagrantup.com/ - Install manually on Windows , and with the following command on Linux:
sudo apt-get install vagrant
  1. Run Vagrant with the following commands in your Isotrident directory:
vagrant up

This will build, compile, install and run Isotrident on the virtual server image. Wait for the installation process to complete, watching for any error messages in the logs.

  1. Test Isotrident by pointing your browser to http://localhost if you run Windows or http://localhost:8080 if you run Linux or macOS.

To log in to your Vagrant server, run the command:

vagrant ssh

The Vagrant guest machine will mount the Isotrident source repository in the /vagrant directory. Note that running Isotrident using Vagrant requires about 4Gb of memory and 3 Gb of harddisk space.

System Requirements for manual install

Install this software if you are not running Isotrident with Vagrant:

When in a tested system, you may run scripts/install/install.sh and it will fetch and configure what's needed.

Start and stop Isotrident with the following commands:
start-freeciv-web.sh
stop-freeciv-web.sh
status-freeciv-web.sh

All software components in Isotrident will log to the /logs sub-directory of the Isotrident installation.

Isotrident alternative Docker image

  1. Build local dockerfile based on debian - this will take a significant amount of time (10 - 20 minutes)

docker build . -t freeciv-web

  1. Run docker image including required ports on your host

docker run -i -t --user docker -p 8888:8080 -p 80:80 -p 7000:7000 -p 7001:7001 -p 7002:7002 -p 6000:6000 -p 6001:6001 -p 6002:6002 freeciv-web

  1. Start Isotrident with:

./start-freeciv-web.sh

Answer prompt for docker sudo password with "docker"

  1. Connect to docker via host machine using standard browser

http://localhost/

Enjoy. The overall dockerfile and required changes to scripts needs some further improvements.

Isotrident continuous integration on Travis CI

Isotrident is built on Travis CI on every commit. This is the current build status: Build Status

Isotrident has CasperJS tests which are run by Travis CI on every commit, and by Vagrant when creating a new image. The tests can be found in tests/freeciv-web-tests.js. Please make sure that patches and commits for Isotrident don't break the CasperJS tests. Thanks!

About

Battle for Planet Isotrident is an epic strategy game implemented in HTML5 and WebGL, which can be played online against other players, or in single player mode against AI opponents

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published