-
Notifications
You must be signed in to change notification settings - Fork 1
Home
bakes together layers of tiles created by Tiled Map Editor http://www.mapeditor.org/
Improve your workflow. Baker can bake (merge) layers from more level(tmx) files, the only condition is that all the level files share the same original tileset. It creates new baked tileset with all used tiles combinations. It creates remaped levels also. So original levels are still usable for designing in layers.
install python 2.7 from (download)
install python pil library (pkg python-imaging) (download
for debian like OS:
sudo apt-get install python python-imaging
Source files go to "src" folder Source TMX files has to be in XML format only
Execute "merge.py" within a python interpreter with following arguments:
./python merge.py first_colliding_tile [src_dir]
param first_colliding_tile is an integer - a position of the first colliding tile in original tileset optional param src_dir is a source directory relative from merge.py directory (default "./src")
Output files are created in "output" folder folder is not emptied on execution, but is created if does not exist
tileset baker adds attribute collision_tile to every level file with integer value - a position of the first colliding tile in the new tileset
e.g. output/mapa1.tmx:
<map height="30" orientation="orthogonal" tileheight="32" tilewidth="32" version="1.0" width="14"> <tileset collision_tile="101" firstgid="1" name="tiles32" tileheight="32" tilewidth="32">
baker comes with linux and win executable bash files:
merge.sh
winmerge.bat
executable by doubleclick and including necessary argument of first colliding tile and path to python interpreter. fell free to modify them according to your configuration and original tileset
Example is included
Source tileset
Output tileset