Current scene to static image : is this possible?

Current scene to static image : is this possible?


Hi developers. I encountered a speed problem in developing wechat game.
My scene has too many objects and works very slowly.
Is it possible that I can make a static image of my scene and replace objects with this image?
If it’s impossible, then is it possible in other game engines like Unity or Layabox?

Please let me know your opinion. Thanks.


Lets ask @Big_Bear for thoughts.

Do you mean take a screenshot of your scene and then use that screenshot in places in your game?

Cocos2d-x has RenderTexture that allows one to do what you are asking (if I understand properly). I think something similar should be possible.


Thanks for replying. What is wanted was to get an image of node that is bigger than screen.
Can I ask another question?
I have seen that wechat mini game limited cache size to 50MB.
I want to know it is related of size of resources we can download from external server.
So Big resource is available in making wechat mini game?


(a) About the WeChat mini game cache size
the WeChat game limited cache size to 50MB,it means that all download resources only had 50MB size to cache.
so, if all your resources is larger than 50MB,when you still to download some file, it will have problems on save file

you can use cleanAllAssets and cleanOldAssets to clean some unused file to ensure that your size is below 50MB


(b) About the large image of game.
if you use an image that is larger than canvas size, one suggest is that you can culling the large image to some smaller image nodes, and make up those nodes to realized the bigger image.
the biggest size that cocos supports is 2048*2048

©About “My scene has too many objects and works very slowly”
if the reasons for works slowly is too many draw call ,you can use dynamicAtlas to improve it.the dynamicAtlas is turned off by default on WeChat mini can add the code in game.js

dynamicAtlasManager.enabled = true;

and turn on the “cc.macro.CLEANUP_IMAGE_CACHE”
then you can use dynamicAtlas on WeChat mini game.
be attention,if you open the dynamicAtlas,it will cause memory rises.
for ttflabel you can turn on the “Batch as Bitmap” property

also, you can try to use “Async Load Assets” to improve the loading speed


Thanks for your answer.

I have learned a lot.
I know that if we use cc.loader.release() we can clear resources that we loaded by cc.loader
My question is can we clean asset that we used in the engine by variables?
I mean we often link assets to variables in cocos creator and those resources automatically loaded when scene loading.
Can we release those assets? Or we could only release those loaded only by cc.loader?

“My scene has too many objects and works very slowly”
This is not about the game. It’s about cocos creator engine.
I have many object in my scene and It’s very hard to change anything in cocos creator.
When my scene was smaller, it was fast.
Whenever I changed some of the code and return to creator it refreshes and it costs several seconds.
It takes me too much time.
Is there any way to solve this problem?



for those assets, you can change the “Auto Release Assets” property in Properties panel, When switching from current scene to the next scene, the engine will auto release all assets referenced by current scene will release

we had improved the editor on refresh and loading speed, the new editor will come in next version, expected in this month


I have only one scene and all things happen there and There are some nodes that their assets are to be released for the cache.
Is there a way in this case?
sorry to bother you. thanks.


You should never need to release all referenced assets for one scene game, in this case, you can cut your scene to some parts used prefab, and use cc.loader.release to release the unused assets.


I am not fully understood. you mean that all these objects in my scene should be prefab and all assets are loaded by cc.loader?
Or you mean that I should split scene to some sections and make the sections to be prefab?


yes, and use cc.loader to manage those prefab

closed #11

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.

opened #12


Thanks. that will solve my problem.

closed #14