Lines in the map, how I can remove it?

(Guerrero Craft61 ) #1

I have the antialiasing off, but the lines are still there
In the video I use 16x16 tileset and 15x15 Map Tile size

In the image I use 16x16 tileset and 16x16 Map Tile size

Tileset link (16x16 Margin 0 Spacing 0)
The map was created using different layers.

(Jesse Harlin) #2

Hey are you using the output on the web? believe it or not this isn’t the result of Tiled, but rather whatever is rendering the JSON.

I talk about this in my talk here: https://www.youtube.com/watch?v=lDNmu_9J2p8

Check out tip #2 and see if that helps!

(Guerrero Craft61 ) #3

I’m sorry, but I do not “know” what is the “rendering the JSON” (I’m noob create videogames and I don’t speak I very good English). The screen I record is the Unity preview screen (the camera) if you mean that with the output on the web

(Thorbjørn Lindeijer) #4

It’s always good to state which technologies you’re using, otherwise it’s guesswork for those who are trying to help you. Since you mentioned Unity now, I’m assuming you may be using Tiled2Unity or SuperTiled2Unity. In that case, the problem you’re having may be covered on the following page:

https://tiled2unity.readthedocs.io/en/latest/fixing-seams/

Extruding/padding your tiles is also mentioned there like @the-simian did in his talk, and if you want to use non-integer scaling factors and place your map at sub-pixel positions, this would be the way to avoid those lines.

However if you just do that the pixels will keep this slight “jittering”, so the preferred way to avoid it in my opinion is to use an integer zoom factor and round the map’s position such that it’s always aligned to physical pixels.

(Jesse Harlin) #5

Bjorn just said most of what I would have followed up with. Just to clarify what I meant by ‘rendering the JSON’. Tiled as an editor is agnostic as to what consumes its output. You can make a map in Tiled and load it into many things, and the output is often times JSON. In your case, Unity is the engine that is consuming Tiled’s output and managing rendering. In my talk I linked, it’s a web framework called Phaser.

As Bjorn mentioned, the tile padding (or tile extruding) as a concept can apply to anything, not just Phaser as is in my talk. Judging from the way the lines (artifacts) look, my bet is that is still what is causing your issue.

(Guerrero Craft61 ) #6

Solved using SuperTiled2Unity