Index of every page on this site: llms.txt
All skills
with-pebbly avatar

/tileset

@9def814
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/with-pebbly/aseprite-ai-artist/tileset

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈49 tokens for metadata: the name and description. ≈1.1k when used: this file.

Description uses 2.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈198 characters, or 2.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides instructions and tool usage examples for creating and exporting tilesets for game development. No malicious patterns, obfuscation, or unauthorized data access were detected.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 9def814. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 months ago
title
Build a tileset

README badge

README badge for with-pebbly/aseprite-ai-artist/tileset