Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Black pixels around sprites

Author
Message
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 2nd Aug 2013 19:58 Edited at: 2nd Aug 2013 19:59
I've been writing a game with AppGameKit demo. Now I've bought and installed the full version and I get a problem of a lot of my sprites now have black pixels at the edges.
The images are png.
I've tried putting a buffer of 1 clear pixel at the images edge, which fixes it for stationary sprites, but not moving sprites.


The word "Gullible" cannot be found in any English Dictionary.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Aug 2013 20:01
Try using power of 2 size images ie. 1,2,4,8,16,32,64,128,256,512,1024 etc. they don't need to be square, just power of 2 in size, odd sized images get funny edges. Or you can turn of min/mag filtering.


this.mess = abs(sin(times#))
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 2nd Aug 2013 20:26 Edited at: 2nd Aug 2013 20:27
Most of my images are 64x64 or 128x128, just a few not that will go on atlas images soon.
The power of 2 images have the same issue.


The word "Gullible" cannot be found in any English Dictionary.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 2nd Aug 2013 21:35
Does it still do that if you apply the following to the images?

SetImageMinFilter(imgId, 0)
SetImageMagFilter(imgId, 0)
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Aug 2013 21:56
You might also try leaving a transparent border of one pixel around the whole image or try setting image wrap mode off.


this.mess = abs(sin(times#))
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 3rd Aug 2013 13:34
Ok I sorted it.
I had a 3 layer parallax backdrop. I added a 1 pixel buffer to the image giving me trouble and everything was fine until the sprite moved, then the black line appeared again. But, after much frustration and almost doing an "Angry German Kid", I discovered that the black line belong to one of the other parallax layers - it's just that it appeared at the same place as the line on my first layer making me think the black line returns to the sprite when it moves.

Anyway, all is good now; thank you Backslash & xCept


The word "Gullible" cannot be found in any English Dictionary.

Login to post a reply

Server time is: 2024-04-27 10:46:57
Your offset time is: 2024-04-27 10:46:57