Up until Cocos2D HTML 2.2.0, I used my own fullscreen logic in my game, and things worked fine. However, with 2.2.1, a fullscreen API was added, and I thought I’d better use it. I wanted to use it to make my code simpler, and to ensure the fullscreen mode worked in native mode, not just in browser mode.
However, I’m seeing graphic issues with the Cocos fullscreen mode. I use sprite sheets for graphics, but when the fullscreen mode is enabled, sprite frames are not cut exactly properly, resulting in thin horizontal or vertical glitch lines.
Game with custom fullscreen: http://stifu.fr/cc/Whip-A-Wimp1/
Game with Cocos fullscreen: http://stifu.fr/cc/Whip-A-Wimp2/
[Edit: screenshot here: http://www.cocos2d-x.org/attachments/3489/cocos_glitch.png]
With the 2nd version, you’ll see horizontal lines above the player head, for example, as you move around (use keyboard direction keys).
By the way, the game ensures all node positions are integer values, not float values, to avoid similar graphic issues (blurry sprites that I already mentioned here before).
So, I’d like to ask: what’s the recommended way to fix this problem, to make the Cocos fullscreen mode work with no such visual glitches? I thought of adding extra space around each sprite frame, in the sprite sheet, but I’d prefer something nicer.