Find file
Fetching contributors…
Cannot retrieve contributors at this time
161 lines (98 sloc) 4.86 KB
------------------------------------------------ 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. is is free and open source software. The Freeciv C server is released under
the GNU General Public License, while the web client is released
under the GNU Affero General Public License. See LICENSE.txt for details.
Contact: Andreas Røsdal -
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
* 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 -
- Java 1.6.0 SDK -
- Python 2.7 -
- Python Imaging Library (PIL) -
(required for freeciv-img-extract)
- Mysql 5.0.x -
- Maven 2 -
- Probably some Linux distribution.
- Firefox
- Firebug for debugging -
- Closure Compiler -
(Bundled in source code, no need to download.)
- curl-7.19.7 -
- OpenSSL -
- nginx 1.0.0 -
- pngcrush, required for freeciv-img-extract.
- SocketTornad.IO 0.0.4 -
- Tornado 1.2.1 -
- GLib 2.16.0 or newer -
- Jansson 2.1 -
Compiling and running the Freeciv Web client
To compile and run on Ubuntu,
1. Checkout from github to ~/freeciv-build
2. Update username/password and run: ~/freeciv-build/
On other Linux distributions, follow this installation procedure:
0. Checkout 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 '' in the freeciv-web directory
4. Compile and install Freeciv. This involves running the following commands:
cd freeciv
./ --enable-client=no
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
./ start
6. Start publite2:
Run in the publite2 directory.
7. Run the freeciv-proxy:
Run in the freeciv-proxy directory.
To debug, check the proxy debugging page:
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...
Set ulimit -n 65535 in /etc/profile
and add some TCP/IP tuning in /etc/sysctrl.conf
Developers interested in
If you want to contibute to, see the TODO file for
some tasks you can work on.