Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Freeciv.net is an Open Source strategy game which can be played online against other players, or in single player mode against AI opponents.
Branch: master
Pull request Compare This branch is 1228 commits behind freeciv:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
freeciv-img-extract
freeciv-music
freeciv-pr
freeciv-proxy
freeciv-web
freeciv
publite2
LICENSE.txt
README
TODO
freeciv.net-bootstrap.sh

README

THE FREECIV.NET PROJECT - http://www.freeciv.net
------------------------------------------------

Freeciv.net 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. 

This is yet another rewrite of the Freeciv web client, which
will make it possible to play Freeciv in your web browser.

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



Contact: Andreas Røsdal  - andrearo@pvv.ntnu.no


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 AJAX 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. 

* freeciv-music - contains music which can be played during the game.


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

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

- Java 1.6.0 SDK - http://java.sun.com/javase/downloads/index.jsp

- Python 2.7 - http://www.python.org/

- 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

- Probably some Linux distribution.

- Firefox

- 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.0.0 - http://nginx.org/

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

- SocketTornad.IO 0.0.4 - https://github.com/MrJoes/tornadio

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

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

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



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

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


On other Linux distributions, follow this installation procedure:

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

1. Install the system requirements. 

2. Create mysql database called 'freecivmetaserver'
   Import mysql dump into a MySQL database from:  /publite2/mysqldump.sql.bz2

3. Build and configure freeciv-web. 

   - Edit /freeciv-web/src/main/webapp/freecivmetaserve/php_code/settings.php.dist,
     rename this file to settings.php, and update values for fcdb_username and fcdb_pw
     to your MySQL username and password.
   - 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

4. Compile and install Freeciv. This involves running the following commands:
   cd freeciv 
   ./autogen.sh --enable-client=no
   make
   make install     (as root user)

   Create the Freeciv savegame directory:  /mnt/savegames
   and make it writeable by the user running publite.


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

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

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

8. Start nginx on port 80 as root.

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

10. Continue to play the game. 

FIXME: Had to add -lssl when compiling server...




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

Developers interested in Freeciv.net
------------------------------------

If you want to contibute to Freeciv.net, see the TODO file for 
some tasks you can work on.
Something went wrong with that request. Please try again.