Skip to content

Freeciv-web is an Open Source strategy game implemented in HTML5, 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

zielmicha/freeciv-web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THE FREECIV-WEB PROJECT
-----------------------

Freeciv-web is an open-source turn-based strategy game. It’s built entirely in HTML5 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. 

Freeciv-web is is free and open source software. The Freeciv C server is released under the GNU General Public License, while the Freeciv-web client is released
under the GNU Affero General Public License. See LICENSE.txt for details.

Freeciv-web is now playable online at http://play.freeciv.org/

Contact: The Freeciv Project - [email protected]
https://mail.gna.org/listinfo/freeciv-dev


Overview
--------

The Freeciv Web client consists of these components:

* freeciv - a fork of the main Freeciv C client and server.

* freeciv-proxy - a HTTP proxy which allows web client users
  to connect to Freeciv civservers. The proxy is a HTTP and WebSocket
  server, and proxy between web browsers and civservers.

* freeciv-web - a Java web application for the Freeciv web client.
  This application is a Java web application which consists of HTML,
  Javascript, images and JSP files which make up the application
  viewed in each user's web browser. 

* freeciv-img-extract - extracts the images of the Freeciv tileset,
  and generates a version for the web. This produces a tileset PNG 
  and Javascript. Run this to sync with the upstream Freeciv SVN 
  repository.

* publite2 - a simple way to launch multiple civservers. 


System Requirements
-------------------

- Resin 4.0.36 - http://www.caucho.com/

- Java 7 JDK - http://www.oracle.com/technetwork/java/javase/downloads/ 

- Python 3.3 - http://www.python.org/
  (freeciv-proxy uses Python 3.3, freeciv-img-extract uses Python 2.7
   due to PIL depenedency)

- Python Imaging Library (PIL) - http://www.pythonware.com/products/pil/
  (required for freeciv-img-extract)

- Mysql 5.0.x - http://www.mysql.com/

- Maven 2 - http://maven.apache.org/download.html

- Firebug for debugging - http://getfirebug.com/

- Closure Compiler - http://code.google.com/intl/nb/closure/compiler/
  (Bundled in source code, no need to download.)

- curl-7.19.7 - http://curl.haxx.se/

- OpenSSL - http://www.openssl.org/

- nginx 1.5.1 - http://nginx.org/

- pngcrush, required for freeciv-img-extract.  http://pmt.sourceforge.net/pngcrush/

- Tornado 3.1 - http://www.tornadoweb.org/

- GLib 2.16.0 or newer - http://ftp.gnome.org/pub/GNOME/sources/glib/2.16/

- Jansson 2.1.1 - http://www.digip.org/jansson/



Compiling and running the Freeciv Web client
---------------------------------

To compile and run Freeciv-web on Ubuntu, 
1. Checkout Freeciv-web from github to ~/freeciv-build
2. Update username/password and run: ~/freeciv-build/freeciv-web-bootstrap.sh


On other Linux distributions, follow this installation procedure:

0. Checkout Freeciv-web from github to ~/freeciv-build

1. Install the system requirements.

2. Create mysql database called 'freeciv_web'
   Import mysql tables into a MySQL database from:
    freeciv-web/src/main/webapp/meta/private/metaserver.sql

3. Get checkout from freeciv revision mentioned in freeciv/version.txt as
   freeciv/freeciv:
   cd freeciv
   svn co svn://svn.gna.org/svn/freeciv/trunk -r <revision> freeciv

4. Patch freeciv:
   ./apply_patches.sh


5. Compile and install Freeciv. This involves running the following commands:
   cd freeciv
   ./autogen.sh --enable-fcweb --disable-nls --disable-debug
   make
   make install     (as root user)

   copy freeciv-web/freeciv/data/fcweb to /usr/local/share/freeciv 

6. Build and configure freeciv-web. 

   - Run setup_links.sh and sync.sh in freeciv-img-extract 
   - Run sync-js-hand.sh in /freeciv-web/scripts/ directory.
   - Edit /freeciv-web/src/main/webapp/WEB-INF/resin-web.xml.dist, rename this
     file to resin-web.xml, and update the values for your MySQL database.
   - Run 'build.sh' in the freeciv-web directory
   - copy nginx configuration file from publite2/nginx.conf 
     to /usr/local/nginx/conf/

7. Start resin with these commands:
   cd ~/freeciv-build/resin/bin
   ./resin.sh start

8. Start publite2:
  Run publite2_single.py in the publite2 directory.

9. Run the freeciv-proxy:
  Run run.sh in the freeciv-proxy directory.
 To debug, check the proxy debugging page: 
http://localhost:8002/status

10. Start nginx on port 80 as root.

11. Start the web client in your browser:
    Point your web browser to http://localhost/

12. Continue to play the game. 


* Some useful scripts:

scripts/start-freeciv-web.sh      # starts all freeciv-web processes
scripts/stop-freeciv-web.sh       # stops all freeciv-web processes
scripts/status-freeciv-web.sh     # checks status of all freeciv-web processes




Also: 
Set ulimit -n 65535 in /etc/profile
and add some TCP/IP tuning in /etc/sysctrl.conf

Developers interested in Freeciv-web
------------------------------------

If you want to contibute to Freeciv-web, see the TODO file for 
some tasks you can work on.


Contributors to Freeciv-web
---------------------------
Andreas Røsdal
Marko Lindqvist
and the Freeciv.org project!

About

Freeciv-web is an Open Source strategy game implemented in HTML5, which can be played online against other players, or in single player mode against AI opponents.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 81.0%
  • Python 13.2%
  • CSS 4.2%
  • Shell 1.2%
  • Lua 0.4%