How to load resources as read-only

Hello friends

I’m making a 2D game this time and I’m having a problem with memory management.

We’re using a few 4096-digit textures and they’re taking up too much memory

I’m not sure exactly when I load a resource, but it seems to take up about 120 MB

Based on this, it seems like the current resources.load() is loaded into the system memory as well

Is there a way to load this resource as read-only? I need both prefab and image.

1.If the textures size exceed 20482048, some devices will limit it and will cause the errors. It is better to use the images or textures which will not exceed 20482048.

2.resources.load will load the reources into the system memory.

1 Like

Unfortunately, the current game requires 3 images of 4096 in order to run.

Is there any alternative? Is there any way to load assets without loading them into system memory?

Is it possible to “only” free the loaded image from system memory?

I sorry that is the limitation of devices not in Cocos. The best way it to split to image into small ones, which is not exceed 2048 * 2048.

@Tom_k
The current task we are facing is to optimize RAM usage.

  1. Is it normal for resources.load to take up 128MB for a 4096 texture?

  2. I saw in other engines that if you don’t modify the image, you can load it as read-only, and in this case, you can load the same image with 64MB. Does cocos not have this function?

  3. Is there any way to minimize RAM usage without compressing it in another way?

We are currently developing a 2D decoration game, so it requires a lot of resources. This method is very urgent.