Skip to content

Support Tiled map format features up to 1.12 #1254

@obiot

Description

@obiot

Summary

melonJS currently supports Tiled map format up to version 1.9, but with some gaps in 1.8 and 1.9 features. This issue tracks completing support for those versions and adding support for newer releases up to 1.12.

See Tiled TMX changelog and Tiled releases for full details.

Tiled 1.8 (gaps in current support)

  • repeatx/repeaty on image layers — Tiled uses boolean attributes; melonJS has the repeat string infrastructure but doesn't read these from TMX data
  • parallaxoriginx/parallaxoriginy on map — parallax origin offset not implemented
  • Custom property types (propertytype) — class-based custom property types and nested <properties> for class-type values not supported

Tiled 1.9 (gaps in current support)

  • Tile sub-rectanglesx, y, width, height attributes on <tile> elements for defining sub-regions within a tileset image
  • tilerendersize/fillmode on tilesets — controls how oversize tiles are rendered relative to the grid

Tiled 1.10 (Mar 2023)

  • Handle isCollection tileset property (renamed from collection)

Tiled 1.11 (Jun 2024)

  • Support embedded images on tilesets and image layers (inline base64 image data in TMX/TMJ)
  • Handle JSON tileset tile ordering fix (old-format .tsj files)

Tiled 1.12 (Mar 2025)

  • Capsule object shape — new geometric shape for objects (collision approximation via polygon or rounded rect)
  • Per-object opacity — individual opacity on objects (currently only layer-level)
  • List support in custom properties — properties can now be arrays, not just scalar values
  • Oblique map orientation — new orientation with X/Y axis skewing (new TMX renderer needed)
  • SVG 1.2 / CSS blending modes on layers — apply globalCompositeOperation (Canvas) or blend state (WebGL) per layer

Version tracking

A TILED_SUPPORTED_VERSION constant has been added to packages/melonjs/src/level/tiled/constants.js. A warning is now logged when a map's format version is newer than the supported version. This constant should be bumped as features above are implemented.

Priority suggestion

  1. Fix 1.8/1.9 gaps first (repeatx/repeaty, tile sub-rects, tilerendersize/fillmode)
  2. Per-object opacity & layer blend modes (easy wins, high visual impact)
  3. List properties & custom property types (avoid breaking on newer maps)
  4. Capsule shape (polygon approximation)
  5. Embedded images (self-contained maps)
  6. Oblique orientation (niche, low priority)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions