Hello! It’s the first time I’m using tiled for a project, and I’m not sure if I’m doing something wrong or if this is not a use case tiled can support.
In my isometric engine the game logic is using a 64x32 “level cell”, but each cell is made up of 4 32x16 graphical tiles. Right now I’m using a 32x16 tileset in tiled, and I can associate them with level cells in my loading routine no problem, but this is sloppy and leads to lots of mistakes during map building, with odd tiles that half-cover the next cell, or mis-aligned tiles and so on, that I need to constantly be at the lookout for and fix.
Is there a way to have a 32x16 tileset but have tiled only allow me to place them in 64x32 super-tiles on the level, or something else that would work with my setup that I might not have thought about? Is there a way to support such a setup?
The “intended” way to do this in Tiled is with metatilesets: create TileMaps enumerating the useful 2x2 tile (64x32) arrangements of your 32x16 subtiles, and use those TileMaps as the source “images” of tilesets with 64x32 tiles, and these larger tiles are what you would use in your actual game maps. When loading the metatilesets, you would use the source TileMaps to determine the actual subtiles to draw, and the image(s) they come from.
If modifying your map-loading logic to deal with metatiles is not possible, you have other options, such as using Automapping to make sure certain tiles can only be placed at certain locations (i.e. so that a “top left” tile can only be placed on every 2n-th cell) by erasing any that are not in a valid location, or using scripting either to achieve the same result in response to TileMap.regionEdited signals or to reimplement the drawing tools to work in 2x2 meta-cells.
If you want to stick with a fully manual approach without metatiles and just want some help with avoiding tedious tile-placement, there are the line-drawing mode of the Stamp Brush and the Fill Bucket/Shape tools, which will naturally tile multi-tile arrangements without overlaps (though line-drawing requires being careful with slopes). You’ll still have to make sure your painting operations start in the correct place, but at least If https://github.com/mapeditor/tiled/issues/3202 is ever implemented, that would help in this situation too, by making it easier to paint arbitrary multi-tile stamps in a grid with the stamp brush.
Thank you, I’ll definitely look into these meta-tilesets, and try to make that work.