When mixer is not available, recommend SDL2_mixer instead of SDL1.2 mixer
[freeciv.git] / doc / README
blobe54336d9d66ceef4ca9a855806b861fe70c89b42
1 ===================
2 Freeciv Version 2.6
3 ===================
5 Welcome to Freeciv!
7 This archive contains Freeciv, a free Civilization-like game, primarily
8 for X under Unix.  It has support for multiplayer games locally or
9 over a network, and an AI which gives most people a run for their money.
11 Freeciv aims to be mostly rule-compatible with Civilization II [tm],
12 published by Sid Meier and Microprose [tm].  A few rules are different
13 where we think it makes more sense, and we have lots and lots of
14 adjustable parameters to make customizing games possible.
16 Freeciv has been implemented completely independently of Civilization;
17 you do not need to own Civilization to play Freeciv.
20 Translations:
21 =============
23 You may find a translated version of this file, as well as of other parts
24 of the Freeciv documentation, in the following places:
26         Catalan                 ./doc/ca
27         Dutch                   ./doc/nl
28         French                  ./doc/fr
29         German                  ./doc/de
30         Italian                 ./doc/it
31         Japanese                ./doc/ja
32         Swedish                 ./doc/sv
34 Even if there is no translation for your language, the game itself may
35 support it.  Please see "Native Language Support" below.
38 Web site:
39 =========
41 Freeciv's web site is here:
43   http://www.freeciv.org/
45 We invite you to visit.  You can get the latest Freeciv news, releases
46 and patches, find out about the Freeciv mailing lists, and see the
47 Freeciv metaserver, which records games being played around the world.
50 License:
51 ========
53 Freeciv is released under the GNU General Public License (version 2
54 or, at your option, any later version).  In short, you may copy this
55 program (including source) freely, but see the COPYING file for full
56 details.
58 Some materials that were used to prepare the graphics in the game (in
59 the 'data' subdirectory), such as 3D models used to prepare bitmap
60 images, are not distributed with the main source code due to their
61 size; they are not necessary to build Freeciv from source, as the
62 (manually) derived graphics are also included in the distribution.
63 These materials are available in the separate 'graphics-materials'
64 distribution (e.g., freeciv-2.4.0-graphics-materials.tar.bz2), or from
65 version control (Subversion).
68 Compiling and installing:
69 =========================
71 Please read the INSTALL file carefully for instructions on how to get
72 Freeciv compiled and installed on your machine.
75 Freeciv is modular:
76 ===================
78 Freeciv is actually several programs, a server and one or more clients.  When
79 a game is in progress, there will be one server program running, and as many
80 client programs as there are human players.  The server does not use a gui,
81 but the clients do.  The clients come in many flavors:
83 freeciv-gtk2:  This uses the GTK+ 2 libraries. To install, see section 1a of
84   the INSTALL document.
85   This client has been replaced by freeciv-gtk3, but it still exist for benefit
86   of those who cannot to switch to gtk3.
88 freeciv-gtk3:  This uses the GTK+ 3 libraries. To install, see section 1b of
89   the INSTALL document.
90   This client is better supported and more developed than the others,
91   as such it is considered to be the default interface throughout the rest of
92   this document.
94 freeciv-gtk3.22:  This uses the GTK+ 3 libraries. Version 3.22 is required.
95   To install, see section 1c of the INSTALL document.
97 freeciv-qt:  This uses the QT library. Development of this client has recently
98   reached the state where it's considered generally usable, but it still lacks
99   number of features gtk-clients have.
101 freeciv-sdl:  This uses Simple DirectMedia Layer libraries version 1.2.
102   This client is currently unmaintained but is usable.
104 freeciv-sdl2: This uses Simple DirectMedia Layer libraries version 2.
105   This client is going to replace freeciv-sdl in the future.
107 freeciv-xaw:  This uses the X Window System along with its Athena Widget
108   interface.
109   This client, somewhat minimalistic compared to the others, is currently
110   unmaintained.
113 Starting a game:
114 ================
116   NOTE:
117   The following examples assume that Freeciv has been installed on
118   your system, and that the directory containing the "freeciv-gtk3"
119   and "freeciv-server" programs is in your PATH.  If Freeciv is not
120   installed, then you may want to use the "fcgui" and "fcser" programs,
121   which can be found in the top Freeciv directory.  They are used
122   in exactly the same fashion as "freeciv-gtk3" and "freeciv-server".
124 Running Freeciv involves starting the server, then the client(s)
125 and AI(s), then telling the server to start the game.  Here are the
126 steps:
128 Server:
130   To start the server:
132   |  % freeciv-server
134   Or for a list of command-line options:
136   |  % freeciv-server --help
138   Once the server is started, a prompt will appear:
140   |  For introductory help, type 'help'.
141   |  >
143   and, you can see this information by using the help command:
145   |  > help
146   |  Welcome - this is the introductory help text for the Freeciv server.
147   |
148   |  Two important server concepts are Commands and Options.
149   |  Commands, such as 'help', are used to interact with the server.
150   |  Some commands take one or more parameters, separated by spaces.
151   |  In many cases commands and command arguments may be abbreviated.
152   |  Options are settings which control the server as it is running.
153   |
154   |  To find out how to get more information about commands and options,
155   |  use 'help help'.
156   |
157   |  For the impatient, the main commands to get going are:
158   |    show   -  to see current options
159   |    set    -  to set options
160   |    start  -  to start the game once players have connected
161   |    save   -  to save the current game
162   |    quit   -  to exit
163   |  >
165   If you like, you can use the 'set' command to set any of the various
166   server options for the game.  You can get a list of the options
167   with the 'show' command, and detailed descriptions of each with the
168   'help <option-name>' command.
170   For example:
172   | > help size
173   |  Option: size  -  Map size in 1,000 tiles units
174   |  Description:
175   |    This value is used to determine the map dimensions.
176   |      size = 4 is a normal map of 4,000 tiles (default)
177   |      size = 20 is a huge map of 20,000 tiles
178   | Status: changeable
179   | Value: 4, Minimum: 1, Default: 4, Maximum: 29
181   And:
183   |  > set size 8
185   This will make the map twice as large as the default.
187 Client:
189   Now all the human players should join, by running the Freeciv
190   client:
192   |  % freeciv-gtk3
194   This assumes the server is running on the same machine.  If not, you
195   can either specify it on the command line with the '--server' option,
196   or enter it into the first dialog box once the client starts.
198   For example, suppose the server is running on a different machine
199   called 'neptune'.  Then players would join with a command like:
201   |  % freeciv-gtk3 --server neptune
203   If you're the only human player, then only one client needs to be
204   started.  In standard Unix fashion you can start the client
205   "in the background" by appending an ampersand:
207   |  % freeciv-gtk3 &
209   Another option for the client you may like to try is the '--tiles'
210   option, which can be used to select different "tilesets" (that is,
211   different graphics for the map terrain, units, and so on).  The
212   distribution comes with 8 main tilesets:
213   - amplio2: An isometric tileset with larger and more detailed tiles.
214   - isotrident: An isometric tileset similar in shape to the one in Civ 2.
215   - cimpletoon: amplio2 with alternative units that display direction they
216                 are facing.
217   - trident: a Civ 1-style tileset with 30x30 tiles.
218   - hexemplio: an isometric hexagonal tileset with larger tiles derived
219                from amplio2
220   - toonhex: tileset combining hexemplio tiles with cimpletoon units
221   - isophex: an isometric hexagonal tileset
222   - hex2t: an overhead hexagonal tileset
224   In this release the amplio2 tileset is the default tileset.
225   To try another one, for instance the trident tileset, start the
226   client with:
228   |  % freeciv-gtk3 --tiles trident
230   Other tilesets are available from http://www.freeciv.org/wiki/Tilesets
233   Clients can be authorized to issue server commands.  To allow them
234   to use informational commands only, type at the server prompt
236   |  > cmdlevel info
238   Clients can now use '/help', '/list', '/show settlers', etc.
240 Computer Players:
242   There are two ways to create AI players.  The first is to set
243   the number of players (human and AI) by setting the 'aifill'
244   server option.  For example:
246   |  > set aifill 7
248   After using the 'start' server command to start the game, any players
249   which aren't controlled by humans will be AI players.  For the above,
250   if two human players had joined, 5 AI players would be created.
252   The second way is to explicitly create an AI with the 'create'
253   server command.  For example:
255   |  > create HumanKiller
257   This will create an AI-controlled player called HumanKiller.
259   AI players are assigned to nations after all human players have
260   chosen their nations, but you can choose a particular nation for an
261   AI player by using the normal name for that nation's leader.  For
262   example, to play against AI-controlled Romans, use this server
263   command:
265   |  > create Caesar
267   Note, this is just a preference:  If no other human player chooses
268   to play the Romans, then this AI will.
270 Server:
272   When everybody has joined (use the "list" command to see who's in),
273   start the game with the "start" command:
275   |  > start
277 And the game is on!
279   NOTE: In this version of Freeciv, the GTK, Qt, and SDL clients have the
280   capability to automagically start a freeciv-server session when the user
281   selects "Start New Game" from the main menu. This reduces the steps
282   needed to get started playing a game of Freeciv. On the other hand,
283   it also means that if the client crashes for some reason or becomes
284   unavailable, the freeciv-server session will also be lost. So starting a
285   separate freeciv-server session and then connect to it with the client is
286   generally the recommended method.
289 Announcing the game:
290 ====================
292 If you do not want to limit your opponents to local friends or AI players,
293 visit the Freeciv metaserver:
295   http://meta.freeciv.org/
297 It is a list of Freeciv servers.  To make your own server announce itself
298 there, start freeciv-server with the '--meta' option, or just '-m' for short.
300 Caveats:
302  1) Due to the inclusion of new features, different client and server
303     versions are often incompatible. The 2.5.0 version is for example
304     incompatible with any 2.4.x or earlier versions.
306  2) If the Metaserver button in the connection dialog doesn't work,
307     check if your ISP uses a mandatory WWW proxy and make freeciv-gtk3
308     use it through the $http_proxy environment variable.  For instance,
309     if the proxy is proxy.myisp.com port 8888, set $http_proxy
310     to http://proxy.myisp.com:8888/ before starting the client.
312  3) Sometimes there are no games on the metaserver.  That happens.
313     The number of players there vary with the time of the day. Try
314     starting one yourself!
317 Playing the game:
318 =================
320 The game may be saved at any time using the 'save' server command,
321 like so:
323   |  > save mygame.sav
325 (If your server is compiled with compression support, and the
326 'compresstype' server option is set to other than PLAIN, then the
327 file written may be compressed and called 'mygame.sav.gz', 'mygame.sav.bz2',
328 or 'mygame.sav.xz' depending on the setting.)
330 The Freeciv client works pretty much as you would expect from a
331 multiplayer civilization game.  That is, the human players all move
332 at the same time, then all the AI players move when all the human
333 players have completed their turn.  There's a turn timeout value,
334 which is by default set to 0 seconds (no timeout).  The server
335 operator can alter this value at any time with the 'set' command.
337 Have a look at the online help system. All three mouse-buttons are
338 used, and documented in the help.
340 Players can hold down 'Shift' and push the 'Return' key to announce
341 the end of their turn, or just push the 'Turn Done' button.
343 Use the 'Players' dialog to see who has announced their end of turn,
344 and who you're waiting for.  (Hey feller, are you asleep or what?? ;).
346 Use the input line at the bottom of the window for broadcasting
347 messages to other players.
349 You can send a message to an individual player (e.g., 'peter') like so:
351   |  peter: move that armor away *NOW*!
353 The server is smart enough to perform "name completion", so if you had
354 typed "pet:", it will find a player name that matches the part of the
355 name you typed.
357 You can send a message to all your allies by prefixing it with the
358 letter '.' (yes, that is a period).
360 You can issue server commands from the client input line:
362   |  /list
363   |  /set settlers 4
364   |  /save mygame.sav
366 The server operator will probably let you issue informational commands
367 only.  This is partly because allowing clients to use all server
368 commands has security implications; consider if a player tried:
370   |  /save /etc/passwd
372 Of course the server should not be running with superuser privileges in
373 any case, to reduce this sort of risk.
375 If you're just starting, and would like to get an idea of a strategy,
376 have a look in the Freeciv playing HOWTO, contained in the HOWTOPLAY
377 file.
379 For lots more information about the client, the server, and the
380 concepts and rules of the game, see the Freeciv manual, available
381 at the wiki:
383   http://www.freeciv.org/wiki/Manual
386 Ending the game:
387 ================
389 There are four ways in which a game can end:
391 1) Only winners remain in game
392    1a) If server setting 'alliedvictory' is enabled:
393        All the remaining nations, short of those who have ceded the game
394        (/surrender), are allied or in the same team.
395    1b) If 'alliedvictory' is disabled:
396        Only one nation or one team is left, or all other players of all
397        other teams have ceded the game (/surrender).
398 2) The final turn (/show endturn) is reached.
399 3) A player builds and launches a spaceship, which reaches Alpha
400    Centauri first.
401 4) The server operator uses the /endgame command.
403 A score-table will be shown in all cases.  Hint: The server operator
404 can set the final year while the game is still going by changing the
405 'endturn' option.  This is nice when the winner is obvious, but you
406 don't want to play through the boring 'cleanup phase'.
409 Restoring games:
410 ================
412 You can restore a saved game by using the '-f' server option, eg:
414   |  % freeciv-server -f oursave2001.sav
416 or, if the save-file was created by a server that compressed it:
418   |  % freeciv-server -f oursave2001.sav.gz
420 Now the players can rejoin the game:
422   |  % freeciv-gtk3 -n Alexander
424 Notice how the player-name is specified with the -n option. It's vital
425 that the player uses the same name as they had when the game was running,
426 if they're to be allowed in.
428 The game may then be restarted with the 'start' command as usual.
431 Native Language Support:
432 ========================
434 Freeciv supports several languages.
436 You may choose which local language to use by specifying a "locale".
437 Each locale has a standard name (e.g., 'de' for German).  If you have
438 installed Freeciv, you may choose a locale by setting the environment
439 variable LANG to that locale's standard name before running freeciv-server
440 and freeciv-gtk3.
442 For example, assuming you wish to use the German localization, you
443 would do:
445   export LANG; LANG=de   (in the Bourne shell (sh)),
447   setenv LANG de         (in the C shell (csh)).
449 (You could do this in your .profile or .login file.)
451 Sometimes there is a conflict between the local library implementation
452 and the internal locale determination.  It is often possible to work
453 around problems with a more detailed descriptor:
455   LANG=de_DE.UTF-8
457 We'd like to know about such problems.  Please report them as bugs
458 (see BUGS).
461 Log messages:
462 =============
464 Both the client and server print messages known as "log messages".
465 There are five categories of log messages: "fatal", "error", "normal",
466 "verbose", and "debug".
468 By default, fatal, error and normal messages are printed to standard
469 output where the client or server was started.  You can direct log
470 messages to a file instead of the screen with the "--log filename",
471 or "-l filename" command line options.
473 You can change the level of log messages displayed with "--debug
474 level" or "-d level" (or instead "-de level" for the Xaw client, since
475 "-d" is ambiguous between "-debug" and "-display"), where "level" is
476 0, 1, 2, or 3.  0 means show fatal messages only, 1 means show fatal
477 and error messages, 2 means fatal, error and normal messages (the
478 default), and 3 means show all fatal, error, normal, and verbose
479 messages.
481 If you compiled with DEBUG defined (an easy way to do this is to
482 configure with --enable-debug), then you can get debug level messages
483 by setting the level to 4.  Also, it is possible to control debug
484 level messages (but not other messages) on a per-file and per-line
485 basis.  To do this use "--debug 4:str1:str2" (as many strings as you
486 like, separated by colons) and any filenames which match those strings
487 as a substring will have debug log messages turned on, and all other
488 debug messages will be suppressed.  To control lines, use:
489 "--debug 4:str1,min,max" and for files which match str1 only debug
490 messages within the specified minimum and maximum lines will be
491 printed.  Only one set of (min,max) can be applied to each file.
493 Example:
495   |  % freeciv-server -l my.log -d 3
497 This sends all server log messages to file "my.log", including verbose
498 level messages.
500 Example:
502   |  % freeciv-gtk3 --debug 0
504 This suppresses all non-fatal client log messages.
506 Example:
508   |  % freeciv-server -d 4:log:civserver,120,500:autoattack
510 This turns on all fatal, error, normal and verbose messages for the
511 server, and debug level messages for some specified modules.  Note
512 that "log" will match "gamelog.c" as well as "log.c".  For
513 "civserver.c", debug messages between lines 120 and 500 will be
514 printed.  This example only works if the server was compiled with
515 DEBUG.
518 Bugs:
519 =====
521 Found a bug?  We really want to hear from you so we can fix it.
522 See the file BUGS, for a list of known bugs in this release, and
523 information about reporting new bugs.
526 Mailing lists:
527 ==============
529 We maintain 4 mailing lists:
531   freeciv-announce Announcements of general interest.
532                    This is a "Read Only" list, with infrequent messages.
533                    In other words you can't mail this list, just read it.
534   freeciv-i18n     Freeciv translation.
535                    All discussions related to translating the Freeciv code,
536                    documentation, and website, into other languages than
537                    English.
538   freeciv-dev      Freeciv development.
539   freeciv-commits  Notifications of changes to the SVN repository.
540                    This is a "Read Only" list, carrying automated messages.
541                    In other words you can't mail this list, just read it.
543 All lists are open to the general public and everyone is welcome to join.
544 Only maintainers may post to the -announce and -commits lists.
546 The lists are hosted at gna.org. For more information, to join, or to leave
547 these lists, go to http://gna.org/mail/?group=freeciv
550 Internet Relay Chat (IRC)
551 =========================
553 Several players and developers hang out on #freeciv and #freeciv-dev
554 channels on the freenode network. Try connecting to the server
556         irc.freenode.net
559 And finally:
560 ============
562 Have fun and give 'em hell!
564                                    -- The Freeciv team.