09 junio 2020
Posted by Dan Galpin, Developer Advocate
Two years ago, we introduced the Android App Bundle, a new publishing format that allows Google Play to help optimize your app delivery. The app bundle is now Play’s recommended publishing format; with almost 50% of all top apps & games already using it.
It replaces the traditional monolithic APK at publishing time, allowing you to package all of your languages, screen densities and device architectures into a single artifact. The bundle itself can't be installed; Play takes care of generating APKs optimized for each requesting device from the single bundle that you publish.
Dynamic Delivery with App Bundle Produces Optimized APKs
Apps have seen great success with app bundles, but games often have different delivery challenges.
Today, large Android games rely on APK Expansion Files and custom Content Delivery Networks (CDNs) to deliver content. APK Expansion Files, also known as OBBs, support large resources but require you to maintain an additional publishing artifact, which causes many developer issues. Using CDNs for resource delivery often results in a suboptimal user-experience; users install and open the game just to face a long progress bar as they wait for additional resources to be downloaded. Users may also have to wait for updated resources, rather than having them delivered as part of the game auto-update. Finally, CDNs usually aren’t free, so this way of delivering game assets also involves extra cost that needs to be accounted for.
To handle the unique needs of games, Play is introducing Play Asset Delivery, giving you dynamic delivery of the right game assets to the right devices at the right time at no additional cost. To achieve this, we extended the Android App Bundle publishing format by adding asset packs.
The contents of an Android App Bundle with one base module, two dynamic feature modules, and two asset packs.
Asset packs contain non-code game content such as textures, materials, and sounds. They are served from Google Play with large size limits that are ideal for games, and you can customize how and when each asset pack is downloaded onto a device.
Play Asset Delivery (PAD) lets you rely on Google Play to take care of updating your assets, just like it does with your game binary. When your app auto updates, the entire game gets updated, including all assets. When your users open the game, they will already have the freshest binary and assets, and they won’t need to wait for resources to get updated. Play also takes care of delta patching for you, minimizing the download size and the update time.
To handle cases when the user opens the game before it has had a chance to update, you can trigger updates within the context of your game with our In-App Updates API.
You can customize when asset packs are installed according to three delivery modes: install-time, fast-follow, and on-demand.
install-time
asset packs allow you to deliver up to 1GB of game assets as part of the initial game installation. To your app, this works like a large APK, with no need for expansion files or special API calls. Just package your assets in asset packs and publish to Play.
fast-follow
asset packs are automatically downloaded as soon as the app is installed, allowing the user to start playing while important assets are still downloading. The app doesn't have to be opened for the download to start.
on-demand
asset packs are downloaded upon request by the app.
Both on-demand and fast-follow assets are delivered as raw files and placed in your game’s internal storage. You can track download progress with the PAD API and access the assets directly using file system calls.
When using Play Asset Delivery, you get to take advantage of the App Bundle format, which allows Play to optimize the binary for the device, making it easier to support both 64-bit and 32-bit devices and different CPU architectures such as ARM and X86. We also want to help you serve the optimal set of assets to each device, and the first step in this direction is texture compression format targeting.
In an upcoming release of Play Asset Delivery, you'll be able to package textures in multiple texture compression formats, relying on Play to serve optimal assets per device model. This means you won't need to compromise by using suboptimal texture compression formats, and your users will always get the best assets suitable for their device without wasting network bandwidth or having suboptimal loading performance.
Asphalt 8 by Gameloft
Gameloft integrated Play Asset delivery into Asphalt 8, Asphalt Xtreme, and Minion Rush. Asphalt Xtreme was easy to switch from using APK expansion files to using PAD with install-time delivery. Asphalt 8 and Minion Rush both originally used a custom CDN, which Gameloft replaced with PAD. They were able to leverage fast-follow and on-demand delivery by replacing their custom CDN calls with calls to the PAD API. They saw the expected reduction in CDN costs, but with fast-follow delivery, they have also seen a significant increase in the number of users who completed the secondary download to start playing the game. This resulted in better user retention, with 10% more new players compared to their previous CDN asset delivery system. With the promising early results and seamless implementation process, Gameloft plans to use PAD in more of their upcoming releases. Read more about their experience.
Puzzle Kids - Animals Shapes and Jigsaw Puzzles by RV AppStudios
US-based developer RV AppStudios has over 200 million downloads to date across their portfolio of casual games, educational kids apps, and utility apps. Their Puzzle Kids app delivers over 23 MB of assets as players progress through the levels. When they switched from a third-party CDN to using Play Asset Delivery’s on-demand mode, they saw a 4.7% increase in 15-day retention and 21% reduction in crashes & ANRs. Overall, these changes helped improve the user experience by offering more stable, transparent, and secure downloads, while also saving costs for RV AppStudios. Read more about their experience.
We're committed to helping you serve your entire game through Play with customized dynamic delivery. Play Asset Delivery, with the new app bundle format for games, along with its three delivery modes and updates + patching are all generally available. You can find documentation at d.android.com that will walk you through the integration process depending on the game engine you use.