I manually aligned each frame for all animation sets into a spritesheet, says, I have 4 animations each with 4 frames. Each frame is 32x32 pixels.
My spritesheet ends up being exactly 128x128.
I read each frame in the code similar to the following …
for(var i=0; i<4; i++)
And it goes the same for reading other animations.
The problem I found is that, whenever I switch to play another animation from certain animation. It seems to include the upper line of pixels from upper animation.
For example, I play a 2nd row of animation, the result in screen it also includes the “unwanted” line of pixels in horizontal from the 1st row of animation.
I guess it’s about “pixel bleeding” because I don’t have any “spacing pixels” between each frame.
I want to know why do we need it as I think the reading pixel should be correct. I do checking at the spritesheet and each frame align correctly without any unwanted pixel from another.
Anyway I solved the problem by using zwoptex tool with 2 pixel for spacing, the result goes well without unwanted line of pixel anymore.
Please help me clarify and get me a clearer point on this.