XSharp

Tile categories and reusable libraries

XSharp tile definitions use .xtileset.json files with format xsharp.tile-definitions, version 1. They reference a native tilemap by name and define category paths, stable map IDs and optional descriptive names. New projects and editable ROM/package exports generate separate definition assets. Existing projects without them still show automatic collision-based categories.

{
  "format": "xsharp.tile-definitions",
  "version": 1,
  "name": "Test terrain",
  "tilemap": "ForegroundTilemap",
  "resources": [],
  "notices": [],
  "sourceImage": null,
  "categories": [
    { "name": "Lab/Floors", "tiles": [1] },
    { "name": "Lab/Ladders", "tiles": [2, 3] }
  ],
  "names": { "1": "Test floor", "2": "Ladder", "3": "Ladder top" }
}

Category paths create parent filters (Lab includes Lab/Floors and Lab/Ladders). A tile can appear in several categories. Selecting a category never renumbers maps; painting stores their original IDs. Text filtering searches names and IDs. Automatic categories distinguish solid terrain, slopes, ladders, water/mud, hazards, conveyors, doors and decorative cells.

Entity categories similarly group Engine logic/audio/triggers/pickups/objects and per-game enemies/bosses/objects. Search and category filters combine.

Level > Edit tile categories / names edits this metadata with validation and undo. The Assets tab also exposes its external JSON source. Definitions belong to the source project’s asset list and survive save/reopen, runtime packaging and editable re-extraction. A candidate with invalid IDs or missing referenced notices/source image cannot replace a valid build.

Level > Export tile definitions creates a standalone library with separately referenced palette, indexed pixels and map JSON. Each resources element has an engine entry name and a file path relative to the definition file. Source PNG and license/credit notices travel with the library when provided. Export refuses an occupied resource directory to protect existing work.

Level > Import tile definitions reads that file and its references, validates the native resources, then adds them to the source project as one undoable transaction. Conflicting resource entry names are rejected instead of silently replacing unrelated art. The project becomes the owner of its resource paths; the imported authoring metadata uses the project’s asset manifest. Save As copies the resource set for independent editing.

The currently supported definition format is XSharp JSON. Original TSX files in third-party source folders are retained as provenance, not a claim of general Tiled/Godot format compatibility.

Included development library

Level > Load dev tiles (MegaManLove) imports the bundled sixteen-cell prototype sheet and its Development categories. The source image is preserved and the indexed conversion is checked pixel by pixel. Its source, revision, license, credits and collision adaptation are documented in the library README. The two 45-degree drawings are explicitly visual guides because the existing native slope table supports half/quarter-height slope pieces.