CCSpriteFrameCache with multiple resolutions

Hi.

I´m using Zwoptex to create a spritesheet and CCSpriteFrameCache to load it.

But to support multiple resolutions, must I create several .plist files?

Or there is a way to scale the rects in CCSpriteFrameCache?

If so, I only would have to scale the generated image with the spritesheet.

Thanks

Jose

Have you read this: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Multi_resolution_support? If you set design resolution then all your sprites will be scalled automatically.

And what if I use only the hd spritesheet, scalled deppending of the resolution?

This way I will have only one image for all resolutions.

Do you see any problem in this approach?

Yes, you can use only one hd spritesheet for all resolutions and you might want to turn on mipmapping to get better quality when sprites are scalled down. However you may notice that this will work a little slower than using different spritesheets prepared for target resolutions without scalling so it might not be the best approach if you need more FPS.

I had a problem with this approach.

This is messing with CCLabelAtlas.

If I don´t use setContenteScaleFactor, the label is correctly presented.

If I use it (with 0.5 for example), the label is incorrect, looks like the texture is scaled by 2, but presented in a smaller rectangle, so it appears clipped.

Well, this worked, but I don´t know if is the best solution:

CCLabelAtlas::create(“000”, “digits_30.png”, 30/CC_CONTENT_SCALE_FACTOR(), 50/CC_CONTENT_SCALE_FACTOR(), ‘.’);