Cocos2d sprites not working on device
My game works fine in the simulator but it has probems with the sprites on the device. A line like this will give an error:
img = [CCSprite spriteWithSpriteFrameName:@"img.png"];
Then:
Assertion failure in -[CCSprite initWithTexture:rect:], /Users/newuser/Documents/Uni/libs/cocos2d/CCSprite.m:171
Someone suggested that some devices can't handle spritesheets bigger than 1024x1024, is this true? Because mine is 1024x2048,开发者_如何学编程 but it's a lot of effort to make 2 spritesheets so I was looking for confirmation of this first?
Thanks.
Devices older than the 3GS (iPhone 3G, iPod 1 and 2) are limited to 1024 * 1024 textures. The newer devices can use upto 2048 * 2048
精彩评论