PX-Art

GUIDE

How do you generate a tileset for Tiled?

Generate the tileset in PX-Art with the magenta guide grid, then export the tileset ZIP. It contains atlas.png, tileset.json, tileset.tsx and tileset.tmj. Unzip all four into one folder and open tileset.tmj in Tiled, or add tileset.tsx to an existing map as an external tileset. The slicing is deterministic: fixed cell coordinates, not content detection.

The problem with slicing a generated image

Ask a model for "a 4x4 tileset sheet" and you get an image that looks like a grid but is not one: cells drift by a few pixels, gutters vary, and a tile that reads fine to a human is off by three pixels to a slicer. The usual workaround is to detect the grid from the content — project row and column boundaries and hope the guess is right. It is right until a tile is mostly empty, and then it silently isn't.

PX-Art removes the guessing. The model draws inside a magenta hollow guide grid and is constrained to fill one cell at a time. The backend then cuts along the same fixed set of coordinates that produced the guide grid. Slicing is deterministic: there is nothing to detect, so an empty tile, a tile with a transparent corner and a fully painted tile are cut identically.

Pick the viewpoint dimension first

Viewpoints are independent dimensions, not variations of one another. Choose before you generate, because a set generated for one viewpoint does not convert into another:

DimensionWhat it producesTiled orientation
tilesetTop-down square tilesorthogonal
tileset_orthoOrthographic 45-degree square tilesorthogonal
tileset_sideSide-view platformer terrainorthogonal
isometricIsometric tilesisometric

For side view, the minimum usable terrain set is material fill for the interior, a two-cell-wide long platform, left and right end caps, and corner and underside pieces. That is the smallest set that tiles a level without visible seams at the edges.

Step by step

  1. Create or open a game projectStyle is set at the game level with a style key and tags, so a tileset generated today matches the characters you generated last week. Map assets land in the map module of that game.
  2. Choose the viewpoint dimensionTop-down, orthographic 45, side view or isometric. This is the decision that is expensive to change later.
  3. Generate against the guide gridThe model paints cell by cell inside the magenta hollow grid. Because the cut coordinates are fixed in advance, what you see in each guide cell is what ends up as that tile.
  4. Review and re-roll individual tilesCheck the pieces that carry the most seams — end caps, corners, undersides — before exporting. Generation is probabilistic and edges are where mismatches show.
  5. Export the tileset ZIPYou get four files. Keep them together; the paths inside them are relative.
  6. Open it in TiledEither open tileset.tmj directly as a preview map, or, in an existing map, Map → Add External Tileset and pick tileset.tsx.
  7. Draw, then export your mapTiled saves your map as .tmx or .tmj; the tileset stays external, so re-exporting an updated tileset from PX-Art does not force you to rebuild the map.

What is inside the exported ZIP

Four files, each with a distinct job:

atlas.png

The tile images laid out by row and column.

tileset.json

PX-Art's own manifest, with per-tile provenance back to the source asset.

tileset.tsx

The Tiled tileset in XML, with per-tile properties.

tileset.tmj

A preview map you can open in Tiled immediately.

tileset.json

Top-level fields are name, image, tileSize, columns, tileCount and tiles. Each entry in tiles carries id, assetId, name, file, role, sourceRow, sourceCol, atlasCol and atlasRow:

{
  "name": "harbor_ground",
  "image": "atlas.png",
  "tileSize": 32,
  "columns": 8,
  "tileCount": 24,
  "tiles": [
    {
      "id": 0,
      "assetId": "a_9c14",
      "name": "stone_fill",
      "file": "stone_fill.png",
      "role": "fill",
      "sourceRow": 0,
      "sourceCol": 0,
      "atlasCol": 0,
      "atlasRow": 0
    },
    {
      "id": 1,
      "assetId": "a_9c15",
      "name": "platform_end_left",
      "file": "platform_end_left.png",
      "role": "end_cap_left",
      "sourceRow": 0,
      "sourceCol": 1,
      "atlasCol": 1,
      "atlasRow": 0
    }
  ]
}

sourceRow and sourceCol are the cell the tile was cut from in the guide grid; atlasRow and atlasCol are where it sits in atlas.png. Keeping both is what lets you trace a tile in a finished map back to the generation it came from. role describes the tile's job in the set — interior fill, platform, end cap, corner, underside — and the exact values depend on what you generated.

tileset.tsx

The same set expressed as a Tiled external tileset. Each tile carries role, sourceRow, sourceCol and assetId as properties, so the provenance survives inside Tiled rather than only in the JSON manifest:

<?xml version="1.0" encoding="UTF-8"?>
<tileset name="harbor_ground" tilewidth="32" tileheight="32" tilecount="24" columns="8">
 <image source="atlas.png"/>
 <tile id="0">
  <properties>
   <property name="role" value="fill"/>
   <property name="sourceRow" type="int" value="0"/>
   <property name="sourceCol" type="int" value="0"/>
   <property name="assetId" value="a_9c14"/>
  </properties>
 </tile>
</tileset>

Select a tile in Tiled's Tileset view and those four properties show up in the Properties panel. That is the quickest way to answer "which generated asset is this tile" without leaving the editor.

tileset.tmj and where the files must live

Keep the archive flat and together — tileset.tmj references tileset.tsx, which references atlas.png, all by relative path:

harbor_ground/
  atlas.png
  tileset.json
  tileset.tsx
  tileset.tmj      <- File / Open in Tiled

Move atlas.png somewhere else and Tiled will ask you to relocate the image. For production maps, add tileset.tsx as an external tileset to your own map rather than editing the preview map, so an updated export drops in cleanly.

A tileset on its own is not a level. Once you have tiles, the tileset generator pairs with the Arrange workspace, which stores scene size, layers, coordinates and asset references and exports its own Tiled JSON. Taking existing assets into an engine is covered in using AI-generated assets in Godot.

Limits and caveats

  • Deterministic slicing guarantees the cut, not the art. Generation is probabilistic: tiles can still be mismatched at the seams and need a re-roll before production.
  • Viewpoint dimensions do not convert. A top-down set cannot be turned into an isometric set; generate it in the dimension you need.
  • Roles come from the generated set. Do not hardcode an assumed role vocabulary in a build script without reading tileset.json first.
  • The four ZIP files are relative to each other. Splitting them up breaks the references in Tiled.
  • The Arrange workspace, where tilesets become scenes, needs a large canvas and precise mouse work. Phones can browse assets and take notes only.
  • Legally generated assets can be used commercially, but you still need to check third-party rights, applicable law and AI provider restrictions. AI output is not guaranteed to be exclusive or registrable for copyright.
  • Checkout is still under review and not open yet. New accounts start with 20 credits.

FAQ

What is the magenta guide grid for?

It constrains the model to paint one cell at a time inside hollow magenta boxes. The backend then cuts along the same fixed coordinates that drew the grid, so slicing is deterministic instead of inferred from image content — empty and fully painted tiles are cut identically.

Which files are in the exported tileset ZIP?

Four: atlas.png with the tile images laid out by row and column, tileset.json as PX-Art's manifest, tileset.tsx as the Tiled tileset XML, and tileset.tmj as a preview map you can open in Tiled directly. Keep them in one folder; the references are relative.

How do I open the tileset in Tiled?

Unzip all four files into one folder and open tileset.tmj through File, Open — atlas.png and tileset.tsx resolve by relative path. For a map you already have, use Map, Add External Tileset and select tileset.tsx instead.

How do I trace a tile back to the asset it came from?

Every tile carries assetId, role, sourceRow and sourceCol both in tileset.json and as properties in tileset.tsx. Select the tile in Tiled's Tileset view and the four properties appear in the Properties panel; atlasRow and atlasCol in the JSON give its position in atlas.png.

Can I generate an isometric tileset the same way?

Yes — isometric is one of the independent viewpoint dimensions, alongside top-down, orthographic 45-degree and side view. Pick it before generating, because sets do not convert between dimensions.

What is the minimum tile set for a side-view platformer?

Interior material fill, a two-cell-wide long platform, left and right end caps, and corner and underside pieces. That is the smallest set that tiles a level without leaving visible seams at the edges.

Related

Generate a tileset you can slice with confidence

Pick a viewpoint dimension, generate against the magenta guide grid, and export a ZIP with atlas.png, tileset.json, tileset.tsx and tileset.tmj.

Create a free accountSee pricing

New accounts start with 20 credits. Checkout is still under review and not open yet.