civreplay - generate animated freeciv maps

The canonical URL for civreplay is http://www.pobox.com/~mgurski00001/software/civreplay/. This is also linked to from freshmeat.

Contents

Introduction

civreplay is a script to generate animated maps from the savegame files in freeciv. I wrote it on New Years Eve 2001, because I grew impatient waiting for the author of civpow to fix the permissions on his script. This one does pretty much the same thing, although I have no clue how much the internals match.

I've tested it on Freeciv 1.12.0, and it appears to work. Your mileage may vary, but I'd be interested in hearing about any spectacular failures. The colors might be a bit off for games comprising more than, say, 8 people, since I haven't tested the high end of my color map. But it should still give a fairly decent view.

Prerequisites

Prerequisites for running civreplay are:

  1. perl
  2. Netpbm
  3. gifsicle
  4. Compress::Zlib perl module (for reading compressed gamefiles)
You can likely find most of these in a standard Linux distribution, or from one of the prepackaged sites. Unix folks should already know how to install a tarball... Windows and other OS users are on their own for figuring out how to compile/use the above packages.

Attention Debian Users: It's come to my attention that ppmtogif (which is the part of Netpbm which civreplay needs) is in the package netpbm-nonfree. I hadn't noticed this was needed, since I had the package already installed. Thanks, Tim M., for finding that.

Download

Once you've managed to fill all the prerequisites above, the only thing you need to download is the script (current version: 0.003). On a Linux or Unix system, you'll likely have to add execute permissions (chmod a+x civreplay) and place the script somewhere in your path. You'll also likely have to change the location of perl on the first line of the script if it isn't located at /usr/bin/perl (which is where it is on my system).

Additionally, both gzipped (42k) and bzip2ed (45k) tarballs are provided, which include everything in the development tree.

If you'd like to see what's changed from version to version, you can check out the changelog.

civreplay options

The best explanation of civreplay options is the option summary printed when civreplay is run without any command-line parameters at all:

Proper usage:
  civreplay [options] <savegamefiles*.sav[.gz]>

where options are:
 --delay|-d N           delay between gif frames in 100ths of a second
                          (default 5)
 --expansion|-e N       expansion factor for pixels (sets both pixelwidth
                          and pixelheight to the same value)
 --output|-o <filename> the output filename for the animated gif
                          (default civreplay.gif)
 --pixelheight|--height|-h N
                        the height in pixels of individual map squares
                          (default 2)
 --pixelwidth|--width|-w N
                        the width in pixels of individual map squares
                          (default 2)
 --quiet|-q             run quietly
 --radius|-r N          how many map squares around a city should be colored
                          a player's particular color.  A radius of 0
                          means that only cities themselves are noted.  A
                          radius of 2 roughly indicates the squares a player's
                          cities actually control.
                          (default 2)
 --units|-u             display units as well as cities. Units always have a
                          radius of 0 (default off)
 --version|-v           display the version information

Output

The output of civreplay is an animated gif. To give you some idea of what these gifs look like:

Licensing

civreplay is distributed under the terms of the GNU General Public License, available at http://www.gnu.org/copyleft/gpl.html. As such, there is no warranty, either expressed or implied, associated with civreplay. If it wipes out your hard drive, or starts mailing spam to everyone in your addressbook, it's your fault. civreplay works for me.


Go back to my software page.

Go back to my main page.

Join the Blue Ribbon Anti-Censorship Campaign!

Michael A. Gurski <(opt. [firstname].)[lastname]@pobox.com>
Last modified: Sat Jan 5 01:25:01 PST 2002
Copyright © 2001 - Michael A. Gurski. All Rights Reserved.