Skip to content

A tool that converts GIF animations to tilesets and tilemaps

License

Notifications You must be signed in to change notification settings

vonhoff/Animation2Tilemap

Repository files navigation

Animation2Tilemap

workflow version license

Animation to Tilemap is a tool that converts images or GIF animations into tilemaps and tilesets, compatible with Tiled and other tile-based game development tools.

Features

  • Versatile Input Support: Process Bmp, Gif, Jpeg, Pbm, Png, Tiff, Tga, and WebP formats.
  • Flexible Animation Handling: Convert animations from folders or multi-frame images.
  • Animated Tileset Generation: Create animated tilesets from single images or frame folders.
  • Customization Options: Adjust tile size, transparent color, and frame duration.
  • Tiled Compatibility: Generate tilesets and tilemaps in various formats (base64, zlib, gzip, csv).
  • Dual Interface: Utilize both command-line and user-friendly GUI options.

Example

Convert a GIF animation into a tileset and tilemap:

Input GIF Animation Output Tilemap
Input Output

Image source: https://x.com/jmw327/status/1405872936783802384

Installation

  1. Ensure you have .NET 8 runtime installed.
  2. Download the latest release from the releases page.
  3. Extract the zip file to your preferred location.

Usage

Command-line Interface

Basic usage:

animation2tilemap.console -i <input> -o <output>

For a full list of options, use:

animation2tilemap.console --help

Graphical User Interface

Launch the Animation2Tilemap.WinForms.exe file for a visual interface.

Program screenshot

Motivation

This tool was created to streamline the process of converting a GIF to a tileset and tilemap. Manually slicing each frame, manipulating animations, and optimizing tiles can be time-consuming and error-prone.

Animation to Tilemap aims to solve these problems:

  • Automate the process of slicing images and animations into individual tiles
  • Identify and remove duplicate tiles to optimize memory usage
  • Convert assets into game engine compatible formats

They are also useful in these scenarios:

  • Converting detailed backgrounds into tile-based formats
  • Converting character animations into sprite sheets
  • Optimize large maps or procedurally generated worlds

Contributing

Contributions are welcome! Here's how you can help:

  • Report Issues: Submit bugs or suggest features via GitHub Issues.
  • Pull Requests: Improve code, documentation, or add new features.
  • Feedback: Share your experience or ideas for improvement.

Support

If you find Animation2Tilemap useful:

License

Animation2Tilemap is open-source software licensed under the MIT License.