Z ordering issues - tiledquickplugin

Regarding the depth, I think this related to the following recent topic:

Essentially the fix would be to render each tile column, instead of rendering each tile layer and then each tile individually. That way, the walls would be already rendered by the time the tile columns that should be rendered over them are drawn.

This is currently not supported by the tiledquickplugin, and with the way it is set up with an item per layer it is not easily changed. The easiest way would probably be to copy the code and then to modify it so that a TileLayerItem receives a list of layers that it will process one tile stack at a time. This will then also mean either not relying on mRenderer->drawTileLayer to draw each layer, or to also “fork” that code and modify it as well to take a list of layers which can then be processed in its inner loop.

A real fix would probably be similar to the way we added the RenderTileCallback, in that we separate the responsibilities further. What we would need, is a function that iterates tile locations in rendering order (like drawTileLayer does), but rather than directly drawing the tiles, it could call a callback in which you can then render all tiles from a certain location, instead of drawing only the tiles from a single layer.

Potentially, we can just make our existing RenderTileCallback less specific. Instead of taking the cell, position and size as parameters, it could only take the tile coordinates and the pixel coordinates. At the same time, this more generic drawTileLayer function would no longer take a TileLayer*, but just the rectangle of the area that needs to be rendered.

Hmm, I’m not sure what could be done here. I would suggest to generate a regular tileset based on your system, so that you can use them in Tiled.