Resource Texture Compression
Graphics Resource Memory
During the running of a minigame, excessive memory is one of the most troublesome problems for developers. When a minigame uses too much memory, under the operating system's memory management mechanism, it may cause crashes or failure to run, resulting in user loss. According to statistics, more than a thousand minigames have poor memory usage, and the crash rate caused by memory remains persistently high.
Among memory usage, graphic memory is often the biggest consumer of game memory. For heavy games, we have found that the memory used by graphics rendering accounts for an even larger proportion. Therefore, optimizing graphic memory is very necessary for reducing overall memory usage.
Texture Compression
Is there a good way to reduce the memory usage of graphics rendering resources? Texture compression is an image compression technique used specifically for storing textures in computer graphics rendering systems. The difference from ordinary image compression algorithms is that texture compression algorithms are optimized for random access of texels.
Compressed Texture Compatibility
In terms of the compression formats supported by platforms, the compressed texture formats currently supported by minigame device platforms are shown in the table below. This table shows the maximum set of compressed texture formats supported under each platform.
| Platform Device | Compressed Texture Format |
|---|---|
| iOS | ASTC, PVRTC, ETC1 (High-Performance mode only) |
| Android | ASTC, ETC1, ETC2 |
| Windows/Mac | XT5, DXT3, DXT1, BC4/5/7 |
| Developer Tools | DXT5, DXT3, DXT1, BC4/5/7 |
In general, ASTC is recommended for mobile device platforms, while DXT5 is recommended for scenarios such as PC and Mac.
During development, developers should also fully consider the compatibility of different compressed texture formats across different device platforms, operating system versions on device platforms, chip support, and other aspects, so as to use the compressed texture format with the highest compatibility and ensure a normal gaming experience for game users.
