Map is skewed when there are many tiled layers

I just used TILED and practicing making games on mobile devices. My problem is that when I finished building a map in TILED with many tiled layers, I will have an error.
Below is an image describing what I want, the camera will display everything that is built in the map.


However, that’s if I only use one only one tiled layer in my map. If not then it will be faulty as the following shape:


In the first image (the first version), one of the two layers is pulled to the right or left to a segment quite far from my expectations.
In the second picture (this is what I am suffering from), the Layer Grass is pulled to the right, and it can only be the right position if I pull it to the left while editing the map.
So is there any way to handle it? Because I have searched for the answer to this issue but nothing.

It looks like you’ve moved some of the layers, probably by accidentally using the Offset Layers tool. In each layer’s properties, set its Offset X and Y to 0.

Or maybe I misunderstand the problem? What do things look like when you set all the offsets to 0, are things still wrong? If so, in what way?

I will try again by ordering offset equal to zero

I tried again and this was my result, along with the accompanying attributes of Map and Layer Grass



And this is the result when running the app.

As in the result, the Layer Grass was pulled to the left, I don’t understand why.

Does it look correct in Tiled? And have you set all the layers (including the groups) to have offset 0?

If it looks different in your app than in Tiled, then the problem is in the app. Look at where you’re rendering each layer. Perhaps you’re centering them, or maybe you’re doing some premature/incorrect parallax calculations?

I tried offset but hasn’t changed anything, and this is how I render map
Screenshot 2025-03-21 213307
And setting camera:

You still haven’t clearly shown what your level looks like in Tiled with all the offsets being 0, so I can’t really help because I can’t diagnose what’s wrong.

You’re anchoring the levels at their centre, could that be the issue? In Tiled, 0,0 is the top left. The anchor shouldn’t normally be an issue since the layers should all be the same size, but if your Tiled loader also crops empty cells or something, that could result in the layers being different sizes.

Still, I suspect the likelier problem is something to do with the offsets, but I can’t tell without seeing a screenshot of the map in Tiled with all the offsets at 0 (all layers, including groups) - you said it hasn’t changed anything, but the only screenshot of the map in Tiled you’ve shown so far clearly has some non-0 offsets, so that at least should change when you set all of them to 0.

I will send the detail of my map for you:






That all.
Actually, I follow the instructions on the video and I am very confused when the results are not the same as the instructions

Your Image background layers are still offset. It’s be easier to debug things with everything with 0 offset, as I wrote before.

Also, it’d help to see the left edge of the map, since that’s where things are relative to. It’s obscured by the properties panel currently. No need to re-screenshot everything, but a screenshot with all offsets at 0 on all layers, with the left edge of the map visible (try pressing Tab for clear view to temporarily hide the panels) would help. Similarly, a screenshot from your app with the left edge of the map visible would help (again, of the updated version of the map with all offsets at 0).

1 Like


Is that right?

With the repeating it’s hard to tell where the layers begin and end, but this is fine for debugging. What does this exact map look like in your app?

Edit: Is the layer with the bushes still offset, or does it just have very large tiles that stick out of the map? It’s possible that because the art is oversized, your Center anchor is causing the layer to centre incorrectly. Try top left anchor (you’ll also need to adjust the layers’ position in this case).

It looks like this:


And if I disable repeat:


Layer Grass is still deviated

Please see the edit to my post above.

1 Like

I was really sorry but I didn’t know where to install anchor. A brief way for your question above, only Grass is deviated.

In your code, you have level.anchor = Anchor.center, which presumably centres the layer around its position. Try a top left anchor instead. I don’t know what this would be called in the API you’re using, you’ll have to check the documentation.
Because your bushes (“Grass”) layer is oversized, centering pushes it leftward relative to where you expect it to be - in Tiled, all the layers are aligned relative to their top left corners, not their centres.

1 Like

I tried and this is the result with my edited code:


I don’t think it’s because Layer Grass is oversized, because when I try to erase it to fit the map:

(I deleted one on the right)

That’s unexpected, but thanks for trying it for me!
What happens if you place a tile in the leftmost column of that layer, so it’s not empty? I wonder if it’s actually “cropping” the layer, treating that column like it’s not there… it’d be a rather big problem if it were, but just to rule it out :'D (I doubt this is the problem since it doesn’t crop the top cells off :/)



I tried again and filled with all columns, but as far as you said, it was strange that it ‘trimmed’, but instead of ‘trimming’ all the layers, it ‘trimmed’ each layer grass :v