All Questions


Oliver Sainsbury

Getting Artifacts Between Tiles

Since adding the new sloped tiles I am seeing artifacts along the vertical and horizonal lines where the tiles connect to each other. This does not look very good. Did anyone else have this issue and did you find a fix?
  • Nathan Lovato replied

    It's a common issue in games due to the way textures get rendered and filtering. In short, to solve it, the most reliable way is to have your tileset have each texture separated with a fringe of extra pixels around the tile.

    Otherwise, you can set your project to use pixel snap (in the Project Settings), which will limit the smoothness of the camera scrolling but force all textures + the camera to snap to pixel locations.

    For more background on the issue: it's due to the tiles, which are individual squares, not falling on pixel-perfect positions depending on where the camera is or where you place the tileset. Your camera can fall between two pixels, so the renderer has to sample on the edge of your texture, causing some of these artifacts.

  • S
    Oliver Sainsbury replied

    Thank you. I decided to use "pixel snap". Fortunately, I am not seeing any performance issues.

    I hope Godot fixes the issue with a line artifacts because having to add a fringe pixel seems like a bit of a work around.

  • Nathan Lovato replied

    It's not specific to Godot, this happens in ~all game engines. Again, this is due to what a tilemap is.

    And the pixel snap doesn't reduce performances, just the smoothness of the scroll.

  • W
    Arvid Waasdorp replied

    Hi, I found out that I needed to 'reimport' the asset after I have enabled pixel snap.

    You can reimport the asset by going to the "FileSystem" (all in Godot) and select the tileset. In the section the "FileSystem" "Scene" is selected. Click on "Import" next to it. Here you have the option "Reimport". This solved the issue for me.