ldtk icon indicating copy to clipboard operation
ldtk copied to clipboard

Grid is offset within level and can't be adjusted

Open indianaj0nas opened this issue 1 year ago • 1 comments

Skärmavbild 2024-10-15 kl  19 09 56

Basically the grid for placing tiles and entities are offset a half tile. Which means I can't place tiles along the borders of the level, which sucks because I clamp the camera movement to the border of the level and I don't wanna add extra padding around every single level just because a few levels do this. The other issue this creates is that all the entities are offset a half tile inside my game. So I'm left with two options here, either recreate the level from scratch in a new level with a correct grid, or offset all the entities in this level by half a tile. Both are tedious and unsatisfactory. If only copy-pasting worked I could have gotten past this bug quickly, but since it's not an option I've wasted hours trying to fix it correctly, when it would probably just have been faster to redraw the level in a new level.

I've been getting this issue within several levels, not sure how it happens. But once it's there, it's impossible to do anything about it.

indianaj0nas avatar Oct 15 '24 17:10 indianaj0nas

The only way I know it happens is like this: Say, you have a 16x16 layer, and a 8x8 layer, and you resize the level while the 8x8 layer is active (which will be in steps of 8 pixels), the 16x16 layer can get misaligned. It's not really a bug tho, and the way I go about fixing it is simply selecting the 8x8 layer, and resizing the level so the border aligns with the 16x16 layer again.

If this occurs when all layers have the same grid size though, I have no idea what'd cause it, but maybe you can add a placeholder layer with a different (half?) grid size just to resize the level so that everything aligns again?

Nifflas avatar Oct 21 '24 13:10 Nifflas