1
votes

So this may be a bit vague, but I'm having some issues. Basically, I am drawing my little ninja sprite (16x16px) and on 2 frames of his animation, he loses pixels on his headband. I have looked everywhere in an attempt to find an answer, but to no avail.

Original Sprite Sheet (Bugged frames are 4th row, 3rd and 4th frames):

enter image description here

enter image description here

After a little more investigation, it seems that the bugged pixels are due to the width of the sprite sheet. It almost seems random what pixels get messed up depending on the width. However, with a constant width, the messed up pixels are constant regardless of creating a new build or using an old one.

As you can see, the back of his headband is missing pixels. While it may not be game changing, it is very annoying and if anyone knows of a fix, that'd be great! Thanks guys!

2
Can you post the original sprite sheet, not just the screenshot of the issue happening?smelch

2 Answers

1
votes

So a workaround I found is actually changing the size of the rectangle used to display the image. It was set to 100, setting it to 99 works and there is barely any visual difference.

0
votes

My guess is that those pixels are magenta (255,0,255) which is automatically keyed out of the image as transparent by the SpriteTextureProcessor. If that is the case, change the pixels to be a slightly different color (255,1,255) or use the TextureProcessor for the content. You can do this in the properties window of the image file in your content project.