Animation2Tilemap is a tool that converts images or GIF animations into tilemaps and tilesets, compatible with Tiled and other tile-based game development tools.
- Wide Format Support - Process PNG, BMP, GIF, JPEG, PBM, TIFF, TGA, and WebP images
- Animation Detection - Automatically convert animations from folders or multi-frame images
- Tileset Generation - Create optimized animated tilesets with duplicate tile detection
- Tilemap Generation - Generate complete tilemaps that recreate your original animations
- Advanced Customization - Control tile size, transparency settings, and frame timing
- Only orthographic maps are supported at this time
Convert a GIF animation into a tileset and tilemap:
From | To |
---|---|
![]() |
![]() |
- Ensure you have .NET 10 runtime installed.
- Download the latest release from the releases page.
- Extract the zip file to your preferred location.
animation2tilemap -i <input file/folder> -o <output folder>
For a full list of options, use:
animation2tilemap --help
It starts by loading the input, which can be a single image, a multi-frame file (such as a GIF), or a folder of images.
Multi-frame files are automatically treated as animations. When processing a folder where all images have the same
dimensions, they are assumed to be animation frames; confirmation is requested unless the --assume-animation
option is
used.
Next, the tileset factory divides each frame into tiles and uses image hashing to track unique tiles at each grid position, ensuring that only unique tiles are stored for a compact tileset. For each grid position, a unique identifier is generated to represent the sequence of tiles across frames, capturing any tile animation patterns.
Finally, the tilemap factory constructs a tilemap that references the generated tileset, creating a map layer that reflects the original frame layout. It then uses the calculated sequence IDs to assign the correct animated tile ID to each grid position, reconstructing the original animation.
For converting tilemaps to GIFs, check out Tilemap2Animation.
If you find value in this project, there are several ways you can contribute:
- Give the project a star on GitHub.
- Support the project through GitHub Sponsors.
- Improve documentation, report bugs, or submit pull requests.
Animation2Tilemap is open-source software licensed under the MIT License.