Tag Archives: CCSpriteFrameCache

Cocos2D Sprite Sheet Animation

By | March 29, 2011

Hi, Suppose you have a sprite sheet of the desired animation you want. But how will you use that sprite sheet animation in your program using cocos2D? That’s simple. See the following code first. Note : But how to make a sprite sheet? That topic can be found here. Making of sprite sheets from individual… Read More »

Sprite Sheet Animation in Cocos2D – An Example

By | March 14, 2011

Hi, Suppose you have a sprite sheet of the desired animation you want. But how will you use that sprite sheet animation in your program using cocos2D? That’s simple. See the following code first. //Initializing a CCSpriteBatchNode with our sprite sheet image CCSpriteBatchNode *newSpriteSheet = [CCSpriteBatchNode batchNodeWithFile:@”jumpingOver.png”]; //Adding the spriteSheet to the layer & setting… Read More »

How to remove unwanted frames from memory in iPhone?

By | February 13, 2011

In Cocos2D in iPhone often you may be using spritesheets which amy cause memory leaks because they are unused textures in memory even when you go from one scene to other. So make sure to remove all those unwanted textures from memory to save memory. Copy this following code to dealloc function in your class… Read More »