SkillsReviewed · melonjs

melonjs-tilemaps

melonjs-tilemaps is an assistant skill for developers building melonJS games with Tiled maps, but its supported engine version range is unstated. It covers level loading, object registration, runtime tile editing, collision geometry, camera bounds and rendering pitfalls.

Researched 17 Nov 2026

In short.

melonjs-tilemaps is an assistant skill for developers integrating Tiled maps into melonJS games, but its guidance requires engine APIs whose supported version range is not specified. Its practical value is in explaining easily confused behaviors: awaiting level loading requires an explicit option, tile editing uses grid coordinates and global tile IDs, and changing visible tiles does not change collision geometry. It also covers object factories, infinite maps, sorting and rendering fallbacks. No installation, example or runtime behavior was executed or tested.

Researched and written by an AI model and checked by a second AI model. How it works

The supplied manifest marks packages/melonjs/skills/melonjs-tilemaps as completely captured and lists one selected file, SKILL.md. Repository-root LICENSE.md is included as an associated notice outside that folder. Coverage is limited to those two supplied texts at revision 1ce6df054dc7b9dfc59b55f00818e4070cd8660b. Engine source, related skills, plugin implementation, map assets and assistant integration are outside the supplied evidence. Nothing was executed; installation, compatibility, runtime correctness and performance remain unverified.

The overview

Identity

melonjs-tilemaps is a task-specific assistant instruction file in packages/melonjs/skills/melonjs-tilemaps within the melonjs/melonJS repository. Its metadata names the skill, declares an MIT licence and describes tasks that should invoke it, including Tiled maps, tile editing, object registration and level loading.

The original resource folder is [https://github.com/melonjs/melonJS/tree/master/packages/melonjs/skills/melonjs-tilemaps]. The supplied snapshot contains one selected file, SKILL.md, with a repository-root licence notice supplied alongside it.

Assessment

The skill is useful as a focused companion for an assistant working on a melonJS project. It combines implementation examples with specific failure explanations, including maps that appear empty after loading, objects that lose their intended behavior, incorrect tile coordinates and scenery that overlaps characters incorrectly.

Its strongest feature is explaining API contracts and their consequences rather than merely listing methods. Compatibility with a particular installed melonJS release remains unassessed because no supported-version matrix or execution results are supplied.

Users

The best fit is a developer using an assistant to build or maintain a melonJS game whose levels are authored in Tiled. Beginners get explanations of grid coordinates, asset dependencies and collision layers; experienced developers get details about factory precedence, asynchronous loading, multiple application instances and rendering eligibility.

The examples assume familiarity with JavaScript or TypeScript and access to a game project. The file concentrates on map integration rather than teaching programming or providing a complete first-game tutorial.

Capabilities

The documented coverage includes map and tileset loading, level transitions, Tiled object classes and factories, inherited tile properties, runtime tile queries and edits, map properties, camera bounds and collision shapes. It addresses orthogonal, isometric, hexagonal, staggered and oblique maps, including infinite maps with negative tile coordinates.

It also explains parallax image layers, object sorting and the shader, prerender and perTile rendering paths. Troubleshooting connects symptoms to concrete causes, such as missing external tilesets, compressed layer data without a decompression plugin and visual tile changes that leave collision geometry unchanged.

Using it

Requirements

Following the examples requires melonJS and suitable map data, typically authored in Tiled. Referenced external tilesets and images must also be available. The loader uses asset types tmx and tsx even when the files are JSON exports with extensions such as .tmj and .tsj.

XML maps and tilesets require DOMParser. The skill directs developers working without it, including Web Workers, to use JSON exports for both maps and external tilesets. gzip, zlib and zstd layer compression requires @melonjs/tiled-inflate-plugin; uncompressed base64 and CSV data do not.

The GPU tile-layer shader path requires a capable WebGL 2 or WebGPU renderer and an eligible orthogonal layer. No assistant client, model, installation location or minimum melonJS version is specified.

Mechanism

The resource supplies task-matching metadata, explanatory instructions, JavaScript and TypeScript examples, and a symptom-to-cause reference. Its guidance follows the path from Tiled assets through the loader and level director to objects and tile layers in the game world.

A central documented behavior is that level.load can defer loading while the game loop runs. Without async: true, it returns a boolean, so awaiting the default call does not wait for the world to be populated. Passing an explicit container also avoids relying on the application that most recently finished initialization.

For object creation, the documented lookup order is object class, object name, tile class where applicable, then structural fallbacks. Runtime tile access distinguishes column-and-row coordinates from world pixels, while tile construction requires global IDs rather than Tiled's local tileset IDs.

Setup

The file supplies no assistant-specific installation procedure. Its game setup begins with preloading the map, external tilesets and tileset images. Compressed maps additionally require registering TiledInflatePlugin before preloading.

Register custom Tiled object classes before loading the level. In a Stage, the documented explicit target is this.app.world. When subsequent code needs loaded objects, use level.load with async: true or the supplied completion callback or event.

For solid world geometry, author shapes on an object layer whose name contains collision. The automatic world-shape treatment applies to unnamed objects; named objects retain the behavior assigned by their factory.

Example

An illustrative task is lighting a floor panel during play. After preloading the assets, await level.load("map1", { container: this.app.world, async: true }), then retrieve the tile layer named ground through this.app.world.getChildByName("ground")[0].

The documented approach finds the replacement tile's global ID from a tileset property such as kind, creates a tile with board.getTileById(gid, col, row), and places it with board.setTile(tile, col, row). This assumes that the layer and requested property value exist. The visible cell changes, but collision geometry requires separate handling. This example was not executed.

Assessment & evidence

Limitations

The skill documents several important boundaries: tile editing changes the visible grid rather than collision shapes; y-sorting orders objects rather than individual tiles; and overlapping scenery must share the appropriate object layer with characters. Frequently edited layers can also incur expensive rebaking when prerendering is enabled.

The shader rendering path has restrictions involving orientation, renderer capabilities, tileset layout and tile overflow. The file describes slower fallback behavior but provides no measured benchmark or hardware comparison.

Engine implementation, dependency behavior and release compatibility were not independently verified. No assistant integration, map loading, rendering, collision or performance test was run.

Reasoning

The fit assessment rests on the specificity of the documented contracts. Distinguishing a returned boolean from completed loading, local tile IDs from global IDs, and drawn tiles from physical geometry gives an assistant concrete constraints for implementation and debugging. This supports using the skill for focused melonJS map work; it does not establish that an assistant will follow it correctly or that every example matches a particular release.

Alternatives

The file points to melonjs-loading-assets for asset bundles, melonjs-physics for collision behavior, and melonjs-getting-started for preloading and asset types. These are related resources for narrower or adjacent needs, but their contents are not supplied. No evidence supports a quality, compatibility or performance comparison with another tilemap skill or game engine.

Evidence

The technical source is the captured SKILL.md at revision 1ce6df054dc7b9dfc59b55f00818e4070cd8660b, available at [https://raw.githubusercontent.com/melonjs/melonJS/1ce6df054dc7b9dfc59b55f00818e4070cd8660b/packages/melonjs/skills/melonjs-tilemaps/SKILL.md]. Its supplied SHA-256 is 5af9dfeb119e21746612f622072d49515991923ce49ce5a11358d399ada804ec.

The accompanying rights source is [https://raw.githubusercontent.com/melonjs/melonJS/1ce6df054dc7b9dfc59b55f00818e4070cd8660b/LICENSE.md]. These texts establish the documented instructions and licence terms. They do not establish successful execution, benchmark results or behavior across engine releases.

Access & freshness

Costs

The supplied material gives no purchase price, subscription price, assistant usage charge or implementation estimate. The MIT notice grants its software permissions free of charge, but this does not establish the total cost of using an assistant, developing a game, acquiring assets or hosting it. Those costs remain unknown.

Rights

The skill declares MIT in its metadata. The supplied repository LICENSE.md grants permission to use, copy, modify, publish, distribute, sublicense and sell copies, subject to retaining the copyright and permission notices in copies or substantial portions.

The notice identifies Olivier Biot (AltByte Pte Ltd), with copyright years 2011–2023, and disclaims warranties and liability. It does not establish rights to separately obtained game art, maps or other third-party material.

Freshness

The supplied snapshot was captured on 2026-11-17 at 07:19:42.983 UTC and is tied to the stated commit. The master-branch folder address is a moving reference, so its current contents are unknown.

The text references legacy API deprecation since 18.0.0 and particular fixes associated with 20.12, 20.13 and 20.14. Those references provide compatibility context, but they do not establish a supported release range or identify the latest available melonJS version.

Actions

Before adopting the guidance, identify the project's melonJS version and confirm that the named APIs are available. Check the map export format, referenced assets and compression settings. Use JSON maps and tilesets where DOMParser is unavailable.

For an initial project check, confirm that loading finishes before accessing a named layer, that custom object classes resolve correctly, and that tile queries use the intended coordinate system. For mutable terrain, plan visual edits and collision changes separately. For isometric or top-down overlap, verify object-layer placement and sorting offsets with the project's actual artwork.

Evidence for this report

LICENSE.mdnotice · checked 2026-11-17