Skip to content
phaserjs avatar

Tilemaps

Phaser 4 tilemap guide covering Tiled JSON loading, layers, tile collision, and GPU-accelerated rendering.

CCM score
74 of 100
skills.sh installs
1.3K
GitHub stars
40.8K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers loading Tiled JSON maps, creating tilemap and blank layers, tile collision, dynamic tiles, tile properties, and camera culling
  • Explains the split between the Tilemap data container and TilemapLayer or TilemapGPULayer render objects, with addTilesetImage and createLayer usage
  • Documents collision setup through setCollision, setCollisionBetween, setCollisionByProperty, and setCollisionByExclusion, plus per-tile Tile fields
  • Designed for Phaser 4 developers building tile-based levels from Tiled JSON, with WebGL-only TilemapGPULayer limits noted

Install

$ npx -y skills add phaserjs/phaser --skill tilemaps -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Tilemaps

Phaser Tilemaps render tile-based levels from Tiled JSON, CSV, or raw 2D arrays. A Tilemap holds parsed map data and provides methods to add tilesets, create layers, set collision, and query tiles. Layers (TilemapLayer or TilemapGPULayer) 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

Quick Start

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');

Details

Repository
github.com/phaserjs/phaser
Categories
Game Development, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the Phaser tilemaps skill help with?

The tilemaps skill covers working with tilemaps in Phaser 4, including loading Tiled JSON maps, creating tilemap layers, tile collision, dynamic tiles, tile properties, and tilemap camera culling. It also explains the difference between a Tilemap data container and the TilemapLayer or TilemapGPULayer objects that render tiles.

How do I install the Phaser tilemaps skill?

Run npx -y skills add phaserjs/phaser --skill tilemaps -y in your project. Once installed, the agent gains knowledge of Phaser tilemap loading, layers, collision setup and tile properties.

Does the skill support Tiled maps with collision and tile properties?

Yes, the skill covers loading Tiled JSON maps, tile collision and tile properties. It describes several ways to enable collision, including by tile index, by range, by tile property and from Tiled collision editor shapes.

Which other skills are in the Game Development category?

In the Game Development category, the tilemaps skill sits alongside higgsfield-game-generation, game-feel, game-ui-ux, godot-gdscript-patterns and level-design. Its focus is narrower than level-design, centered on Phaser's tilemap API.

More from phaserjs/phaser

All 8

Similar to Tilemaps

More Game Development