I’m using Tiled to work with maps from the classic game Chinese Paladin 98 (The Legend of Sword and Fairy 98). The game uses an isometric (45-degree) view, and the map is built from diamond-shaped tiles that are 32x15 pixels each.
I extracted some objects from the original maps – for example, fruit, vases, chairs, etc. Each of these objects is made up of at least 4 diamond tiles (since they are larger than a single tile). I copied these objects into a new isometric map, hoping to use that map as a kind of “asset library”. The idea is that I can later drag and drop these pre-assembled objects directly from this library map into other maps I’m working on, which would save a lot of time.
Here’s the problem: if I export my library map as an image and then try to import that image as a tileset, Tiled automatically cuts the image into 32x15 rectangular tiles. When I place those tiles onto an isometric map, they don’t align correctly – they become a mess, because the original objects were diamond-shaped compositions, not rectangular cuts.
I’ve thought of a workaround: instead of exporting to an image, I could just keep all these assembled objects on a single map file (my library map). That way the diamond composition is preserved. But then I have another issue: I want to make sure all the tileset images that this library map references are saved into the same folder as the map file. This would make it easier to back up or share the whole library.
So my question is: Is there a way to export (or copy) all the tileset images that a given map depends on, and put them into the map’s folder? Or is there a better approach to build a reusable object library for isometric maps in Tiled without running into the rectangular-cut issue?
I’m not 100% sure I understand what you’re doing, so please bear with me if I say some obvious things.
Generally in isometric games, larger objects aren’t made of multiple tiles, but are a single larger tile each. It sounds like you’re starting with artwork like that. So, instead of importing them as tilesets with 32x15 tiles, you should be importing them with a tile size set to the object tiles’ size, e.g. 64x30 or whatever.
If you have these objects as separate images (one object/big-tile per image), you don’t need to place them into a single image and then have Tiled slice them at all, you can import them as images in an Image Collection tileset. Then, that tileset can be your asset library, easily mixing together tiles of different sizes, as is a common need in isometric games.
If you want/need them to start in a single library map, then you’d either copy+paste them as multiple source tiles from that map always, or split the map up into several maps so that it’s one object size per map, and load those as tilesets with different tile sizes.
As shown in the picture, this lamp is composed of 8 tile pieces. If I copy all 8 tiles at once and paste them onto the map, they will be misaligned. I have to click and place one tile onto the map individually each time. Their positions get messed up whenever I copy them together. Is there a setting in Tiled to fix this?
No, there is not that I’m aware of. That is why I said that either you need to load the tileset as having larger tiles (so the lamp is a single tile), or pre-arrange them and copy+paste that (or save the pre-arranged lamp, etc as Tile Stamps using the Tile Stamps panel.)
It should be possible to script an action that “corrects” brushes, but I suspect one of the other “solutions” would be more convenient to use in the long run.
Using single large tiles is the best option by far and it is what is generally expected by tileset designers, since it allows objects to overlap and makes it easy to determine at runtime which tiles belong to which thing (since there’s only one tile per thing). Since it looks like you have objects of different sizes in this tileset, you’ll probably need to make this tileset into several, and you’ll also need to rearrange the objects so that they’re arranged along an orthogonal grid rather than an isometric one (this can be done in an image editor, or in an orthogonal tilemap in Tiled, you’d then export the results as new tileset images).
Thanks a lot for your reply. I roughly get what you mean. You’re saying I should put the whole complete prop inside a single square tile so I can copy the entire set intact, right?Image 1 shows the original source tiles of this lamp.Image 2 is the tileset I made following your suggestion.Image 3 is a screenshot after I pasted these tiles onto the map. Why do my tiles look transparent after pasting?
There’s another issue. Previously, when I selected a vase tile on the map, the corresponding vase graphic would automatically highlight in the tileset panel.Also, if I clicked a floor tile asset in the tileset, every spot on the map that uses this floor tile would light up. Why have both of these features stopped working now?Looking forward to your reply.
I followed your method and created a dedicated large 700×500 tile for buildings. When loading it, even though only a single tile cell is displayed, I can place it on the map now.However, there’s a problem: the loaded tile appears empty in the cell. Could it be that there’s an offset between where the image renders and where I clicked on the grid? How do I fix this offset so that the building graphic perfectly covers the tile cell I clicked?
Each location on a tile layer can only reference a single tile, so if you only use a single tile layer, then your floor tiles are replaced by your lamp tiles. If you want your lamp tiles to be rendered on top of the floor, you need to place them in their own layer above the layer with the floor tiles (this is the same problem you’re hitting later on with the large building tiles replacing a single floor tile).
Note that you can also place tiles on an Object Layer as tile objects. There they are easier to move around and can even be placed free from the tile grid. It’s an option you may want to consider.
Hmm, when you right-click to capture one or more tiles from the map, they should always get highlighted in the tileset, so at the moment I’m not sure what could be preventing this.
But clicking a tile in the tileset does not highlight every spot on the map that uses that tile. Such a feature does not exist at the moment. The closest to this is probably the “Select Same Tile” tool, which highlights all tiles which are the same as the currently hovered tile (on the map).
For tile layers, the tiles are anchored with their bottom-left into the bottom-left of the tile layer cell they are placed in. If this is the wrong place, you can change the Drawing Offset in the Tileset Properties to shift the tile by some distance. Unfortunately this can be a bit of a hassle, since you can’t see the map while changing the Drawing Offset. You can measure the distance in an image editor or switch back and forth between the tileset and the map while adjusting it.
Thanks for your guidance. I’ve created the object layer and can now add tiles directly onto it. Since I’m new to Tiled, there are still many operations I don’t understand, so I’ll go study it thoroughly.