GameMaker games usually have a data.win OR game.unx file which contains the main data to make the games work. As the games are not meant to run natively on ARM devices supported by portmaster, it uses gmloader together with an appropriate wrapper (.apk file) to help translate the data into information which can be read by arm devices. Based on the current limitations of gmloader, games which uses the YoYo Compiler (i.e game data is stored directly on the .exe of the game file) are currently not portable.
Note: the following instructions assumes you already have Portmaster installed on your device. It is also a lot more convenient to SSH your files via WIFI to your device rather than physically transferring the data via an SD card reader.
- Download the test.zip from https://github.com/Fraxinus88/GMloader-ports/blob/main/Test/Test.zip
- Download Undertale Mod Tool from https://github.com/UnderminersTeam/UndertaleModTool
- Legally obtain your GameMaker game files from Steam or GOG or Itch.io OR try the many wonderful free ones available from websites such as https://itch.io/
- Locate the data.win or game.unx file inside the game files and open it using the Undertale Mod Tool and determine the GameMaker version to see which wrapper (.apk) can help to translate the game information appropriately.
- You can find the game version at the top of the window or under Data -> General Information -> Version
- Copy the appropriate wrapper version from here
- Delete test.apk and rename the wrapper (e.g rename GMS 2.2.2.302.apk to test.apk)
- Place all your game files (data.win, audiogroup.dat, .ogg file) and folders under /test/gamedata
- Place Test.sh and /test folder into your ports folder on your device (e.g roms2/ports).
- Run Test under your ports menu to see if your game works.
If your game works... then it is time to edit your filenames and troubleshoot!
Script Name: Test.sh -> Game Name.sh Game folder name: /test -> /gamename Under your gamefolder you need to rename the following 2 files: test.apk ->gamename.apk test.gptk -> gamename.gptk
Note: The script should have capital letters (like Port Name.sh ) and must end in .sh , the port directory (Game folder name) should be the same as the containing directory. Usually it is combined into a single word with no space and all in lowercase.
Replace the highlighted parts above with your Game Name and renamed folders and files. The .zip usually has the same name as your game folder name. The above lines will be replaced as such:
"# PORTMASTER: test.zip, Test.sh → # PORTMASTER: gamename.zip, Game Name.sh"
"GAMEDIR="/$directory/ports/test" → GAMEDIR="/$directory/ports/gamename"
"$GPTOKEYB "gmloader" -c ./test.gptk & → $GPTOKEYB "gmloader" -c ./gamename.gptk &"
"./gmloader test.apk → ./gmloader test.apk"
Kindly refer to https://portmaster.games/gptokeyb-documentation.html
First and foremost, if the GameMaker game has in-built gamepad controls, you may edit all the lines as the following:
The backslash" basically means that the input from the .gptk file is empty and hence controls will mainly be gotten from the in-build SDL2 controls available on your handheld.
If your game solely utilizes mouse and keyboard controls, then use the above link to remap the controls appropriately (i.e play the game on your computer first to see the controls in the menu and in-game to decide how to rebind the controls)
Join the Portmaster discord server and put a new post under #testing-n-dev and the Portmaster discord community will help you with your port.
There are many games which requires patches or extra coding to help the game run optimally (i.e prevent slowdowns, fix missing sounds)