In the previous post in our series we walked through how to implement in-app purchases in your game using GameMaker: Studio. So now that you have an IAP catalog full of great items and ready to generate revenue, we have to make sure your users stay engaged—and spending. We’ve seen that incorporating social elements into your game is a great way to boost engagement and help drive revenue.
Make your game social with GameCircle
Players today expect social features like friends, leaderboards and achievements. They also expect to be able to play your game on all of their devices without losing their progress and settings. Amazon GameCircle offers several features to improve engagement and retention. Leaderboards allow players to compare scores with their friends (and maybe their enemies) to capture the coveted top score status. Achievements provide mileposts for players to help pull them through the experience and keep them engaged and exploring the game. Finally, Whispersync for Games provides a way to store game progress and settings in the cloud so they automatically sync to every device on which your customers play your game. GameCircle is supported on Amazon Appstore titles running on Amazon devices and other Android devices.
Setting up GameCircle
To use GameCircle in your game, you first need to create the application in the Appstore developer portal and then create your GameCircle configuration. Click on “Apps & Services” and then click on the “GameCircle” link, highlighted with the blue box, below. Click the button labeled “Add a configuration”.
Figure 1 - Starting the GameCircle configuration
Select the app that will use the GameCircle configuration and complete the information on the Game Details page. At the bottom of the page, select “Create a new security profile” from the Security Profile drop-down list.
Note that it is possible to have multiple apps use the same GameCircle configuration, such as if you have a “lite” and a full featured version of the app that you want to share the same leaderboards and achievements. For more details, see the “Shared Configuration” section of “How does Amazon GameCircle work?”
The next step is to generate the API key for your game. To create the API Key, you’ll need the Android package name for your app, and the MD5 and SHA256 signatures for your app.
The package name is the name you set on the Android tab of the GameMaker: Studio Global Game Settings dialog box, highlighted in the picture below.
Figure 2 - Package Name in Global Game Settings
The MD5 and SHA256 signatures come from the keystore you use to sign your app. The keystore is configured in the GameMaker: Studio Preferences dialog box. However, the signatures you need are not shown in this dialog. You can obtain the signatures using a Java utility, keytool, as described in this document.
The keytool output you care about is in the “Certificate fingerprints” section.
Copy the signatures exactly as they are and paste them into the MD5 and SHA256 text boxes.
Click the button to generate the new API key for your game. The API key is a long string of characters and is what associates your game with the configuration you’ve created.
Getting your GameMaker: Studio project ready for GameCircle
Now that you’ve set up the basic configuration on the developer portal and downloaded your API key, let’s set up your game project to connect to GameCircle.
Click the “Download to file” button and add this file to your GameMaker: Studio project as an “included file”. Right click on the “Included Files” node in the project tree and select “Create Included File”.
Figure 3 - Adding the api_key.txt
As with the in-app purchasing that we added in the previous installment in this series, GameCircle requires the Amazon GameCircle extension to be added to the project.
You will also need to add the GameCircle features you plan to use to the AmazonGameCircle_InitFeatures statement. If you followed the IAP blog, you currently have:
If you don’t need IAP for your game, the process to initialize the features is still the same as described there.
The full set of features you can include here are:
In-app purchasing. This is not actually a feature of GameCircle, but YoYo Games has combined it in the same extension.
To include multiple features, you need to logically “OR” them together by separating them with the GML bitwise OR character “|” – such as:
AmazonGameCircle_InitFeatures(AmazonGameCircle_Achievements | AmazonGameCircle_IAP);
When the game starts up, a GameCircle notification pop-ups showing an icon for each of the GameCircle features – Leaderboards, Achievements and Whispersync – that your game supports. This is driven by the features you select in AmazonGameCircle_InitFeatures and helps inform your players what to expect.
In our next installment, we’ll work through adding Leaderboards and basic Whispersync features.
Miss the first five parts of the Building Retroids with GameMaker blog series?
Part 1: Studio
Part 2: Basic Controller Detection
Part 3: Handling Controllers
Part 4: Fire TV Remote and Controller Selection
Part 5: Implementing Amazon In-App Purchasing