tilemaps

Load Tiled JSON maps, create layers, and configure collisions in Phaser 4.

Updated Jun 21, 2021
One-click install
npx skills add https://github.com/mahirocoko/mahirocoko --skill tilemaps-mahirocoko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tilemaps
Source: https://github.com/mahirocoko/mahirocoko/tree/main/plugins/phaser/skills/tilemaps
Command: npx skills add https://github.com/mahirocoko/mahirocoko --skill tilemaps-mahirocoko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manages the complexity of creating, rendering, and interacting with tile-based maps in Phaser 4 by handling loading from Tiled JSON, tileset linkage, layer creation, and collision setup.

Core Features & Use Cases

  • Load Tiled JSON maps and tilesets and create one or more tilemap layers.
  • Configure per-tile collisions, various map orientations (orthogonal, isometric, hexagonal, staggered), and tile properties for gameplay.
  • Optional GPU rendering with TilemapGPULayer for large maps and performance gains in demanding games.

Quick Start

Load a Tiled JSON map and its tileset, create a tilemap layer, and enable collision on selected tiles.

Frequently Asked Questions about tilemaps

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

FAQPage Schema
How do I load Tiled JSON files and set up collisions in Phaser?

Loading Tiled JSON maps in Phaser involves importing the map data, linking tilesets, creating tilemap layers, and configuring per-tile collisions to enable gameplay interactions and physics boundaries.

Can I render isometric or hexagonal tilemaps using Phaser 4?

Phaser 4 supports rendering orthogonal, isometric, hexagonal, and staggered tilemap orientations, allowing you to build diverse game environments by loading Tiled JSON data and configuring layer orientations accordingly.

What is the best way to improve performance for large tilemaps in Phaser?

Using TilemapGPULayer for GPU-based rendering is the best way to improve large tilemap performance in Phaser, delivering performance gains for demanding games by offloading rendering tasks to the GPU.

Do I need Tiled to create tilemaps for my Phaser game?

You need Tiled to design and export maps as Tiled JSON, which this Skill then loads into Phaser 4 by linking tilesets and creating layers to render the tilemap in your game.

Does this approach support dynamic tiles and camera culling for tile-based maps?

Yes, it supports dynamic tiles and camera culling for tile-based maps, handling rendering and interaction for maps that require dynamic tile updates and optimized viewport culling in Phaser 4.