Challenge. The APK was too large to upload to the Play Store, and load times were long.
Insight. PUBG Mobile ships multi-gigabyte maps from an APK of around 83 MB, so its content had to be downloaded on demand. I set out to do the same.
Approach
- Packaged gameplay, lobby, shop and level content as PAK files that are downloaded and mounted at runtime.
- Replaced hard references with soft references, so assets load asynchronously when needed and unload when they are not.
Results
- The APK dropped from 1 GB to 45 MB. It now ships only the main menu and the module that downloads everything else.
- Loading and unloading assets on demand lowered RAM usage.
- Loading only the PAK files in use improved cache hit rates.