{"id":3306,"date":"2014-03-21T20:25:20","date_gmt":"2014-03-21T20:25:20","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/21\/problem-about-sprite-sheet-collection-of-common-programming-errors\/"},"modified":"2014-03-21T20:25:20","modified_gmt":"2014-03-21T20:25:20","slug":"problem-about-sprite-sheet-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/21\/problem-about-sprite-sheet-collection-of-common-programming-errors\/","title":{"rendered":"problem about sprite-sheet-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a4c839f9afdbf8b75938181dac77e544?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nhemant<br \/>\nios cocos2d-iphone sprite-sheet texturepacker<br \/>\nI am animating a whole body through SpriteSheets with CCSpriteBatchNode and CCSpriteFrameCache. Now user can add his own pic to that body which when i try to addChild to Spritesheet crashes with error &#8220;CCSprite is not using the same texture id&#8221; Now i know the face CCSprite was not in that cache\/texture(it was created through texturepacker) and the crash was normal but i wanted to know if there was a workaround to this as i have to add a face to that body through user interaction and animate that<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7a4b2811e8da375f2aed10806676d21c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKsK<br \/>\nios6 cocos2d-iphone sprite-sheet<br \/>\nI have create a sprite sheet for non retina display and its working fine on simulator.. I have used the code -(Void)addSprites{[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@&#8221;image.plist&#8221;];CCSpriteBatchNode *spriteSheet = [CCSpriteBatchNode batchNodeWithFile:@&#8221;image.png&#8221;];[self addChild:spriteSheet];\/\/ Load up the frames of our animationNSMutableArray *walkAnimFrames = [NSMutableArray array];for(int i = 1; i &lt; 5; i++) {[walkAnimFrames addObject:[[CCSpriteFrameCache sha<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6731745b602d7951d55e4a605a2f86e6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nScott Pfeil<br \/>\niphone cocos2d cocos2d-iphone sprite sprite-sheet<br \/>\nI&#8217;m trying to use more than one sprite sheet because I can&#8217;t fit them all on one and having two makes my ordering them easier (sprite sheet one sprites are in the back and have a lower zOrder). I&#8217;m currently doing:spriteSheet1 = [[CCSpriteSheet spriteSheetWithFile:@&#8221;spriteSheet1.png&#8221; capacity:3] retain]; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@&#8221;spriteSheet1.plist&#8221;]; [self addChild:spriteSheet1];spriteSheet2 = [[CCSpriteSheet spriteSheetWithFile:@&#8221;spriteSheet2.pn<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>hemant ios cocos2d-iphone sprite-sheet texturepacker I am animating a whole body through SpriteSheets with CCSpriteBatchNode and CCSpriteFrameCache. Now user can add his own pic to that body which when i try to addChild to Spritesheet crashes with error &#8220;CCSprite is not using the same texture id&#8221; Now i know the face CCSprite was not in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3306","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3306"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3306\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}