[LibGDX] Artefact visualizzation Tiled level

Hi, today I have another problem XD i have a tmx file with the level that i load in my game, i can load it and visualize it correctly, but when i move the player, sometimes compare a space between cell, and i see the background color! What can be the problem? I have noticed that using number as 00,00 with only 2 decimal i can see the space not so often. it can be possible that zooming in a tmx level there are some error in visualizzation of cell?
I have absolutely to resolve this problem or i can’t continue the game because it’s horrible to see tha lines :frowning:
this is the code that i use to load my level :


// Imposto il livello
map = new TmxMapLoader().load("data/"+Headinator_class.info.zona+"/"+Headinator_class.info.zona+".tmx");
renderer = new OrthogonalTiledMapRenderer(map, 1/(game.unit_xy));

and this is the code i use to render :


renderer.setView(camera);
drawCielo();
renderer.render();

where renderer is an OrthogonalTiledMapRenderer.

Maybe you could post the Code where you load your map? Also doublecheck your tilesize in tiled^^. this usually happens when you paint tiles that don’t fit the tilegrid in tiled (omg so many tiles! :D). Allways be sure that your tileset has no transparent edges and is equally split up :).

yes my image are all equal and not have tranparent edges, i have checked it XD
this is the code that i use to load my level :


// Imposto il livello
map = new TmxMapLoader().load("data/"+Headinator_class.info.zona+"/"+Headinator_class.info.zona+".tmx");
renderer = new OrthogonalTiledMapRenderer(map, 1/(game.unit_xy));

and this is the code i use to render :


renderer.setView(camera);
drawCielo();
renderer.render();

where renderer is an OrthogonalTiledMapRenderer.

Have you tried using another unitScale?


renderer = new OrthogonalTiledMapRenderer(map, 1);

Maybe this does the trick :).

i can’t use your example because i have a camera with 7x6 viewport dimension, and 1 unit is calculated as 64 pixel, so i have to scale it to 1/64px, do you think my dimensions are too small and the render is artefacted by this?

Well after some testing i wasn’t able to reprodruce your problem… Maybe you could post a screenshot on how it looks when this problem occurs. Other than that you could post a little bit more code (e.g. the rendering process and how you initialise your camera-viewport).

The issue he is referring to is the same as the very beginning of this video, and 7 seconds in:

XoAxThXeN8I

It’s difficult to see in the video, but when running the game, it can often flicker up with the lines in between tiles.

From what I’ve read here and there, it is called texture bleeding, I haven’t yet applied any fixes, but if, like me, you packed your textures with the texturePacker gui and didn’t pad your textures, then bleeding can occur easily. For some people, this doesn’t fix things up though, and this article seems to explain why:

http://jfix.by/category/gamedev/libgdx/