Use Tiled Map Editor maps in Code.Gamelet with pixi.js.
Tiled is a 2D level editor that helps you develop the content of your game. Its primary feature is to edit tile maps of various forms, but it also supports free image placement as well as powerful ways to annotate your level with extra information used by the game. Tiled focuses on general flexibility while trying to stay intuitive.
CG.Base.resourceManager.addAppResource('TMXMap.testMap');
CG.Base.resourceManager.load(() => {
CG.Base.pixi.initialize(600, 600);
let tiledMap = new CG.TMXMap.MapRenderer('TMXMap.testMap');
CG.Base.pixi.root.addChild(tiledMap);
});
CG.Base.resourceManager.addAppSource('test/beach.tmx');
CG.Base.resourceManager.load(() => {
CG.Base.pixi.initialize(600, 600);
let tiledMap = new CG.TMXMap.MapRenderer('test/beach.tmx')
CG.Base.pixi.root.addChild(tiledMap);
});
To use tmx of appSource (usage 2), you need to modify the tmx:
* tileset > source (tsx file)
change "filename" to "resourceAlias:filename"
* tileset > image > source (embeded tileset)
change "filename" to "resourceAlias" or "resourceAlias:filename"
We use SemVer for versioning.