1

I'm doing a project with IOS Sprite kit (Objective-C), I use TexturePacker to make my Sheet/Atlas ,In my scene view I only display a Character animation nothing more but I have an issue when I display my Sprite it is blurry.

The resolution of the image sprite are 512*512 (I think it's good), and the size of Sheets are 2048*2048.

I try many things on texturePacker to increase the quality but noting work, when I display my animation on TexturePacker directly the quality is good, but when I try on XCode, the result are blurry, I have try to play my character animation in a array animation and the result are not blurry (but this technique use to much memory) so I think the problem is TexturePacker

Has anyone had the same problem is would have a solution ?

Here is my code :

[self.scene setBackgroundColor:[UIColor clearColor]];
self.view.allowsTransparency = YES;

// load the atlas explicitly, to avoid frame rate drop when starting a new animation
self.atlas = [SKTextureAtlas atlasNamed:CHARACTER_ATLAS_NAME];

SKAction *walk = [SKAction animateWithTextures:CHARACTER_ANIM_IDLE timePerFrame:0.033];

self.sequence = [SKAction repeatActionForever:walk];

SKSpriteNode *sprite = [SKSpriteNode spriteNodeWithTexture:CHARACTER_TEX_HELLO_0]; 

sprite.size = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height);

sprite.position = CGPointMake(sprite.size.width/2, sprite.size.height/2);


[sprite runAction:sequence];
[self addChild:sprite];

Here is a comparison on the top sprite when I use the image array and that below with SpriteKit and Texturepacker ( you can see the difference especially at eye level )

enter image description here

Thanks for your help

0 Answers0