CMVtoGIF - Generate GIF animations from Dwarf Fortress CMV files
======================================================
This little program takes any Dwarf Fortress CMV file and creates a GIF animation from it.
Different types of CMVs have different frame rates, so it may take a little bit of tweaking
to get a nice looking GIF image, but in general things should "just work".
Basics
----------------------------------------------------------------------------------------------------
Using CMVtoGIF is easy, simply open a command prompt and run:
cmvtogif -cmv="<cmv file>"
Gameplay CMVs generally need the following settings (else they are too slow):
cmvtogif -cmv="<cmv file>" -skip=4
There are other options you may use to control exactly what is converted and how.
For example if you want a GIF of just the fight scene in the dwarf fortress intro,
cropped to a smaller size and slower than normal, something like this will do:
cmvtogif -start=78 -end=88 -x=18 -w=42 -delay=15 -cmv=dwarf_fortress.cmv -gif=fight_scene.gif
Use the `-tset` option to specify a tileset, by default `tileset.png` is used.
Tile size is calculated from the tile sheet dimensions, non-square tilesets should
work fine.
Frame skipping and delay
----------------------------------------------------------------------------------------------------
Gameplay CMVs generally are waaaay too slow, use something like this for them:
cmvtogif -cmv="<cmv file>" -skip=4
This will cause it to render every "skip" frames, in this case for every 5 frames 1
will be rendered. This is not too bad as DF renders the frames the same way (if your
GFPS is lower than your FPS, which is the case normally)
Frame skipping is required because, with the default settings for DF, a gameplay CMV
is 100 FPS! Way too fast for the GIF format to display
The delay value is how long to wait between frames, setting this higher will slow the
animation down. CMVs store a delay internally, but if (like me) you think this is too
fast you can change it to whatever you want.
If you want to decrease file size for the generated animation simply increase the delay
and frame skip values. This will make the animation have a lower frame rate while still
playing at the same speed... If that makes any sense?
Having the frame skip or delay set too high can make the animation rough and ugly, so
don't do that!
These two setting may require some experimentation to get right, if you modify one the
value for the other will likely have to change as well.
Building
----------------------------------------------------------------------------------------------------
I provide 32 bit Windows binaries, but if you want binaries for other architectures or
operating systems you will have to build them yourself.
Building is simple, first install [go](golang.org), then unpack CMVtoGIF somewhere on
your GOPATH. Once that is done all you need to do is run `go build CMVtoGIF`.
CMVtoGIF should build and run without issues on every platform go supports (which is
most of them).
Other
----------------------------------------------------------------------------------------------------
By default the GIF is "optimized", eg each frame only contains the tiles that changed
from the previous frame. If this is not desired it is possible to switch this behavior
off with `-opt=false`. Be warned that rendering will be MUCH slower with this disabled!
If possible frames are rendered individually on multiple CPU cores, so multi-core
computers will be able to render large animations MUCH faster than single core computers.
Even so if you try to render a large animation with optimization and frame skipping off
expect to wait a while!
For a full list of command line parameters and their defaults run `cmvtogif -help`.
This program should be able to handle both the "old" and the "new" (with sound) CMV formats.
Compressed CMVs (the CCMV format) are not supported, AFAIK DF cannot generate these files
anyway. If you want support for these files send me a copy of the format specification
and I'll see what I can do...
Have Fun!
Contact:
* User "milo christiansen" on Bay12 forums (preferred)
* milo (dot) christiansen (at) gmail (dot) com (slow but reliable)
Download
on DFFD