This article outlines the process of compiling your GameMaker Studio 2 project into an Amazon Fire APK file which can then be uploaded to Amazon for sale and distribution or testing.
Actually compiling an APK is very straightforward as long as you have previously set up GameMaker Studio 2 for testing and can get your project to run on your test device(s). If you haven't already gone through this process, please see the following article and then return to this one:
Once you can test on a device you are almost ready to build your game package, but first you need to take a moment to revise the different Game Options.
Amazon Fire Game Options
The Amazon Fire Game Options can be opened from the Resource tree Options menu (just double-click on the Amazon Fire entry), and it's here that you set up all the details for the final store-ready package that GameMaker Studio creates:
In this article we'll only run through the important parts of the Game Options for building the final game package, but you can find complete information for each section from the GameMaker Studio 2 manual. To start with let's look at the General Settings.
The most important things to fill out here are the Product Information and the Build Settings. The product information will be used to define how the product will be identified on the store, and you should give it a Display Name (which will be used on the Store and for the Icon name on Devices), a version number (always greater than any previous version you may have uploaded), as well as a unique Package Identifier. The Package Identifier is a reverse-url format identifier that is normally configured as "com.<CompanyName>.<GameName>".
IMPORTANT! This ID uniquely identifies your app on the device and on the Amazon App store. If you want to upload a new version of your app, the Package Identifier must be the same as the original APK that was uploaded. If you change the Package Identifier, the store will treat the APK as a completely different app.
You can see in the example image below how this should all look:
With the Product Information filled out, you should check the Build Settings next. If you've successfully been testing with a device then you probably won't need to change these, since if it builds for testing it should build for the final packaging, but it's a good idea to revise them and make sure that you are setting them correctly. In general, you always want to be on the latest build tools, support library and SDK. You should note, however, that if you are using any extensions you may need to bump the minimum SDK value up to whatever the Extension requires (check the documentation that comes with the extension).
The rest of the game options deal with various other features like orientation and gamepad support that you should check and change as required by your game before moving on to set up the Graphics.
Before compiling the game you should also check and make sure that the Graphics options are correct:
Important things to check here are the Screen Colour Depth and Texture Page options. With screen colour depth, if you choose 24bit then your gradients and glows will be much smoother and subtle with less "banding", but it comes with a cost as it will also impact on performance and it's still not the most used colour depth. This does not mean that your project won't run on a device with 16bit colour display, it will, but it may mean it's using extra resources for no gain.
For the texture page size, again, there is no strict rule for this, but you are probably better choosing a smaller size than a larger size (if in doubt, simply leave it at 1024x1024) to ensure compatibility with older Fire devices. However, choosing too small a size may impact performance as it can increase the texture swaps required, but too large a size may mean that your graphics get distorted on devices that have less vRam and so the texture is scaled down to fit in memory and then scaled back up to be drawn).
Icons And Images
The Icons and Images sections of the Amazon Fire Game options are where you set the different promotional images that your game will use on the Amazon App Store. Each image should be authored as a PNG file and set to the size given, and they will be used as promotional Icons, as well as on-screen icons and splash screens when your game has been installed on the end users device.
In most cases you should not have to change anything shown on the Permissions section of the Game Options. These should be set automatically for you when using GameMaker Studio functions, but if you are using any third party extensions then you may have to select a permission manually. See the documentation that comes with the extension for more details.
Compiling You Game
Once you have the Game Options correctly set up you are ready to compile your game as an APK for uploading to the Amazon app store. You can compile the game using either the VM or YYC options, although we recommend that final executables always use the YYC as it can give an important boost to performance. Note that the YYC may take longer to compile than the VM.
When you click the compile button you will be prompted to select a location to save the final APK to, and once selected the compilation of your game will begin. You should note that the compile process may need to connect to the internet to download additional files and tools, which in turn may prompt a firewall alert - if this happens you should allow the connection otherwise the build will fail.
Once the game has finished compiling GameMaker Studio 2 will open an explorer window on the created APK, ready for you to upload.
Publishing Your Game
Once you have the APK built you are ready to publish your game to Amazon, but note that you will be required to sign up as a developer beforehand. You can find out more from the link below:
Note that there is a small fee attached to becoming a developer with these sites. Once you've signed up, you will normally have to make an "App Listing", fill out some details and then upload the APK. In some cases, like if you want to use Google Play Licensing, you will have to have created the app listing before compiling the final APK file.
The actual details of the app submission progress for Amazon and Google are covered in the following articles: