--- .freeciv-Aug-15/freeciv_hackers_guide.txt Fri Aug 3 07:59:42 2001 +++ freeciv/freeciv_hackers_guide.txt Tue Aug 21 21:43:09 2001 @@ -51,6 +51,45 @@ call waits for packets or input on stdin(server-op commands). =========================================================================== +Server Autogame Testing +=========================================================================== +Code changes should always be tested before submission for inclusion into +the CVS source tree. It is useful to run the client and server as autogames +to verify either a particular savegame no longer shows a fixed bug, or as +a random sequence of games in a while loop overnight. + +To start a server game with all AI players, add lines such as the following +to your civ.serv startup file. + ... +# set randseed 42 # repeat a particular game (random) sequence +# set seed 42 # repeat a particular map generation sequence +# set timeout 3 # run a client/server autogame +set timeout -1 # run a server only autogame +set aifill 7 # fill to 7 players +# make the AI do complex things +hard +# first player (with known name) created and toggled to AI mode +create Caesar +start + +The commandline to run server-only games can be typed as variations of: +$ while( time server/civserver -r civ.serv ); do date; done + --- or --- +$ server/civserver -r civ.serv -f buggy1534.sav.gz + +To attach one or more clients to an autogame, remove the "start" from the +civ.serv file, start the server and attach clients to created AI players. +Or type "aitoggle " at the server command prompt for each player +that connects. Finally, type "start" when you are ready to watch the show. + +Note, that the server will eventually flood a client with updates faster +than they can be drawn to the screen, thus it should always be throttled +by setting a timeout value high enough to allow processing of the large +update loads near the end of the game. The autogame mode with timeout -1 +is only available in DEBUG versions and should not be used with clients +as it removes virtually all the server gating controls. + +=========================================================================== Data Structures =========================================================================== For variable length list of fx units and cities freeciv uses a genlist,