![]() |
|
Universal app sprite sheet help - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html) +--- Thread: Universal app sprite sheet help (/thread-10257.html) |
Universal app sprite sheet help - MDev - Aug 19, 2012 05:31 PM Hello, I am having difficulty loading sprites from a sprite sheet. I am making a universal app in cocos2d. I have 4 sizes of each sprite: sprite.png, sprite-hd.png, sprite-ipad.png and sprite-ipadhd.png. I one folder with iphone art and one folder with ipad art which I populate the sprite sheets using Texture Packer. When I call the spriteWithSpriteFrameName there is an error: NSAssert1(frame!=nil, @"Invalid spriteFrameName: %@", spriteFrameName); Can anyone please tell me the way to do this properly? Code: - (void) spawnClownBumperThank you for your time, EDIT: So, I have gotten the iphone sprites to work by naming the .pvr.ccz file with the hd suffix (sprite-hd.pvr.ccz) and using just .png for the individual sprites in both iphone sprite sheets. Now, that doesn't work for the ipad. Only the low res image shows up by adding the -ipadhd to the .pvr.ccz (sprite-ipadhd.pvr.ccz) file. So, I make four sprite sheets with the different extensions and name the sprites within the sheets all the same? (.png) I really would love some help with how this should be done. please? Thank you so much |