I’ve register here for quite awhile but only manage to really look at it until few days ago. So I’ve a question here about how to do a task, if this function is not available, then I hope to make it a suggestion.
But first, let me state my problem.
CCSpriteBatchNode - This feature creates a more efficient way to reduce draw calls for OpenGL, but the problem is that, Sprite Sheet is a huge file and can take up alot of memory especially if there are any unused sprite, it will remain in memory togather with the other part since they are togather. Example for a game that can change equipment which has 100 different weapon, they all have to be loaded into a SpriteSheet togather with another 100 armor, this is a waste of space since the other weapon or armor are unused.
**CCSprite without Batch * - If the weapon are put into separated files, only 1 kind of weapon and 1 armor is loaded, this saves alot memory but create draw calls and frequent texture switching for OpenGL, since it cannot be loaded into the SpriteBatch.
My question is, is there any feature for me to “redefine”/“modify” a Sprite Sheet on runtime? For example, I first create a large Sprite Sheet using some texture packing tools that has 1 Background, 1 weapon, 1 armor, 1 character, 1 hair, and so on. Then later I will be able to draw the whole scene using the same sprite sheet. Even multiple draw calls does not require texture switching. Then when I wanted to change the armor for example, I will load that particular small file and replace the armor on the sprite sheet.
I understand that CCRenderTexture might be the option, but I would like to double confirm it and hope to get some suggestion on how should it be done so I do not need to modify the original cocos2d project.
**If there is a need for suggestion, I would be glad to give out my opinion to improve the framework. But at the sametime, I do not wish to interrupt the development because I understand Cocos2D-x is build base on Cocos2D-iphone and a constant framework is important between them. =D