Google Play Games on PC
Google Play Games (GPG) is a related technology developed by Google that allows you to publish and play your mobile APK on PC.
Starting from v3.8, Cocos Creator will provide support for publishing to GPG. This will help your Android version of the game to be published on PC platform for more growth.
In order to publish on GPG smoothly, we recommend you to read the GPG official website first to get involved with GPG SDK quickly.
Integration Guide
In order to get your app on the shelf smoothly, please check that the following steps are all set.
In order for the game to run on Windows (both intel and AMD chips), you need to build it with x86 architecture. When building in Cocos Creator, check APP ABI and check the box x86_64:
x86_64 supports both x86 and x64 builds, so we recommend that you check x86_64 for future changes in requirements.
The highest version of OpenGL ES supported by Cocos Creator is 3.1, please check the GLES options in the following figure if you want your application supports OpenGL ES.
Vulkan version is not higher than 1.1. For Cocos Creator to support Vulkan, you need to check Vulkan in the build options, please refer to the figure below.
The relevant mobile platform features and permissions need to be removed, according to the Functional testing requirements and Quality testing requirements. Currently, the default build of Cocos Creator does not cover these features or permissions.
Remove the Permissions dialog for Android apps, Details.
Remove the unsupported Google Play API, Details.
Enable scoped storage when the application needs to read and write to external storage, example is as follows:
Find AndroidManifest.xml in the project directory.
After adding the permissions:
Fore more details, please refer to Enable scoped storage.
Scaling UI
Cocos Creator supports adaptive UI. For most mobile games, the resolution is determined when the app is launched, so there is no need to consider the adaptation, but on GPG, since the user can resize the window through the outside of the window, you need to adapt the resolution separately.
We recommend you to select Widget component and make sure its Align Mode is On_WINDOW_RESIZE or ALWAYS.
- GPG Interface Scaling
- Multi-resolution Adaptation Scheme
- Widget Component Reference Adaptation of child UI
For more details, see UI Practice Guide
For adapting devices with large screens, you can refer to Google Responsive Layout for Large Screen Device Development.
GPG requires support for a 16:9 aspect ratio. For an ideal player experience, the game should also support 21:9, 16:10 and 3:2. Portrait mode games only need to support a 9:16 aspect ratio. If your game lacks landscape support, Google Play Games will render black bars in full screen mode. Again, see the Widget component section above.
Adapting to window transformations, the resolution rendered by GPG games will change the game's rendering resolution at game startup, at window resize, and when switching between full-screen and window models, details.
To ensure that users do not lose progress when switching between mobile devices and PCs, please check that your game meets Google's requirements for continuity, see About continuity and cross-device play
Release process
The GPG release process is similar to the Android release process, you can refer to the following documents for release support.
Content
Related links
Interface descriptions
To determine whether the runtime is HPE, use the following code:
if( sys.hasFeature(sys.Feature.HPE) ) {
...
}