70
70
# set timeout 3 # run a client/server autogame
71
71
set timeout -1 # run a server only autogame
72
72
set minplayers 0 # no human player needed
73
set ec_turns 0 # avoid timestamps in savegames
73
74
set aifill 7 # fill to 7 players
74
75
hard # make the AI do complex things
75
76
create Caesar # first player (with known name) created and
593
594
Unknown tiles and Fog of War
594
595
=========================================================================
596
In common/tile.h, there are several fields:
600
bv_player tile_known, tile_seen[V_COUNT];
597
In common/player.h, there are several fields:
601
struct dbv tile_known;
609
struct dbv tile_vision[V_COUNT];
604
614
While tile_get_known() returns:
1064
1074
under our control, and all output to the command line must be converted.
1066
1076
===========================================================================
1077
Debugging and Profiling
1078
===========================================================================
1080
Debugging has to be activated on compile time by adding the option
1081
'--enable-debug=no/some/yes/checks' to the configure script. The different
1082
options have the following meaning:
1084
no: no debugging enabled(NDEBUG is defined)
1085
additional compiler flags for optimisation (-O3 -fomit-frame-pointer)
1086
some: default build (neither NDEBUG nor DEBUG is defined)
1087
yes: debugging enable (DEBUG is defined)
1088
debugging log level available (4, log_debug())
1089
additional compiler flag: -Werror
1090
checks: same as 'yes' but with more compiler checks (-Wall -Wpointer-arith
1091
-Wcast-align -Wmissing-prototypes -Wmissing-declarations
1092
-Wstrict-prototypes -Wnested-externs)
1094
REMARK: The debug option '--enable-debug=checks' adds additionally compiler
1095
options. This is OK for the server and most clients but in the case
1096
of the gtk client there is a problems in its main external library
1097
(gtk2) which prevent the compilation of the client using the
1098
extended flags. A fix is available but will not be applied due to
1099
compatibility issues. To compile freeciv with this option,
1100
temporary patch the file gtkitemfactory.h
1101
(see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=148766).
1103
Profiling is enabled by '--enable-gprof'. After the compilation run freeciv
1104
normally. It will be 5 to 10 times slower due to the added calls to the
1105
profiling functions. After freeciv quits normally (not after a crash) the
1106
file gmon.out is written. It can be analyzed by calling
1107
'gprof ./server/freeciv-server gmon.out > gprof.txt'. More information can
1108
be found at http://sourceware.org/binutils/docs/gprof/index.html.
1110
===========================================================================