2
votes

so I am creating a side scrolling shooter game but am having an issue with some of the graphics occasionally. I'm running into this mysterious line that appears. As you can see on the image below it appears on some but not all the sprites. How can I go about fixing this? Is this mine or the artists mistake?

I am developing with Cocos2d and using a CCSpriteBatchNode and my sprite sheet is a .png, not sure if the information is relevant just thought I'd leave as much info possible.

Any ideas???

White Line Graphic Issue?

1
Hm...this is a very vague problem description. Have you tried the GL ES debugging tools that come with Xcode (like freezing the frame and inspecting your GL objects)? - cli_hlt
Can you provide the image for the sprite? - Oritm
I can't seem to run the GL ES debugging tools on my app for some reason - Lagoo87

1 Answers

3
votes

I also observed the same thing in one of my cocos2D games. I fixed this problem by doing 2 things.

One:
In ccConfig.h define this

#ifndef CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL
#define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 1
#endif

Second:

Check your spriteSheet, use 2 pixel gap in sprite Spacing.(I used Zwoptex) there's an option.

I believe first one should surely solve your problem.. Happy Coding.