Skip to content

Small script for exporting Tiled Maps to gifs

License

Notifications You must be signed in to change notification settings

lightlike/Tiled-Gif-Export

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiled-Gif-Export

Requirements:

Download

OS Type
Windows Zip
Mac Zip
Linux Exe

All Systems

  1. download or clone the repository
  2. execute python ./src/tiled_gif_export.py
  3. see Usage

Usage

Important: frametime is the time between animation frames in ms (default: 100ms). The value has to be cleanly devisible by 10 to work the way I wrote it.

With UI

  1. Start the program for the first time
  2. Edit the config.ini
[TOOLPATHS]
tmxrasterizer = tmxrasterizer   ; path to the Tiled `tmxrasterizer.exe` (you will need to edit the right side)
magick = magick                 ; path to the ImageMagick `magick.exe` or `convert.exe` (should be in PATH if selected during install)
  1. Start the program and everything sould work after that

Console

Run one of these commands:

  • tiled_gif_export.exe ...
  • python tiled_gif_export.py ...
usage: tiled_gif_export.py [-h] [-r RASTERIZER] [-m MAGICK] [--temp TEMP] -d DURATION -n FRAMES -f FILE -o OUTPUT

optional arguments:
  -h, --help            show this help message and exit
  -r RASTERIZER, --rasterizer RASTERIZER
                        Path to tmxrasterizer
  -m MAGICK, --magick MAGICK
                        Path to magick/convert
  --temp TEMP           Temporary Directory
  -d DURATION, --duration DURATION
                        Frame duration in ms (has to be devisible by 10)
  -n FRAMES, --frames FRAMES
                        Number of Frames to render
  -f FILE, --file FILE  Input file (Tiled file '.tmx' or '.world')
  -o OUTPUT, --output OUTPUT
                        Output file (.gif)

Basic Commands used

x: frame duration

tmxrasterizer --advance-animations {x+1} "{Tiled-File}" "{PNG Files}"

magick -delay {x/10} -loop 0 *.png {outfile}

Discussions

Gitter

Or join using Matrix

Stuff that I need to do

  • ignoring UI when using arguments
  • proper error handling (mostly?)
  • Build Pipeline for Pyinstaller
  • Icon for executable