Tile Grid Press

Prepare a PNG with different horizontal and vertical tile gaps

A tile can be 16 by 16 pixels even when its neighbors start 18 pixels to the right. The start offset is the distance to the first tile. The gap is the distance from the end of one tile to the start of the next.

Open Tile Grid Press

Pack six market lanterns with a two-pixel horizontal gap

Input

PNG: 55 × 37
Tile: 16 × 16
Start left: 1, top: 3
Gap across: 2, down: 0

Output

PNG: 48 × 32
Grid: 3 columns × 2 rows
Tile: 16 × 16
Margin and spacing in Tiled: 0

Load the sample and inspect the yellow outlines. The first cell starts at (1, 3), and the one to its right starts at (19, 3). Tiles in the second row begin at y = 19. Packing puts the second tile at (16, 0) and the first tile of row two at (0, 16).

Check the result

  1. Pack the sample and verify there are 6 tiles and the PNG is 48 × 32. The transparent pixels around each lantern remain in place within its own tile.
  2. Download both files, keep their names matched, and choose the TSX in the Tiled Tilesets pane. The first row should show three lanterns.
  3. For an existing map, compare the column count and tile IDs before replacing its image. Check a corner tile and a tile from the last row in a copy of the map.

Common problems

Count tile pixels before gap pixels

For a 16-pixel tile with an 18-pixel stride, put 16 in Width and 2 in Across. Putting 18 in Width includes the gap as part of each tile.

Keep blank cells that hold an ID

The export keeps transparent cells and duplicates in place. Use Columns and Rows to exclude extra complete cells only when they are outside the part you need.

Preserve the tileset metadata you already have

Save a backup of an existing TSX if it contains animation, terrain, collisions or tile properties. If its ID grid already matches the packed sheet, update its image reference and set spacing and margin to zero.

Using Tile Grid Press

Set the tile size

Enter the original width and height of a single tile, excluding any gap.

Align the boundaries

Set the left and top starts independently. Use Across and Down for gaps between adjacent tiles.

Pack and compare

Check the first and last tiles and the reported number of columns and rows.

Keep the exports together

Download the PNG and TSX to the same folder. In Tiled, add the TSX as an external tileset.

Offline use

Open the tool once online and let it finish loading. Use the install option in your browser or Add to Home Screen on iPhone. Reopen the tool to process a new input offline.

References