Black lines around sprites

  ... discussions about development with the GLES1 branch of AndEngine.

Re: Black lines around sprites

Postby OzLark » Thu Feb 16, 2012 10:35 am

Is this not a bug in the andengine library or tmx extension?

It seems that we are trying to treat the symptom rather than the problem.

Lots of people have this issue, can we not track down this bug and squash it?
Did this post help you? Feel free to return the gesture by downloading Ninja Bees, creating a level (or more) and sharing it to the Ninja Bees website!

Ninja Bees - Our latest Android game, check it out on Google Play (free) or paid with no ads
OzLark
 
Posts: 1130
Joined: Sun Feb 05, 2012 3:19 am

Re: Black lines around sprites

Postby RealMayo » Thu Feb 16, 2012 7:13 pm

Wasn't it resolved in AndEngine GLES2 via the BlackPawnTextureBuilder?
User avatar
RealMayo
 
Posts: 1681
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

Re: Black lines around sprites

Postby OzLark » Fri Feb 17, 2012 11:51 pm

RealMayo wrote:Wasn't it resolved in AndEngine GLES2 via the BlackPawnTextureBuilder?


I havn't had a chance to try this out yet (can't find an example of how to use it)... But still, this may be a workaround for the issue, but I don't think it resolves it.

Is the problem well understood? Do we know what the problem is?
Did this post help you? Feel free to return the gesture by downloading Ninja Bees, creating a level (or more) and sharing it to the Ninja Bees website!

Ninja Bees - Our latest Android game, check it out on Google Play (free) or paid with no ads
OzLark
 
Posts: 1130
Joined: Sun Feb 05, 2012 3:19 am

Re: Black lines around sprites

Postby BluGT » Thu Aug 30, 2012 11:55 pm

Thank you whalabi, I'm using GLES2 and was having the pixel line artifact problem with some of my sprites, used that transparent texture trick and solved all of my problems!
BluGT
 
Posts: 2
Joined: Mon Aug 27, 2012 3:08 am

Re: Black lines around sprites

Postby jaym » Fri Aug 31, 2012 12:26 am

Sorry for going off-topic in the GLES1 thread, but to those who are using GLES2, the BlackPawnTextureAtlasBuilder takes perfect care of you by supplying parameters that allow you to add the spacing.

If you don't know how to use it, it's as simple as:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.         // Build and load the bitmapTextureAtlas
  2. buildableBitmapTextureAtlas.build(new BlackPawnTextureAtlasBuilder<IBitmapTextureAtlasSource, BitmapTextureAtlas>(0,1,1));
  3. buildableBitmapTextureAtlas.load();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


The second and third parameters set to a value of 1 will resolve the line issue.
AndEngine for Android Game Development Cookbook - Based on AndEngine's latest, greatest, GLES2.0 AnchorCenter branch!
jaym
 
Posts: 690
Joined: Wed May 04, 2011 10:08 pm

Re: Black lines around sprites

Postby numberwang » Fri Nov 30, 2012 4:45 pm

Just tried the hack by whalabi and it worked for me (in GLES2). Thanks.
numberwang
 
Posts: 204
Joined: Thu Aug 30, 2012 12:29 am

Re: Black lines around sprites

Postby jaxily » Tue Mar 19, 2013 2:10 am

Here is the solution, no hacks or tricks. Just add .clearTextureAtlasSources() to your texture altlas after you declare it. Hope this work for you too.

menuTextureAtlas.clearTextureAtlasSources();
User avatar
jaxily
 
Posts: 125
Joined: Wed Jan 09, 2013 3:01 am

Re: Black lines around sprites

Postby siddharth3322 » Wed Mar 20, 2013 12:45 pm

Thank you whalabi, your suggestion work for me also.
The displayed black lines were gone.
siddharth3322
 
Posts: 242
Joined: Thu Jan 03, 2013 10:10 am

Re: Black lines around sprites

Postby RacingRapist » Wed Jun 26, 2013 1:00 am

I tried every solution this post proposed, but none of them worked when using the REPEATING_BILINEAR option, which I absolutely need to repeat my texture over large areas...
RacingRapist
 
Posts: 8
Joined: Sat Mar 02, 2013 11:53 pm

Re: Black lines around sprites

Postby Scriber » Sat Sep 07, 2013 7:19 am

Hello again,
I am using Gles2 AC and .... yes, it still shows the lines.
I do not have a solution, but I have discovered the reason for the lines.
The transparent bitmap can cover some of the issues, but if the dpi changes, the lines will be back.
The dpi of the device vs. the dpi of the image/sprite seems to be causine the issue.
I have a 120 dpi and a 160, when I set my png's to export at the right dpi the lines disappear on one and reappear on the other.
I have not started looking at how and engine handles dpi.
Anyone that knows about this stuff... we could use your help.
Scriber
 
Posts: 3
Joined: Tue Sep 03, 2013 11:04 pm

PreviousNext

Return to GLES1

Who is online

Users browsing this forum: No registered users and 13 guests