tilemaps

Implements Phaser 4 tilemaps from Tiled JSON with layers, collision, and tile queries.

Updated Jun 10, 2026
One-click install
npx skills add https://github.com/mudman1986/quarterless --skill tilemaps-mudman1986
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tilemaps
Source: https://github.com/mudman1986/quarterless/tree/main/.github/skills/tilemaps
Command: npx skills add https://github.com/mudman1986/quarterless --skill tilemaps-mudman1986

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building tile-based levels in Phaser 4 requires correctly wiring Tiled JSON maps, tileset images, layers, and collision flags, and small mismatches (wrong tileset names, missing collision setup, GPU layer limits) cause silent rendering or physics failures. ## Core Features & Use Cases - Tiled Map Loading: Load Tiled JSON maps, link tileset images, and create CPU or GPU tilemap layers with correct naming conventions. - Collision & Physics: Configure tile collision by index, range, property, or exclusion, and wire Arcade Physics colliders, overlaps, and tile callbacks. - Dynamic Tile Editing: Query, place, fill, randomize, and replace tiles at runtime, including coordinate conversion between world and tile space. - Use Case: Build a platformer level in Tiled, load it in a Phaser scene, enable collision on ground tiles, spawn enemies from an object layer, and let the player trigger callbacks on hazard tiles. ## Quick Start Ask the AI to load a Tiled JSON map in Phaser 4, create its layers with collision enabled, and connect a player sprite using Arcade Physics.

Frequently Asked Questions about tilemaps

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load a Tiled map in Phaser 4?

Load the map with this.load.tilemapTiledJSON and the tileset image with this.load.image in preload, then call this.add.tilemap, map.addTilesetImage, and map.createLayer in create. The tileset and layer names must match the names defined in Tiled exactly.

How do I add collision to a tilemap layer in Phaser?

Call setCollision with tile indexes, setCollisionBetween for ranges, setCollisionByProperty for Tiled custom properties, or setCollisionByExclusion on the layer. Then add this.physics.add.collider between your sprite and the layer for Arcade Physics to resolve collisions.

What is the difference between TilemapLayer and TilemapGPULayer in Phaser 4?

TilemapGPULayer is a WebGL-only layer that renders the whole layer as one quad via a shader, but it supports only orthographic maps and a single tileset per layer. TilemapLayer supports multiple tilesets and isometric, hexagonal, and staggered orientations.

Why is my Phaser tilemap layer not rendering or returning null?

The most common cause is a mismatch between the tileset or layer name in your code and the names defined in Tiled, which makes addTilesetImage or createLayer return null. Also note each layer can only be created once, and group layer children use a 'GroupName/LayerName' prefix.

Why don't my tile edits show up on a TilemapGPULayer?

TilemapGPULayer does not automatically refresh after edits like putTileAt. You must call generateLayerDataTexture() after modifying tiles so the GPU data texture is regenerated and the changes become visible.

Does Phaser 4 support Tiled collection of images tilesets?

No, the Phaser Tiled parser does not support Collection of Images tilesets. All tiles in a tileset must come from a single tileset image, and tilesets must be embedded in the exported JSON.