pouët.net

TicMcTile by Rift

TicMcTile reads your imagefile(s) in a variety of formats and creates files from it,
which can be run/loaded by the TIC-80 or your favorite editor/ide. Supported languages
are: Lua & Javascript and basically also Moonscript, Wren, Fennel and Squirrel.

TicMcTile is written in Python and runs on a variety of platforms.

--- --- --- --- --- --- --- --- ---

Usage: ticmctile.py imagefile [OPTION...]
Generate TIC-80 tile/sprite or charset values from pixeled images

mandatory arguments:
  imagefile          imagefile with pixeled graphics (e.g.: .png, .gif, etc.)

optional arguments:
  -o, --output       outputfile for tile/sprite or charset values (e.g.: .lua)
  -l, --language     output as: js, fennel, wren, moon or squirrel, default is lua
  -f, --force        force overwrite of outputfile when it already exist
  -s, --sprites      export as sprites instead of tiles
  -c, --charset      export as charset to replace the systemfont
  -p, --page         start page (1-3) for tiles/sprites, default is 0
  -m, --mode         mode to encode as: raw, rle, binary, default is config
  -b, --bank         memory bank (1-7) for TIC-80 PRO version, default is 1
  -k, --keep         keep colors of imagefile to adjust the TIC-80 palette
  -v, --version      show version info
  -h, --help         show this help

The optional arguments are only needed if the default setting does not meet the
required needs. A specific name for the output file (-o / --output) can be set.
The output can be in different scripting languages (-l / --language). Lua is
default, but the following languages are also supported: JavaScript, Squirrel,
Fennel, Wren and Moonscript. Dont expect too much, is just different formatting.
The data can be saved as sprites (-s / --sprites) instead of tiles.
Tiles/sprites can start on a different page (-p / --page) instead of 0.
Mode (-m / --mode) to encode the tiles/sprites as part of the code as raw, rle,
as a binary-file (binary) or as part of the config, which is the default.
Replace the systemfont with a correct formated charset (-c / --charset).
To replace the smallfont choose (-p 1 / --page 1) instead of 0, which is default.
In the PRO version of TIC-80 there are up to 8 memory banks (-b / --bank)
to store the tiles/sprites, instead of only one. The colors of the image can
be kept (-k / --keep), replacing the default colors (Sweetie-16) of the TIC-80.

examples:
  ticmctile.py imagefile.png
  ticmctile.py graphic.gif -o myticprog.lua
  ticmctile.py pixels.bmp -o javascript.js -l js
  ticmctile.py logo.png -o tempvalues.lua -f
  ticmctile.py goblins.gif -o sprites.lua -s
  ticmctile.py atothez.png -o lettering.lua -p 2
  ticmctile.py flextiles.bmp -o thecodeinside.lua -m rle
  ticmctile.py dafont.png -o freshchars.lua -m raw -c
  ticmctile.py tilesgalore.gif -o membank3.lua -b 3
  ticmctile.py nicecolors.png -o mypalette.lua -k