

Self.tilesetImages = (path)Īssert(self.tilesetImages, 'Couldn\'t load tileset images') Set this to whatever your tileset name is. Loads Tiled map files (.tmj) and displays them with sprites.įor _, layer in ipairs() do However, if you only have one tileset the mapping can be simplified to a -1 operation on the tile id which is what I do here. Note: that the tiled format has some relatively involved mapping from the tile id numbers in the tmj files to tile id numbers in tilesets. From here one could add things to support various Tiled features as needed. This isn't a drop-in "just works" thing but it is really small and not too opinionated so it can be a reasonable place to start if someone wants to use an isometric Tiled map.
#Tiled map editor how to
What's most useful here, I think, is the math in addSprites() which shows how to do the coordinate calculations. The device also doesn't have the performance to scroll the tilemap very well without a fair amount of extra work which isn't shown here (my game has a whole chunk load/unload system which keeps about 1 screenful of tiles in place at a time and even that just barely hits 30fps). This is a minimal class which doesn't support multiple layers or tilesets. The tileset is created using images named properly for use as an imagetable on the Playdate. This is loading an isometric Tiled map saved as a.
#Tiled map editor code
TilemapEditor.In case anyone stumbles on this thread while searching for "Playdate isometric Tiled loader" here is code I'm using in my game to do that. Since it's just a js file, you don't need to wait for it to rebuild every time you change it Inspect its code in the browser and it all there clear as a day.

Thats right, one of the goals is to let you make maps on your phone. Responsive interface that scales all the way down to a portrait mode smartphone.
#Tiled map editor android
The other available options can not run on android or ios. Thats true, it's a single js+css file with no external dependencies!

In the same way you can also store your tilemaps in github gists! The imgur=ID at the end tells tilemap-editor to use as tilesets an imgur uploads gallery with the same id in its url: You can use the pwa as a way of sharing a demo of tilesets and tilemaps you have created! The online demo is an installable pwa, which has as a goal to demonstrate integration of the editor in other projects.
