📜 ⬆️ ⬇️

Creating instant games on Unity in Google Play Instant

Hello! Translated an article from Google with step-by-step instructions for creating an Instant Game on Google Play for games on Unity.



Google announced Google Play Instant in March 2018; since then, game developers can create instant-dive games. There are several ways to attract players to instant games: from the TRY NOW button (“Try it Now!”) On Google Play to the usual link that users can share with each other. Thanks to this, developers can demonstrate their game and attract new users. This article describes how to create a build of ready-to-release instant games on Unity from scratch, as well as the benefits of instant games. Continued under the cut.
')

With the help of Google Play Instant, you can take your games to a new level:


1. Increase the possibility of finding (discoverability)
image

Thanks to Google Play Instant it will be easier for players to find and try your game. Users can launch your game from the Google Play Store with one click - the TRY NOW button will appear next to the download button, you can also go to the instant game from the mobile site simply by clicking on the web banner.

image

And that is not all. Users can try your game on the shared link through Google Search, social networks, instant messengers, email and other platforms.

image

2. Move to install
image

Since players do not need to install the game on the device, they will agree to try it with great enthusiasm. Instant games do not require installation time and do not occupy the memory on the user's device. They give the user a chance to see the best in the game, and then install the full version without losing progress.

3. Improve retention.
image

When you give the user a chance to try your game, they are convinced that it is worth it to install it. It also reduces the number of users who delete the game immediately after installation. Users install the game consciously and enjoy it, which increases the number of players who installed it.

Game developers have already appreciated the advantages of instant games in comparison with installed games (cases in English here):


This is just the beginning! Here you can see other successful cases using Google Play Instant.

How to seamlessly integrate Google Play Instant with a game on Unity?


You can build an instant game and place it on the internal platform for testing in a few hours. You can test your game and immediately show it (if it does not exceed the limit of 13.5 MB for games on Unity). You will see the TRY NOW button in the Play Store. After the game is placed in the test environment, you need to focus on the following:


Depending on the complexity of the game and the details of the implementation, the time you spend on these steps depends.

What's next?


Create an instant game in 5 steps.

Step 1: Create a Workbench


Before you start creating an instant game, go over the checklist to make sure you have everything you need.


Step 2: Collect and test the instant game


Now you convert an existing game into an instant game. Do not worry yet about reducing the size or building the build for an instant game - this instruction will give you the opportunity to understand how the whole process looks.

1. Select PlayInstant → Build Settings

image

2. In the drop-down menu, change the Android Build Type to Instant


image

3. Select PlayInstant → Player Settings . In the settings there will be a popup window:


image

4. After setup, select PlayInstant → Build and Run to run the instant application on the connected device.

Step 3: Load into the internal environment for testing


The last step with the created instant game - take the build and load it into the internal environment for testing the Play Store (up to 100 testers can be in it at the same time). To download the game to the internal platform for testing, it is not necessary to comply with the limit of 13.5 MB.


image
Manage instant application release via Google Play Console

Note: make sure that you have properly configured access for the list of internal testers of the application. Change settings here: App releases → Instant app internal test → Manage Testers .

Step 4: Reduce to a limit of 13.5 MB


After getting acquainted with all the technical subtleties of testing an instant game build, you need to decide what the game will look like and proceed with the reduction in size. Do not worry if the game weighs a lot - developers with assemblies of more than 350 MB in size can run instant games painlessly. Here are a few techniques for reducing assembly:

Settings Optimization

As we saw earlier in: PlayInstant → Player Settings , this menu offers a number of recommendations for reducing the size of an assembly. These changes reduce the size of the game:


Simplify game content

Do not try to cram the whole game into an instant application. Instant game should show gameplay - demonstrate a tutorial or a few special levels. Remove unnecessary textures, models, image and audio - in a word, everything is not the basis of the gameplay.

Finally, to reduce the size, compress the digital objects:


Read about the best UX practices in instant applications here: instant game UX best practices .

Asset Bundles

Asset Bundles will help you load assets right in the course of playing the game. If assets are not loaded before launch, they will not be counted in the limit of 13.5 MB. This is the most common way for game developers to reduce the size of an instant game. You need three components:

  1. A collection of assets created from the environment of your instant game.
  2. A boot screen that shows the user information about loading assets in the background.
  3. Web server or CDN as a host of assets.

We will tell you about the fastest and most effective way to use assets through the Quick Deploy tool included in the Unity plugin in Google Play Instant. This tool will allow you to create a set of assets and a working screen during which your assets will be loaded. For the third step, simply place the assets on any host that supports HTTPS and public files — for example, on your own server, on Google Cloud Storage, or on a third-party CDN.

Note: you can use as many sets of assets as you like, but each asset should not exceed 15 MB.

  1. Select PlayInstant → Quick Deploy
  2. Open the Bundle Creation tab, select the environment for dynamic display. After that, select Build AssetBundle at the bottom of the screen and upload the file to your web server or CDN.
  3. Open the Loading Screen tab and enter the URL for your asset set, as well as the background textures you want to use for the boot screen (one is enough by default). When finished, click Create Loading Scene .

image

You should have a boot screen that will trigger your set of assets. You can search for a custom auto-generated boot screen script for Unity, if you want to see how it is done, or customize it to suit you.

Step 5: Help the player move from instant game to installed game


Now we need to think about how the user will move from an instant to a full game. If necessary, you can transfer data through a dialogue using the Cookie API (built into the Unity plugin in Google Play Instant).

Update instant game to installed application

Your game should offer the user a way to install the full version - a tooltip or a button (but not during the gameplay!). When the user is ready to install the game, the plugin calls ShowInstallPromptmethod and sends the user to Google Play:

 using GooglePlayInstant; … public void install() { InstallLauncher.ShowInstallPrompt(); } 

Saving data when upgrading to the installed version (optional)

In some cases, you will need to save player data and its progress during an instant game. For example:


You can use the Cookie API, which comes in the Google Play plugin, this tool will allow you to easily write and read data lines before and after installation, respectively:

1. Call CookieApi.SetInstantAppCookie to save data lines from an instant game.

 using GooglePlayInstant; … public void StoreData(string data) { CookieApi.SetInstantAppCookie(data); } 

2. Call CookieApi.GetInstantAppCookie in the installed game to return the rows with data

 using GooglePlayInstant; … var data = CookieApi.GetInstantAppCookie(data); 

These steps will help you to master the process of creating a game through Google Play Instant. You can read more documents on the links, study frequently asked questions or get information about instant games .

Source: https://habr.com/ru/post/454966/


All Articles