agentleFS
with-pebblywith-pebbly/aseprite-ai-artist/skills/tileset/SKILL.md

tileset

Skill473 starsChanged 45 days agoMITView on GitHub

Design seamless tiles and autotile sets, or deduplicate a hand-painted mockup into a reusable tileset, then export for Tiled or Godot. Use for level art, terrain and anything that repeats.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. RandallLiuXin/GodotMaker★ 555same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository14 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the result. cellCount against tileCount tells you how much the mockup actually reused.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build a tileset

Requires an extension advertising the tileset feature — check preflight first. Older builds answer unsupported_command loudly rather than doing nothing.

Decide the grid before anything else

The tile size is the one decision everything else depends on, and it belongs to the game, not to the art. Ask if you do not know it. 16×16 and 32×32 are the common answers.

Seamless tiles

A tile is seamless when its right edge continues into its own left edge, and its bottom into its own top.

Method that works:

  1. Draw the tile's interior first, ignoring edges.
  2. Draw the edge pattern on one side.
  3. look op="ascii" the first and last columns and make them continue into each other. This is exact work; do it in the text grid, not by eye.
  4. Same for top and bottom rows.
  5. Stamp the tile in a 3×3 block and look op="preview". Seams show up immediately when tiled; they are invisible in isolation.

Avoid a repeating feature. A distinctive rock in the middle of a grass tile becomes a visible grid the moment it repeats. Keep repeating tiles low-contrast and put the distinctive elements in occasional variant tiles.

Autotiling

A blob-47 set covers every combination of neighbours for a 4-connected terrain. It is 47 tiles, and hand-authoring them in the right order is where this goes wrong — build the terrain body first, then the edge and corner cases, then export with layout="blob47" so the exporter writes the wangset.

From a painted mockup

Painting a level by hand and extracting tiles from it produces better-looking tilesets than authoring tiles in isolation, because you see the whole picture while drawing.

  1. Paint the mockup on a normal layer, on a canvas that is a whole number of tiles in each direction. pack refuses otherwise rather than silently losing a partial edge tile.
  2. Pack it:
    tileset op="pack" layer="mockup" name="terrain" tileWidth=16 tileHeight=16
    You get a tileset plus a tilemap layer that reconstructs the mockup exactly. The mockup is hidden, not deleted — unhide it to compare if a tile looks wrong.
  3. Read the result. cellCount against tileCount tells you how much the mockup actually reused. A 400-cell mockup that yields 300 tiles was painted without regard to the grid; the tool says so, and the fix is to redraw with the grid visible, not to accept it.
  4. tolerance merges near-identical cells (per-channel difference, 0–255). It is off by default because a merge changes the art: the tilemap becomes an approximation of the mockup rather than a copy, and the result says how many cells that affected.

Export

tileset op="export" layer="terrain" format="tiled" path="…/terrain.tsj"

Writes three files: the packed PNG, the .tsj tileset, and a .tmj map that uses it — so the export opens in Tiled as a level, not just an image.

  • format="godot" writes a Godot 4 TileSet resource (.tres).
  • format="json" writes the tile grid plus the tilemap layout, for a custom engine. It states its own index convention in the file.
  • LDtk needs no exporter — it reads .aseprite directly, so just save the document.

Aseprite reserves tile index 0 for the empty tile. The exporter drops it from the atlas so engine indices line up, and index 0 becomes "no tile", which is what every engine expects.

Autotiling

tileset op="export" format="tiled" layout="blob47" path="…/terrain.tsj"

Adds a Tiled wangset for 4-connected autotiling. It assumes the 47 tiles are authored in canonical blob47 order — the 47 distinct neighbour masks in ascending order, after Aseprite's empty tile — and refuses if the set is incomplete rather than writing a wangset that autotiles wrongly. If you are not sure of the ordering, export format="json" first: it reports the index-to-mask mapping so you can check a few tiles by eye.

Related

rules://04-outlines-and-edges for edge consistency, rules://66-tiles-and-autotiling for layouts and transitions, rules://65-ground-rocks-grass and rules://67-architecture-and-interiors for the tiles themselves, rules://71-isometric for iso sets.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.