Construct 2 – Google Play (Web App)

Tutorial

Scirra has added the support of the Google Play Games plugin for Crosswalk/Phonegap to the latest beta version (beta r185) of Construct 2. This tutorial shows you how to set it up and how to use it in your HTML5 and your Android games using Intel XDK.

Important!

This will not work on mobile devices. This is for web apps only.

Google Play

Add the ‘Google Play’ Plugin to your project

Make sure that you are using at least the beta version r185 or higher. Otherwise the updated plugin isn’t included in the C2 editor.

add_google_play

Configure the Plugin

Now select the ‘Google Play’ Plugin in the project bar (left side of Construct 2 editor).

select_google_play

Then you’ll get all plugin properties at the left side.

properties_google_play

You need to add the 3 ID’s under ‘Properties’.

  • Application ID
  • Client ID
  • Client Secret

Find your ID’s

Application ID

For Android: https://play.google.com/apps/publish/

Go to ‘Google Play Developer Console’ – ‘Game Services’ – [specific app] – the Application ID is the number next to the game name (e.g. “My Super Game – 12345678”,. The Application ID in this case is 12345678.)

Client ID

In order to get this ID you need to connect your Game with your Play Service. Login to your Google Play Developer Console, click ‘Game Service’ and choose your Game.

client_id_create

  • (1) – Click on ‘Game Service’ and choose your game.
  • (2) – Click on ‘Associated Apps’ and add a new one.
  • (3) – Select ‘Web’ platform.

client_id_create1

  • (4) – Enter your target URL where your game is located (Use the full path to it!).
  • (5) – Click Save and proceed to the next step.

client_id_verify

  • (6) – Authorize your app

client_id_verify2

Add ‘www.’ to your URL. Otherwise you get an error. No further steps are needed. Just click ‘Create Client’.

client_id_copy

As result you get your Client ID and your Secret ID.

  • (7) – Copy the Cliend ID and insert it at the Google Play ‘Properties’ section.
  • (8) – Visit the link to your API Console and copy your Secret ID and insert it at the Google Play ‘Properties’ section.

Test your game (Web App)

Now upload your game to the path you have entered (javascript origin) and open the link. Now you should be able to use it.

Demo: Zombie Resurrection

Note: It will take a while till your added Web Platform work. It’s normally that you get an error if you try it right after you have created it. Just give it a few hours. Then it will work.

error_400_scirra_google_play

 

Updated on May 6, 2018
Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Visist our Forum!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.