Game Asset Generator
htdt/godogen
Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.
A skill your agent uses when working with tilemaps in Phaser 4.
$ npx skills add autonomous-ai/openharness --skill tilemaps -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install autonomous-ai/openharness tilemaps --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/store/agents/phaser/skills/tilemaps .claude/skills/tilemaps && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "tilemaps" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tilemaps into .claude/skills/tilemaps/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilemaps", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tilemapsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add autonomous-ai/openharness --skill tilemaps -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install autonomous-ai/openharness tilemaps --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/store/agents/phaser/skills/tilemaps .agents/skills/tilemaps && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "tilemaps" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tilemaps into .agents/skills/tilemaps/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilemaps", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add autonomous-ai/openharness --skill tilemaps -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install autonomous-ai/openharness tilemaps --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/store/agents/phaser/skills/tilemaps .cursor/skills/tilemaps && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "tilemaps" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tilemaps into .cursor/skills/tilemaps/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilemaps", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/autonomous-ai/openharness.git --path store/agents/phaser/skills/tilemaps--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add autonomous-ai/openharness --skill tilemaps -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install autonomous-ai/openharness tilemaps --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/store/agents/phaser/skills/tilemaps .gemini/skills/tilemaps && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "tilemaps" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tilemaps into .gemini/skills/tilemaps/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilemaps", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install autonomous-ai/openharness tilemapsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add autonomous-ai/openharness --skill tilemaps -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .github/skills && cp -r skills-src/store/agents/phaser/skills/tilemaps .github/skills/tilemaps && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "tilemaps" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tilemaps into .github/skills/tilemaps/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilemaps", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add autonomous-ai/openharness --skill tilemaps -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install autonomous-ai/openharness tilemaps --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/autonomous-ai/openharness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/store/agents/phaser/skills/tilemaps .opencode/skills/tilemaps && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "tilemaps" agent skill from https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/tilemaps into .opencode/skills/tilemaps/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilemaps", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
tilemapsA skill your agent uses when working with tilemaps in Phaser 4.
Tilemaps is an agent skill from autonomous-ai/openharness. Use this skill when working with tilemaps in Phaser 4. Covers loading Tiled JSON maps, creating tilemap layers, tile collision, dynamic tiles, tile properties, and tilemap camera culling. Triggers on: Tilemap, Tiled, tilemap layer, tile collision, tile properties.
Its SKILL.md is about 4.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Game Development, covering Sprites and pixel art. The repository describes itself as: The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across… The licence is MIT.
11 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 54a1f1b. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Tilemaps loads about 4.9k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 1,353 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from autonomous-ai/openharness at commit 54a1f1b, republished under its MIT licence (© autonomous-ai). 1,353 words, ~4,883 tokens.
.claude/skills/tilemaps/SKILL.md (or your agent's skills folder).Phaser Tilemaps render tile-based levels from Tiled JSON, CSV, or raw 2D arrays. A
Tilemapholds parsed map data and provides methods to add tilesets, create layers, set collision, and query tiles. Layers (TilemapLayerorTilemapGPULayer) are the Game Objects that actually render tiles. Phaser supports orthogonal, isometric, hexagonal, and staggered maps.
Key source paths: src/tilemaps/Tilemap.js, src/tilemaps/TilemapLayer.js, src/tilemaps/TilemapGPULayer.js, src/tilemaps/TilemapLayerBase.js, src/tilemaps/Tile.js, src/tilemaps/Tileset.js, src/tilemaps/TilemapFactory.js, src/tilemaps/components/, src/tilemaps/parsers/tiled/
Related skills: ../loading-assets/SKILL.md, ../sprites-and-images/SKILL.md
class GameScene extends Phaser.Scene {
preload() {
// Load the Tiled JSON and the tileset image
this.load.tilemapTiledJSON('map', 'assets/level1.json');
this.load.image('tiles', 'assets/tilesheet.png');
}
create() {
// Create the tilemap from cached JSON
const map = this.add.tilemap('map');
// Link the tileset image to the tileset name used in Tiled
const tileset = map.addTilesetImage('tilesheet', 'tiles');
// Create a layer - layerID must match the layer name in Tiled
const ground = map.createLayer('Ground', tileset);
// Enable collision on specific tile indexes
ground.setCollision([1, 2, 3]);
}
}The flow is always: load JSON + image, create tilemap, add tileset image, create layer(s), set collision.
A Tilemap is a data container, not a display object. It stores parsed map data (layers, tilesets, objects) and provides methods that operate on them. A TilemapLayer or TilemapGPULayer is the actual Game Object added to the display list that renders tiles.
const map = this.add.tilemap('map'); // Data container (not rendered)
const layer = map.createLayer('Ground', tileset); // Game Object (rendered)this.add.tilemap(key) is a factory registered on GameObjectFactory. It delegates to ParseToTilemap which reads from the cache and returns a Tilemap instance.
A Tileset (src/tilemaps/Tileset.js) links a tileset name (from Tiled) to a loaded texture. It stores firstgid, tile dimensions, margin, and spacing.
// tilesetName: the name in Tiled's tileset panel
// key: the Phaser texture key (defaults to tilesetName if omitted)
const tileset = map.addTilesetImage('tilesetName', 'textureKey');
// Override tile dimensions, margin, and spacing if needed
const tileset = map.addTilesetImage('name', 'key', 16, 16, 1, 2);addTilesetImage(tilesetName, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid, tileOffset) - If the tileset name already exists in the parsed map data, it updates the existing Tileset object with the texture. If not (non-Tiled maps), it creates a new Tileset.
Important: The Phaser Tiled parser does not support "Collection of Images" tilesets. All tiles must be in a single tileset image per tileset.
Each cell in a layer is a Tile object (src/tilemaps/Tile.js). Key properties:
index - tile index in the tileset (-1 for empty)x, y - tile coordinates (in tiles, not pixels)pixelX, pixelY - pixel position relative to layer originwidth, height - tile size in pixelsproperties - custom properties from Tiled (object)collideLeft, collideRight, collideUp, collideDown - per-edge collision flagsfaceLeft, faceRight, faceTop, faceBottom - interesting face flags for collision optimizationcollisionCallback - per-tile collision callback functiontint - tint color value (default 0xffffff)tintMode - tint blend mode (default TintModes.MULTIPLY)rotation - rotation anglephysics - object for physics-engine-specific data (e.g. bodies)alpha, visible, flipX, flipY - inherited from mixinsTilemapGPULayer is a high-performance WebGL-only alternative to TilemapLayer. It renders the entire layer as a single quad using a shader, making it almost entirely GPU-bound.
// Pass gpu: true as the 5th argument to createLayer
const layer = map.createLayer('Ground', tileset, 0, 0, true);Capabilities:
Restrictions:
generateLayerDataTexture() after modifying tiles.// If you edit tiles on a GPU layer, regenerate the data texture:
gpuLayer.putTileAt(5, 10, 10);
gpuLayer.generateLayerDataTexture();Both TilemapLayer and TilemapGPULayer extend TilemapLayerBase (src/tilemaps/TilemapLayerBase.js), which extends GameObject. The base class provides all tile query, manipulation, and collision methods. It includes these component mixins: Alpha, BlendMode, ComputedSize, Depth, ElapseTimer, Flip, GetBounds, Lighting, Mask, Origin, RenderNodes, Transform, Visible, ScrollFactor, and Arcade Physics Collision.
preload() {
this.load.tilemapTiledJSON('map', 'assets/map.json');
this.load.image('tiles', 'assets/tileset.png');
}
create() {
const map = this.add.tilemap('map');
const tileset = map.addTilesetImage('TilesetNameInTiled', 'tiles');
const layer = map.createLayer('LayerNameInTiled', tileset);
}The layerID passed to createLayer must match the layer name in Tiled exactly. Group layer children are flattened with a 'ParentGroup/Layer' naming convention.
const map = this.add.tilemap('map');
const tileset = map.addTilesetImage('terrain', 'terrain-img');
const background = map.createLayer('Background', tileset);
const ground = map.createLayer('Ground', tileset);
const foreground = map.createLayer('Foreground', tileset);
// Layers are rendered in creation order. Use depth for finer control:
foreground.setDepth(10);A layer can use multiple tilesets (CPU layer only):
const tiles1 = map.addTilesetImage('terrain', 'terrain-img');
const tiles2 = map.addTilesetImage('objects', 'objects-img');
const layer = map.createLayer('Ground', [tiles1, tiles2]);const map = this.add.tilemap('map');
const tileset = map.addTilesetImage('terrain', 'terrain-img');
// createBlankLayer(name, tileset, x, y, width, height, tileWidth, tileHeight)
const layer = map.createBlankLayer('dynamic', tileset, 0, 0, 50, 50, 32, 32);
// Fill it with tiles
layer.fill(1); // Fill entire layer with tile index 1
layer.putTileAt(5, 10, 10); // Place tile index 5 at tile coord (10, 10)There are several ways to enable tile collision for Arcade Physics:
// By specific tile indexes
layer.setCollision([1, 2, 3]);
// By range (inclusive)
layer.setCollisionBetween(1, 50);
// By tile property (set in Tiled's tileset editor)
layer.setCollisionByProperty({ collides: true });
// Supports arrays: { type: ['stone', 'lava'] }
// By exclusion - collide on ALL tiles except these
layer.setCollisionByExclusion([-1, 0]); // -1 is empty, 0 is often background
// From Tiled collision editor shapes
layer.setCollisionFromCollisionGroup();All collision methods on TilemapLayerBase mirror methods on Tilemap but don't require a layer parameter. On the Tilemap, you can pass a layer reference or use the "current layer":
map.setLayer('Ground');
map.setCollision([1, 2, 3]); // Applies to current layer
// Or specify a layer explicitly:
map.setCollision([1, 2, 3], true, true, 'Ground');// Enable collisions between a sprite and a tilemap layer
this.physics.add.collider(player, groundLayer);
// With a callback
this.physics.add.collider(player, groundLayer, (sprite, tile) => {
if (tile.index === 5) {
// Hit a special tile
}
});
// Overlap detection instead of collision
this.physics.add.overlap(player, groundLayer, (sprite, tile) => {
// Player is overlapping this tile
});The layer must have collision set on its tiles (via setCollision* methods) for physics to detect them. The layer itself has collisionCategory and collisionMask properties for collision filtering.
Tiles can have custom properties set in Tiled's tileset editor:
// Access tile properties
const tile = layer.getTileAt(10, 5);
console.log(tile.properties.damage); // Custom property from Tiled
console.log(tile.properties.type); // Custom property from Tiled
// Set collision based on custom properties
layer.setCollisionByProperty({ collides: true });
layer.setCollisionByProperty({ type: ['wall', 'rock'] });// Callback by tile index - fires when physics body overlaps these tiles
map.setTileIndexCallback([5, 6, 7], (sprite, tile) => {
// Called for tiles with index 5, 6, or 7
console.log('Hit tile', tile.index, 'at', tile.x, tile.y);
}, this);
// Callback by tile location - fires for tiles in a rectangular area
map.setTileLocationCallback(10, 10, 5, 5, (sprite, tile) => {
// Called for any tile in the 5x5 region starting at (10, 10)
}, this);
// Per-tile callback
const tile = layer.getTileAt(10, 5);
tile.collisionCallback = (sprite, tile) => {
// Custom logic for this specific tile
};Tile callbacks require an active physics collider/overlap between the body and the layer.
const tile = layer.getTileAt(10, 5); // By tile coords (or null)
const tile = layer.getTileAt(10, 5, true); // nonNull: Tile with index -1 instead of null
const tile = layer.getTileAtWorldXY(worldX, worldY); // By world coords
const exists = layer.hasTileAt(10, 5); // Boolean check
// Region queries
const tiles = layer.getTilesWithin(0, 0, 10, 10); // Tile coord region
const tiles = layer.getTilesWithinWorldXY(x, y, w, h); // World coord region
const tiles = layer.getTilesWithinShape(circle); // Shape overlap
// Functional queries
const water = layer.filterTiles(t => t.properties.type === 'water');
const spawn = layer.findTile(t => t.properties.isSpawn);
layer.forEachTile(t => { /* iterate all tiles */ });layer.putTileAt(5, 10, 10); // Place tile index 5 at (10, 10)
layer.putTileAtWorldXY(5, worldX, worldY); // Place by world coords
layer.putTilesAt([[1, 2], [3, 4]], 10, 10); // Place a 2x2 grid
layer.removeTileAt(10, 10); // Remove tile
layer.fill(1, 0, 0, 10, 10); // Fill 10x10 region with index 1
layer.replaceByIndex(5, 10); // Replace all index-5 with index-10
layer.copy(0, 0, 5, 5, 20, 20); // Copy 5x5 from (0,0) to (20,20)
layer.randomize(0, 0, 10, 10, [1, 2, 3, 4]); // Random tiles in region
layer.weightedRandomize([{ index: 1, weight: 4 }, { index: 2, weight: 1 }], 0, 0, 10, 10);
layer.shuffle(0, 0, 10, 10); // Shuffle tiles in regionconst tileXY = layer.worldToTileXY(worldX, worldY); // World -> tile coords
const worldXY = layer.tileToWorldXY(tileX, tileY); // Tile -> world coords
// Reuse a vector to avoid allocation
const vec = new Phaser.Math.Vector2();
layer.worldToTileXY(worldX, worldY, true, vec); // snapToFloor = trueTiled object layers define points, rectangles, and sprite placement. Use createFromObjects on the Tilemap:
// Create sprites from all objects on the 'Enemies' object layer
const enemies = map.createFromObjects('Enemies', {
gid: 26, // Match by tile GID
classType: Enemy // Custom class extending Sprite
});
// Match by name
const coins = map.createFromObjects('Items', {
name: 'coin',
key: 'coin-texture',
frame: 0
});
// Match by type
const spawns = map.createFromObjects('Spawns', {
type: 'player-spawn'
});
// Access raw object layer data
const objectLayer = map.getObjectLayer('Enemies');
objectLayer.objects.forEach(obj => {
console.log(obj.name, obj.x, obj.y, obj.properties);
});createFromObjects(layerName, config, useTileset) config options: id, gid, name, type, classType (default Sprite), scene, container, key, frame, ignoreTileset.
Tile animations are defined in Tiled's tileset editor and parsed automatically. Both TilemapLayer and TilemapGPULayer support animated tiles. The TilemapLayerBase uses ElapseTimer to track animation time via preUpdate.
// Isometric map
const map = this.add.tilemap('iso-map');
const tileset = map.addTilesetImage('iso-tiles', 'iso-img');
const layer = map.createLayer('Ground', tileset);
// Get tile at world coords in isometric space
const tile = layer.getIsoTileAtWorldXY(worldX, worldY);
// TilemapGPULayer does NOT support iso/hex/staggered - use TilemapLayerThe map orientation property is set from Tiled data. Coordinate conversion functions are automatically selected based on orientation.
| Method | Description |
|---|---|
addTilesetImage(name, key, tw, th, margin, spacing, gid, offset) | Link tileset name to texture |
createLayer(layerID, tileset, x, y, gpu) | Create layer (gpu=true for GPU layer) |
createBlankLayer(name, tileset, x, y, w, h, tw, th) | Create empty layer for procedural maps |
createFromObjects(layerName, config, useTileset) | Convert Tiled objects to Sprites |
getObjectLayer(name) | Get raw object layer data |
setLayer(layer) | Set current active layer for shorthand methods |
Most tile query/collision/manipulation methods exist on both Tilemap (with extra layer param) and TilemapLayerBase (without). Prefer calling on the layer directly.
Collision:
setCollision(indexes), setCollisionBetween(start, stop), setCollisionByProperty(props), setCollisionByExclusion(indexes), setCollisionFromCollisionGroup(), setTileIndexCallback(indexes, cb, ctx), setTileLocationCallback(x, y, w, h, cb, ctx)
Tile queries:
getTileAt(x, y, nonNull), getTileAtWorldXY(wx, wy, nonNull, cam), getTilesWithin(x, y, w, h, opts), getTilesWithinWorldXY(wx, wy, w, h, opts, cam), getTilesWithinShape(shape, opts, cam), hasTileAt(x, y), hasTileAtWorldXY(wx, wy, cam), filterTiles(cb), findTile(cb), forEachTile(cb)
Tile manipulation:
putTileAt(tile, x, y), putTileAtWorldXY(tile, wx, wy), putTilesAt(arr, x, y), removeTileAt(x, y), fill(index, x, y, w, h), copy(sx, sy, w, h, dx, dy), randomize(x, y, w, h, indexes), weightedRandomize(weights, x, y, w, h), shuffle(x, y, w, h), swapByIndex(a, b), replaceByIndex(find, replace), createFromTiles(indexes, replacements, config)
Coordinates:
worldToTileXY(wx, wy, snap, vec, cam), tileToWorldXY(tx, ty, vec, cam)
| Method | Description |
|---|---|
generateLayerDataTexture() | Regenerate GPU texture after tile edits |
index (number, -1=empty), x/y (tile coords), pixelX/pixelY (pixel pos relative to layer), width/height, properties (object from Tiled), collideLeft/Right/Up/Down (boolean), collisionCallback (function), tint (number), rotation (number), alpha, flipX/flipY, physics (object for engine data)
Tileset name must match Tiled exactly. The first argument to addTilesetImage is the tileset name as defined in Tiled, not the Phaser texture key. If they don't match, you get null back and a console warning.
Layer name must match Tiled exactly. createLayer takes the layer name from Tiled (or layer index). Group layer children are prefixed with 'GroupName/LayerName'.
Each layer can only be created once. Calling createLayer with the same layer ID twice returns null with a warning. The layer data can only be associated with one layer Game Object.
setCollision must be called before physics colliders work. Without marking tiles as collidable, this.physics.add.collider() will pass through all tiles.
TilemapGPULayer is orthographic only. It does not support isometric, hexagonal, or staggered maps. It also only supports a single tileset per layer.
TilemapGPULayer requires manual texture regeneration. After calling putTileAt or other edit methods, call generateLayerDataTexture() or the changes won't appear.
"Collection of Images" tilesets are not supported. The Tiled parser requires all tiles in a tileset to be in a single image. Embedded tilesets in the exported JSON are required.
Tile index -1 means empty. Many methods return null for empty tiles by default. Pass nonNull: true to get a Tile object with index === -1 instead.
insertNull in tilemap factory. When creating a tilemap, insertNull: true stores null for empty tiles instead of Tile objects with index -1. Saves memory for large sparse maps but prevents dynamic tile placement in empty cells.
Tile callbacks only fire with active physics. setTileIndexCallback and setTileLocationCallback require a physics collider or overlap between the body and the layer to trigger.
Layer position and Tiled offset. If x and y are not specified in createLayer, they default to the layer offset defined in Tiled, not (0, 0).
| File | Purpose |
|---|---|
src/tilemaps/Tilemap.js | Main data container with all map-level methods |
src/tilemaps/TilemapFactory.js | Registers this.add.tilemap() on GameObjectFactory |
src/tilemaps/TilemapLayerBase.js | Shared base for CPU and GPU layers (extends GameObject) |
src/tilemaps/TilemapLayer.js | CPU-rendered layer (multi-tileset, all orientations) |
src/tilemaps/TilemapGPULayer.js | GPU-accelerated layer (v4, WebGL, orthographic, single tileset) |
src/tilemaps/Tile.js | Individual tile data (index, position, collision, properties) |
src/tilemaps/Tileset.js | Tileset data (name, firstgid, dimensions, image) |
src/tilemaps/components/ | Pure functions: SetCollision, GetTileAt, PutTileAt, SetTileIndexCallback, etc. |
src/tilemaps/parsers/tiled/ | Tiled JSON parsers: ParseJSONTiled, ParseTileLayers, ParseObjectLayers, ParseTilesets, BuildTilesetIndex |
src/tilemaps/ParseToTilemap.js | Orchestrates parsing and Tilemap creation |
src/tilemaps/mapdata/LayerData.js | Layer data structure |
© autonomous-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in store/agents/phaser/skills/tilemaps of autonomous-ai/openharness.
Open the folder on GitHubat commit 54a1f1b
Tilemaps next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Tilemaps this skillautonomous-ai/openharness | 1.1k | — | ~4.9k | Automated safety check: Pass | MIT | |
| Game Asset Generatorhtdt/godogen | 7.1k | — | ~2.8k | Automated safety check: Pass | MIT | |
| Code-Drawn 2D Game Art0x0funky/agent-sprite-forge | 4.3k | — | ~2.5k | Automated safety check: Pass | MIT | |
| Sprite Genaldegad/sprite-gen | 2.6k | — | ~4.4k | Automated safety check: Pass | Apache-2.0 | |
| Pixel Artmateaix/mateclaw | 1.1k | 5 repos | ~1.8k | Automated safety check: Pass | Apache-2.0 | |
| Asset Pipelinerehan-remade/universal-modder | 4.7k | — | ~2k | Automated safety check: Pass | MIT |
htdt/godogen
Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.
0x0funky/agent-sprite-forge
Draws 2D game art from code with no image model: pixel sprites, SVG props and icons, rigged characters, FX, autotiles and layouts, only when explicitly asked for.
aldegad/sprite-gen
Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation.
mateaix/mateclaw
Pixel art w/ era palettes (NES, Game Boy, PICO-8). An agent skill from mateaix/mateclaw.
rehan-remade/universal-modder
Turn generated or hand-made art into exactly what a game engine loads.
crafter-station/petdex
Browse, install, submit, and edit pixel-art pets with the Petdex CLI.
autonomous-ai/openharness
Slices 3D mesh files into printer-profiled plain G-code through real slicer CLIs, with backend discovery, input inspection, dry runs and static validation.
autonomous-ai/openharness
Turns a home-automation request into standard, testable automations.yaml, run against Home Assistant Core's real triggers and verified with its own trace tool.
autonomous-ai/openharness
Turns a musical brief into LilyPond concert-pitch music, checked parts for each instrument and a playable practice pack.
autonomous-ai/openharness
Turns an STL and explicit printer and material requirements into compared OrcaSlicer plans, an editable 3MF project, checked G-code and a portable handoff.
autonomous-ai/openharness
Builds an editable DOCX report, a formula-driven XLSX workbook and a fresh LibreOffice PDF preview from one structured source file, then checks them together.
autonomous-ai/openharness
Dry-run, upload, and cautiously initiate local Bambu Lab print jobs from validated plain .gcode, using Bambu LAN FTPS/MQTT handoffs.
Categories
A skill your agent uses when working with tilemaps in Phaser 4. Tilemaps is an agent skill from autonomous-ai/openharness. Use this skill when working with tilemaps in Phaser 4.
Tilemaps fits situations like: working with tilemaps in Phaser 4; tile properties.
Run `npx skills add autonomous-ai/openharness --skill tilemaps -a claude-code`. Or copy the skill folder (store/agents/phaser/skills/tilemaps in autonomous-ai/openharness) into .claude/skills/tilemaps in your project. Claude Code loads it when a task matches its description.
Run `npx skills add autonomous-ai/openharness --skill tilemaps -a codex`. Or copy the skill folder (store/agents/phaser/skills/tilemaps in autonomous-ai/openharness) into .agents/skills/tilemaps in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add autonomous-ai/openharness --skill tilemaps -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tilemaps, .gemini/skills/tilemaps, .github/skills/tilemaps and .opencode/skills/tilemaps in your project.
SKILL.md names no scripts, command-line tools or credentials: Tilemaps is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Tilemaps is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.9k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Tilemaps: Game Asset Generator (htdt/godogen, 7.1k stars), Code-Drawn 2D Game Art (0x0funky/agent-sprite-forge, 4.3k stars), Sprite Gen (aldegad/sprite-gen, 2.6k stars) and Pixel Art (mateaix/mateclaw, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
autonomous-ai (a GitHub organization) maintains it in autonomous-ai/openharness, which has 1,137 GitHub stars. The repository holds 99 skills in this directory. The repository was last updated on October 7, 2026.
Source: autonomous-ai/openharness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.