Partial grid lines a tilemap


(Patrick) #1

I am doing the tutorial by gamesplusJames 2D RPG #6 - Making Tile maps. I keep having grid lines coming out on my map. I have done what he shows in tutorial #5 and have change from free aspect to every resolution listed and it still does not go away. I even unchecked “Snap to grid”. Any other suggestions?


Graphical error in Unity
(Thorbjørn Lindeijer) #2

Can you show an image or screenshot where the problem is visible? I’m not sure what grid lines you’re talking about.


(Patrick) #3

Thank here it is. It is going through the map other than where the player map is.


(Patrick) #4

Here is a better picture. I went back to video #5 and went through it again. I am still showing the grid lines. I am not sure where it is messing up.


(Thorbjørn Lindeijer) #5

This usually has to do with scaling or rendering at sub-pixels offsets, because both can cause pixels from neighboring tiles to “bleed” into the edges due to texture filtering.

To avoid it, either put a thin border (usually 1 pixel is enough) around your tiles that matches the color of the tile edge. This means you need to space out your tiles to allow for 2 pixels of space in between. Or you need to make sure to render the map at 100% scale and at whole pixel positions. Alternatively, sometimes it may suffice to disable texture filtering (setting it to nearest-neighbor instead).


Graphical error in Unity
(Patrick) #6

Thank you. Still trying to figure it out. This sprite sheet was taken from a tutorial by “JamesPlusGames.” It has a thin border around it already. I just put the color for the map and imported it to Unity and still get the lines. Here is a picture of the Sprite sheet in Tiled. Maybe you see something I don’t. I am a complete beginner. Thank you.


(Patrick) #7

SOLVED: It looks like I figured it out with your help. Thank you.


(Brent Watkins) #8

HI Patrick. I came here looking for the solution exactly like you are describing. Same video tutorial too. Can you tell me what you did to solve the issue?


(Patrick) #9

Sorry. Just saw this. I changed the resolution on my computer. Worked
great. Hope this helps.