Multi-game support in one app

That’s not right. We use a key/value json for the text/graphics in our app and this way we need a direct reference to the keys. We just add the json to the app, in case the app is offline at initial startup, but after that every app launch will download the latest version of the data.

But I can understand your thoughts about it. A game costs time and money and you don’t want to be rejected.

Regarding unloading resources, I believe there is a TextureCache which can be unloaded. I haven’t used it in a few releases so you’ll need to look it up yourself.

I call SpriteFrameCache::getInstance()->removeUnusedSpriteFrames(); every time I got a the onTrimMemory() callback in Android. This unloads all currently unused textures.

Unloading the entire TextureCache isn’t an option since my app still requires common textures that are in it. It’s only some that I need to remove, and I do have it working, but was asking if there was a better method to use.

As I mentioned in a previous post, I call getTextureCache()->removeUnusedTextures(), which removes everything in the cache that is no longer required, and it’s doing the job fine.

1 Like