Starting with the 2022.11 release, you can now have GameMaker detect mobile devices on your network and add them to the list of devices which are sent your game each time it has finished building for the GX.games target. It does this via a new device server which runs in the background whenever GameMaker is started up.
Before You Begin
You do need to have installed Opera GX Mobile beta on your phone, as this functionality is not yet in their stable release. How you get this differs by the phone's OS, so we will cover both below.
Android users, you need to opt-in to the Beta programme inside the Google Play app in order to do this:
- Open the Google Play app on your phone
- Find Opera GX Mobile and view its info page - you will find a button there allowing you to opt-in to Betas, so click that one
- Google Play will change the text to say you are currently being enrolled in the beta programme and then take a few mins
- Finally, that message will change again to now say you are opted-in
- At that point, download the Opera GX Mobile app for the first time/check for an app update if you had already installed it
(This is all regular Google Play stuff, btw - nothing custom to GX Mobile or GameMaker.)
iOS users, you currently get Opera Mobile's "Early Access" version by default from the App Store, so right now there is nothing extra for you to do. Please be aware if this situation changes in future.
On First Launch Of GameMaker
Note that this new server may well show various firewall prompts (particularly on your first launch) in Windows, etc., so ensure that you allow them when you see them.
We have found that if you do see one of these firewall prompts when first starting this version of GM (and so the prompt appears when you're on the Start Page or even earlier as GM is starting up) you might need to restart GM again one time after allowing the firewall access - otherwise, connections may continue to time-out during that one IDE session.
Please note that the MQTT server will by default use port 9001 on your host machine, but will also increment this over a small range if it detects that the port it wants is already in use (e.g., if you have multiple GameMaker windows open).
Detecting Your Devices
First, ensure that your PC/Mac and the desired mobile devices are all connected to the same network, as no devices will be able to connect if they are not on the same network.
Next, open the Target Manager and select GX.games, then click the pencil icon to open Device Manager.
From in here you can click the big button to add a device, which will show a QR code in a new popup window.
Scan that QR using GX Mobile on your phone by tapping the address bar when on the homepage and then clicking the QR button at the bottom of the screen.
Once your phone says you're connected you can close the QR code popup inside GM and you should see your device is now in the list inside GameMaker.
Note that devices are only linked to that one GameMaker IDE session - if you open multiple GameMaker instances at once, then you would still be connected to the original one only. Similarly, if you close and reopen GM, then you need to scan the QR code again on your device the next time you want to connect it.
Test Your Games
At this point, if you run the game inside GM, the phone will automatically launch the game in full-screen mode once it has finished downloading.
In the device list you have the ability to customise whether runs/create exes/both will deploy the game - so if you only want this deployment to your mobile devices to happen when testing your release candidate builds, for example, you can control this.