Command: Split

Convert one image file into multiple image files. By default, the output file names will be equal to the given tile's GID. This can instead be set to "sequential", whereby the file names will use consecutive numbering from 0 to the total number of files that have been output.

The difference between the two naming schemes is based on crunch not outputting empty images. The default GID based file names are stable, assuming the number of rows or columns in an image remains the same, and will correlate to the IDs used by popular tilemap editors. On the other hand, Sequential mode does not factor in empty tiles - this means that if a previously empty tile has content added to it, subsequent tiles will be output with a different file name (e.g. 1 additional tile would increment numeric file names by 1 for every tile after).

Usage

Usage: crunch split [OPTIONS] <INPUT> <OUTPUT>

Arguments:
  <INPUT>   The path to the spritesheet file
  <OUTPUT>  The base path for all of the created sprites. Should be a directory, which will be created if it does not exist

Options:
  -x, --space-x <SPACE_X>      The amount of horizontal space between each sprite in the image [default: 0]
  -y, --space-y <SPACE_Y>      The amount of vertical space between each sprite in the image [default: 0]
  -p, --padding <PADDING>      The amount of space around the edge of the image [default: 0]
  -t, --tile-size <TILE_SIZE>  The size of each tile in the spritesheet. Assumed to be square tiles [default: 32]
  -s, --sequential             When set, files will be numbered consecutively, regardless of empty sprites. By default, files will be numbered based on their inferred "tile id", based on position in the sheet
  -h, --help                   Print help
  -V, --version                Print version

Example

results matching ""

    No results matching ""