Amazon GameOn is a powerful set of flexible APIs that allows game developers to drive engagement and increase monetization through cross-platform competitions and tournaments. Amazon GameOn allows game developers to grant digital in-game and real-world prizes, and players and streamers can create their own user-generated competitions.
Starting today, it’s even easier to add GameOn to any game created with GameMaker Studio 2 thanks to the Amazon GameOn plugin created by YoYo Games, the maker of GameMaker Studio 2.
Introducing the Amazon GameOn plugin for GameMaker Studio 2
Today YoYo Games announced the release of their Amazon GameOn plugin for GameMaker Studio 2, their leading 2D game development engine.
Using the Amazon GameOn plugin, developers can add and manage competitive elements provided by Amazon GameOn, like:
- In-game and real-world prizes
This is all achieved in just a few clicks by using custom pre-made GameMaker objects and scripts.
The Amazon GameOn Plugin for GMS2 also includes a demo project that demonstrates how to leverage all the main features and APIs of Amazon GameOn.
Now let’s see how you can start playing with the Amazon GameOn plugin in GameMaker Studio 2.
Amazon GameOn requirements
Here’s what you need to start playing with the Amazon GameOn plugin:
- Amazon developer account
- AWS account (for billing purposes)
- The Amazon GameOn API key
- A tournament created via the Amazon GameOn console
Follow these simple steps to get started creating your first Amazon GameOn competition.
Importing the Amazon GameOn extension in GameMaker Studio 2
The first thing you need to do in GameMaker Studio 2 is download the Amazon GameOn plugin extension from the GameMaker marketplace.
You can find the extension from the link below:
Amazon GameOn Extension for GMS2
Once you have added it to your account, you can import it in your project by clicking on the top menu under Marketplace -> My Library.
Then follow the steps to import the extension in your project.
Test and submit your first score to Amazon GameOn
The extension includes a demo project and demo objects that help you get up to speed with the Amazon GameOn extension for GMS2.
Here’s a few steps that will allow you to submit your first score to Amazon GameOn:
- First, copy your Amazon Game API key. In the Amazon GameOn console, this is referenced as the public API key. This is what we are going to add to GMS2 and that will enable the connection between your game and the GameOn API.
- Once you copied your public API key, go to GameMaker Studio and under Objects, select Amazon GameOn Demo -> oAGDemoController and open it (see image below).
- In the Create Event, there’s a script that contains the most important variables of your game. For the sake of this exercise, we will just need to paste our public API key as the variable default_app_key.
- At this point, our game is ready to connect to our GameOn tournament! Let’s run the demo.
- The demo project will prompt you with a screen full of buttons. Those are demo buttons you can use to test your GameOn integration. Click on Player REGISTER.
- This will prompt a window asking for a public API key. However, as we already added our API key, it should just display it here. Click OK.
- All the remaining buttons will turn green. We are now connected to Amazon GameOn, and our player is correctly registered! If we want, we can update the name of our player, by clicking on Player UPDATE. Let’s call our player “Test 1."
- Now, we need to join a tournament. Let’s click on Tournament GET, which will allow us to enter the tournament we previously created in the GameOn console. Then we need to enter the tournament. Let’s click on Tournament ENTER. We are now in the tournament and we need to start a new match.
- Let’s click on Match GET, then Match ENTER. We can now submit our first score: click on Match SCORE and add a score of 1000 points. Click OK.
- Congratulations, your first Amazon GameOn score has been submitted!
If you go back to your GameOn console and navigate to your tournament, you will find the first score submitted (see image below for reference).
Submitting a score is just the first step.
You can use the extension to add full Amazon GameOn functionalities to you GMS2 game by using and customizing the pre-defined demo objects or by leveraging the underlying custom APIs and scripts provided by the plugin.
You can find full documentation for the GameOn plugin on the YoYo Games website here:
Amazon GameOn Plugin for GMS2 - Official documentation
Thanks and stay tuned for more GameOn news!
-Mario Viviani (@mariuxtheone)