Building a Better Animated GIF

Creating animated GIFs is a great way to show your game in motion without requiring viewers to click on anything. I was having a few issues with both file size and image artifacts. Here’s what I learned about how to make better animated GIFs for when you want to put in a little more effort to make it look as good as possible.

Using the improved method

  • Even if the camera normally moves it should be locked in a stationary position for the GIF, this will greatly reduce file size
  • Record the video using FRAPS with frame rate set to 60 or 30 and set to “Lock framerate” while recording
  • Open the video in VirtualDub
  • Select Video / Frame Rate and in the box for Convert to fps enter 30 if you had recorded it at 60
  • Instead of exporting it for Virtual Dub as a GIF, export as an image sequence.
  • In Gimp use File / Open as Layers then select all the images
  • Scale the image to the desired size
  • Select Filters / Animation / Optimize (for GIF)
  • Export as a GIF and set the delay between frames to 33

Here is the same video that was just exported from virtual dub as an animated gif instead of using the improved method. As you can see there is much less flickering and banding issues in the first image for about an extra 50 percent increase in file size.

Exported as a GIF

This entry was posted in Game Dev and tagged . Bookmark the permalink.

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.