Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Black Lines in My Game. Tiled?  (Read 1507 times)
0 Members and 1 Guest are viewing this topic.
Offline Andre Lopes
« Posted 2013-08-17 05:11:29 »

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

http://www.youtube.com/watch?v=Swt8TSaYB38

Please help!

What am i doing wrong?

Heres a screenshot of Tiled :

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

Offline tyeeeee1
« Reply #1 - Posted 2013-08-17 05:59:08 »

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.
Offline Andre Lopes
« Reply #2 - Posted 2013-08-17 06:09:41 »

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.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline tyeeeee1
« Reply #3 - Posted 2013-08-17 06:20:03 »

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.
Offline namrog84

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Reply #4 - Posted 2013-08-17 06:21:21 »

Here you go

http://i.imgur.com/cnQpwON.jpg    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.

"Experience is what you get when you did not get what you wanted"
Offline Andre Lopes
« Reply #5 - Posted 2013-08-17 15:56:04 »

I dont know about the pixel buffer...

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

JGO Ninja


Medals: 46
Projects: 4


Keep programming!


« Reply #6 - Posted 2013-08-17 16:08:13 »

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.

"Experience is what you get when you did not get what you wanted"
Offline davedes
« Reply #7 - Posted 2013-08-17 16:23:26 »

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

See here for details on what's happening:
http://www.java-gaming.org/topics/bleeding/26823/msg/237162/view.html#msg237162

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.

Offline Andre Lopes
« Reply #8 - Posted 2013-08-17 20:24:16 »

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

See here for details on what's happening:
http://www.java-gaming.org/topics/bleeding/26823/msg/237162/view.html#msg237162

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?
Offline Andre Lopes
« Reply #9 - Posted 2013-08-22 19:12:55 »

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

See here for details on what's happening:
http://www.java-gaming.org/topics/bleeding/26823/msg/237162/view.html#msg237162

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.

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 Huh?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Andre Lopes
« Reply #10 - Posted 2013-08-22 19:27:58 »

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?
Offline Andre Lopes
« Reply #11 - Posted 2013-08-23 15:24:01 »

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?Huh
Offline tdegroot96

Junior Devvie


Projects: 1



« Reply #12 - Posted 2013-08-27 08:25:28 »

You could try....

Enable vsync.

In the Game class,

1  
gameContainer.setVSync(true);
Offline Andre Lopes
« Reply #13 - Posted 2013-09-12 03:05:36 »

You could try....

Enable vsync.

In the Game class,

1  
gameContainer.setVSync(true);


Oh didnt see that quote!

Oh yes, i tried that, nothing yet...

I tried several things but, it simply doesnt work!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (39 views)
2014-12-09 22:41:13

BurntPizza (74 views)
2014-12-08 04:46:31

JscottyBieshaar (36 views)
2014-12-05 12:39:02

SHC (49 views)
2014-12-03 16:27:13

CopyableCougar4 (44 views)
2014-11-29 21:32:03

toopeicgaming1999 (112 views)
2014-11-26 15:22:04

toopeicgaming1999 (98 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!