Black Lines in My Game. Tiled?

Hi Guys! Im having an issue!

When im moving my actor, sometimes black lines or black bars shows up. But if i record with fraps its harder to see in video.

But in this video that i recorded sometime ago, you can see it happening at 1:32 - 1:35

Please help!

What am i doing wrong?

Heres a screenshot of Tiled :

http://img191.imageshack.us/img191/6871/li8h.jpg

You may want to post some code. I can’t see anything wrong with the video, but that may just be because it’s pretty late here.

At 1:32 - 1:35 you can see black lines at bottom right of the archer.

I will try to get some code but, im using the default code to render the tmx.

It took me a few more views but I caught it. If it doesn’t happen that often, as you say, then does it happen at specific areas, around specific tiles, etc… That might help narrow down the cause, maybe.

Here you go

http://i.imgur.com/cnQpwON.jpg :stuck_out_tongue:

Question: Does the tileset image (the image that contains all your tiles) have a 1 pixel buffer between each tiled item?

I found that when you have 0 buffer, this happens to me on occasion. As if somehow its a ‘bleed through’ from adjacent images/buffer thing??(Though it seems like that, I feel like that can’t happen?).

The easiest fix is to simply make sure there is a ‘1 pixel’ border/buffer between each item and that inside that 1 pixel buffer, contains a transparency, as to not display anything.

I dont know about the pixel buffer…

I get the logic but, i dont get how would i be able to do that.

I am assuming you are using a single imagefile that contains multiple tiles?

You would do it in the image file itself. At least that is how I’ve solved it before. There is probably a better code solution, but I don’t know it.

You might need more than 1 pixel if you’re using linear filtering.

See here for details on what’s happening:

For texture packing you can use something like this:
https://code.google.com/p/libgdx-texturepacker-gui/

It includes a useful feature called “duplicate padding” – this will copy the pixels of each edge and duplicate them, like I did with the grass tile in the linked thread.

Lol it worked.

Thanks man! I owe you.

Do you think i should use this in all images or just the ones that TMX uses?

Please help!
The problem is back!

It still bleeds sometimes, is there anyway i can solve this? I used duplicate padding and 2 at padding.
I did with all images except with the archer itself and the tiles still bleeds.

What should i do ???

http://img812.imageshack.us/img812/582/8lai.jpg

Im doing like that, i change the max H W to the current image im working on.

Then it kindas overwrite the current image right?
So i just pick it and put in the place of the old image i was using, correct?

IM using this
//Clear Screen
Gdx.gl.glClearColor(0,0,0,1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
//Gdx.gl.glClear(GL20.GL_BLEND_EQUATION_ALPHA);

I tried changing to several others GL20 but , then the screen gets messed up sometimes.Other times it lags…But i got a radeon 6850 fgs.

Please anyone???

You could try…

Enable vsync.

In the Game class,

gameContainer.setVSync(true);

Oh didnt see that quote!

Oh yes, i tried that, nothing yet…

I tried several things but, it simply doesnt work!