2K 借助 Play Asset Delivery 提供高清画质
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
背景
Cat Daddy Games 是一家全资 2K 工作室,总部位于华盛顿州柯克兰。NBA 2K Mobile、NBA SuperCard 和 WWE SuperCard 系列背后的团队正在寻找一个解决方案来为用户提高游戏的整体质量,具体方法是在支持这些游戏的设备上提供更优质的素材资源。
他们实现了 Play Asset Delivery,以简单而更灵活的方式针对每位用户的设备配置生成并提供经过优化的 APK,并使用纹理压缩格式定位功能针对特定设备提供更好的美术资源并减少资源下载。
策略
首先,Cat Daddy 从使用 APK 扩展文件数据分发系统改为使用新的 Android App Bundle (AAB) 和 Play Asset Delivery (PAD)。Studio 将 PAD 集成到了基于 Gradle 的自定义构建系统中,并对客户端代码进行了细微更改,从而顺利地将旧版下载替换成了 PAD 快速跟进式下载。
已废弃的 APK 扩展文件系统与应用的版本号相关联,这增加了开发和测试过程中的额外复杂性。新的 AAB 系统会创建一个与版本无关的独立软件包,Cat Daddy 使用内部应用分享门户轻松对其进行测试。这不需要上传带版本号的 OBB 数据,也不需要关注本地测试 build 的应用版本。
Cat Daddy 在 PAD 系统上最喜欢的功能之一是能够提供纹理压缩格式专用数据文件。这完全在 Google Play 端实现,无需对客户端进行任何更改。Google 会检测设备的功能并提供适当的数据。Cat Daddy 只需将额外的数据文件添加到其 build 中,剩下的交给 Google 即可。这些数据格式不计入任何文件大小限制。
Cat Daddy 为支持 ASTC 纹理压缩的设备提供了一组额外的数据文件。之前,该团队一直在使用 ASTC 在所有设备上呈现高品质图片,以保持质量和压缩效果,同时针对不支持 ASTC 的设备在 CPU 上解压缩纹理。Studio 将 ETC1 用于 GUI 图形。
成果
通过实现 PAD,Cat Daddy 能够进行不依赖于版本的素材资源管理。该工作室的游戏将整个 build 包含在一个 bundle 中,而不是拆分资源。这样可以获得更清晰、更灵活的构建和测试环境。通过使用纹理压缩格式专属数据,它们能够为所有纹理(包括 GUI)提供采用 ASTC 格式的数据包,从而为支持 ASTC 的设备提供更高质量的 GUI 图形。
对于《猫爸爸》游戏的玩家,他们一直大力缩减素材资源大小,从而优化下载速度,提供更顺畅、更顺畅的游戏体验。
开始使用
详细了解 Play Asset Delivery 和纹理压缩格式定位,以立即开始使用。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2021-10-20。
[null,null,["最后更新时间 (UTC):2021-10-20。"],[],[],null,["# 2K delivers higher quality graphics with Play Asset Delivery\n\nBackground\n----------\n\nCat Daddy Games is a wholly-owned\n[2K](https://play.google.com/store/apps/dev?id=6681606924556273560) studio based\nin Kirkland, Washington. The teams behind the NBA 2K Mobile, NBA SuperCard, and\nWWE SuperCard series were looking for a solution to improve the overall quality\nof their games for users, specifically by serving higher quality assets on\ndevices that support them.\n\nThey implemented Play Asset Delivery, which offered a simple\nand more flexible way to generate and serve optimized APKs for each user's\ndevice configuration, and used Texture Compression Format Targeting to deliver\nbetter art assets for specific devices and reduce asset downloads.\n\nWhat they did\n-------------\n\nTo start, Cat Daddy switched over from using the APK Expansion File data\ndelivery system to the new [Android App Bundle (AAB)](/guide/app-bundle) and\n[Play Asset Delivery (PAD)](/guide/playcore/asset-deliverysystem). The studio\nintegrated PAD into its custom Gradle-based build system, and with minimal\nclient side code changes, smoothly replaced their legacy download with a PAD\nFast Follow download.\n\nThe deprecated APK Expansion File system was tied to the app's version number,\nwhich added extra complications while developing and testing. The new AAB system\ncreates a version independent, self-contained bundle, which Cat Daddy easily\ntested using the Internal App Sharing portal. This does not require uploading\nthe versioned OBB data or being concerned about the app version of local test\nbuilds.\n\nOne of Cat Daddy's favorite features in the PAD system is the ability to provide\n[Texture Compression Format specific data files](/guide/playcore/asset-delivery/texture-compression).\nThis is implemented entirely on the Google Play side without requiring any\nclient changes. Google detects the capabilities of the device and serves up the\nappropriate data. Cat Daddy only needed to add the additional data file to its\nbuild, and Google did the rest. These data formats do not count against any of\nthe file size limitations.\n\nCat Daddy provided an additional set of data files for devices that support\nASTC texture compression. Previously, the team had been using ASTC for\nhigh-quality artwork on all devices to maintain quality and compression,\ndecompressing the texture on the CPU for devices that do not support ASTC.\nThe studio used ETC1 for the GUI graphics.\n\nResults\n-------\n\nBy implementing PAD, Cat Daddy is able to have version-independent asset\nmanagement. The studio's games have the entire build contained in a single\nbundle, rather than separating out the assets. This results in a much cleaner\nand more flexible build and test environment. By using Texture Compression\nFormat specific data, they provide data packs that use ASTC format for all\ntextures, including the GUI, which results in higher quality GUI graphics for\nthose devices that support ASTC.\n\nFor the players of Cat Daddy's games, they maintained aggressive asset size\nminimization that resulted in download speed optimizations, providing a more\nseamless and smoother gameplay experience.\n\nGet started\n-----------\n\nGet started today by learning more about\n[Play Asset Delivery](https://developer.android.com/guide/app-bundle/asset-delivery)\nand [Texture Compression Format Targeting](https://developer.android.com/guide/playcore/asset-delivery/texture-compression)."]]