Hello,
I have animated background created with spine. It has 4 files: .json, .atlas, and 2 images (5,3 mb and 2,8 mb)
It is created in 2048x1535 resolution.
I am testing it on iPhone 5s (real device)
I am adding it to a blank scene and the background takes about 40mb of memory.
auto backgroundNode = SkeletonAnimation::createWithJsonFile("beach_bg.json", "beach_bg.atlas");
backgroundNode->setSkin("S04Day");
backgroundNode->setAnimation(0, "s04_bg_animation", true);
backgroundNode->update(0.0f);
backgroundNode->setScale(this->getContentSize().width / backgroundNode->getBoundingBox().size.width, this->getContentSize().height / backgroundNode->getBoundingBox().size.height);
this->addChild(backgroundNode, 100);
In game we have 20+ scenes so basicaly after loading all scenes it can take up to 1 gb of memory which result in crash.
As far as my understaning goes this all this data is used for textures and running (textureCache->removeAllTextures()) will release all that memory.
I would like to know how I should reduce amount of memory it takes.