Is it possible to make the tiles origin start in the upper left?

I made a map with tiled of size 15x15 pixels. But the yellow enemy sphere thingie is 30x30 pixels. In computer graphics the origin is the upper left corner of the screen. The upper left tile in the map is 0,0 in the CSV but the enemy tile grows like its origin is in the bottom left corner of the tile.

This is the enemy at the tile y:0 x:0

This is the enemy at the tile y:1 x:0

I think y:0 x:0 should look like y:1 x:0. It is not much work to make a workaround in the code that loads the map, but I think this is unintuitive because computer graphics have always had the upper left corner as the origin. Is there an option to make the tiles “grow” downwards?

The reason I picked bottom as opposed to top alignment for tiles larger than the grid is because this feature is often used for tiles that are meant to overlap with the tiles above it. Take for example the “isometric grass and water” example map shipping with Tiled, where the grass sticks out at the top and will naturally be drawn on top of the tiles of the previously drawn row.

For similar reasons, tile objects, placed on object layers, were also bottom-left aligned. But since this inconsistency with the plain rectangle objects caused much confusion and frustration, we’ve recently introduced an “object alignment” option on the tileset, with which you can change this to top-left for example.

However, this new option only applies to tile objects at the moment, whereas tiles on a tile layer still draw the same way (bottom-left aligned). I wasn’t sure whether we should support the feature there as well, but I think it makes sense to have it affect both cases.

That is logical. But if I could set it in each layer I would be convenient. So the “enemy-layer” got the sprite’s origins in upper left. Then I could use the enemy sprites as-is in the map editor.

I think the tile alignment is more often tied to the graphics than the layer. Suppose you had multiple maps, you’d need to set top-left alignment on the enemy layer on each of those maps, as opposed to setting it up once for the tileset containing your enemy sprite.

1 Like