Why doesn't my tile line up to my grid

So i made an isometric tile to use in tiled but it doesn’t line up. First this is how i created my basic tile:

In Photoshop, i made a square filled it with a colour,
Rotated 45 degrees and halved the height, followed by re sizing the image canvas so it becomes a square again.
I then re sized the image dimensions so it was of a size that was divisible by my grid.

So in tiled i then made a project which has 64 by 32 isometric tiles. And imported my image to find it doesn’t line up. See some of the applied screen shots.

My Tile: http://i.imgur.com/EKBywzd.png

And the tile in Tiled:

And by the way yes it is meant to be a very large tile rather than cut up into lots of little ones as that won’t work in my game engine. :smile:

Why is your tile centered vertically in its image, and why did you think that should make it align to the grid?

I would first of all crop your tile to be only the required size rather than making it square, if it still doesn’t align to the grid just use the “tile offset” property of the tileset to shift it in place.

I simply apply offset Y as 0-image.height/2. So i don’t see how that makes a difference. Given tiled provides offsets, i don’t see why it matters where it is on an image.

The images are all squares to allow more detailed game worlds of which a rectangle image would not provide. The engine works better that way. A lot of isometric games made in the industry do it that way.

Yes, if you want you can keep it a square. You’re just generally wasting half of your texture memory, but it is not the poblem of course. If you already know about the Y offset property, why not just tweak it so that the tile appears aligned to the grid?

I managed to solve it - there was a mistake with the way i was creating it in Photoshop.

I was creating a perfect square of the size I want, then rotating 45 degrees, forgetting this in fact makes the image larger due to the diagonals to the corners are larger than the two straight sides. Just have to re-size down again afterwards.

Also its not a total waste of memory, given that - the extra alpha allows for landscapes to be more than just flat in a single tile (less looping for the code to do). Memory for 2D images isn’t terribly draining anyway