Exporting a Godot 4.4 Game to the Anbernic RG35XX H

 


🎮 Exporting a Godot 4.4 Game to the Anbernic RG35XX H (MuOS / PortMaster)

This guide will walk you through:

  1. Setting the screen resolution in Godot

  2. Exporting for Linux ARM64 with proper settings

  3. Creating a .sh launcher and controller map

  4. Copying everything to your SD card

  5. Running your game from the Ports menu


I’m working with the MuOS operating system and the PortMaster app. Make sure you're connected to the internet so you can pull the runtimes from the PortMaster Database.


✅ STEP 1: Set the Correct Screen Size

The RG35XX H screen is 640 x 480, so you’ll want your game resolution to match.

  1. Open your project in Godot 4

  2. Go to Project → Project Settings

  3. Navigate to: Display → Window → Size

Set:
Width: 640

Height: 480

  1. (Optional for scaling):
    Set Stretch Mode to 2d
    Set Stretch Aspect to keep


✅ STEP 2: Export the Game for ARM64 Linux

  1. Go to Project → Export

  2. Add a Linux/X11 preset

  3. In the export options:

    • Uncheck "Embed PCK"

    • Architecture arm64

    • Enable ETC2 and/or ASTC under texture compression

Export the .pck file only.
Name it something like: mygame.pck

⚠️ Don't export a .x86_64 binary. You'll use a shared Godot runtime later.


✅ STEP 3: Create Your Game Folder

On your computer (before copying to the SD card), make a folder with the name of your game. Example:

/MyGame/

├── mygame.pck

├── mygame.gptk   ← controller map



✅ STEP 4: Write the Controller Mapping File (.gptk)

This file tells PortMaster how to map device buttons to keyboard inputs. Create mygame.gptk and include something like:

 

a = space

b = esc

x = shift

y = tab

start = enter

select = esc

up = w

down = s

left = a

right = d


You can customize this based on what your game needs.
Full guide here:
👉 https://portmaster.games/gptokeyb-documentation.html#keyboard-mapping-options


✅ STEP 5: Create a Launcher Script (.sh file)

  1. Create a file named: MyGame.sh

  2. Paste in this template and customize the top variables: https://github.com/binarycounter/Westonpack/wiki/Godot-4-Example

  3. Update these Variables in the script:

 


godot_runtime="godot_4.3" #match runtime to the Godot version you are using

godot_executable="godot44.$DEVICE_ARCH" #match runtime to the Godot version

your_port_folder="MyGame"

pck_filename="mygame.pck"

gptk_filename="mygame.gptk"


Make sure:

  • pck_filename is the name of your .pck file

  • gptk_filename is the name of your controller map file

📄 Example source:
👉 https://github.com/binarycounter/Westonpack/wiki/Godot-4-Example


✅ STEP 6: Copy Everything to Your SD Card

On your RG35XX H SD card:

Place your folder here:

swift

 

ports/MyGame/

    ├── mygame.pck

    └── mygame.gptk


Place your .sh launcher here:

bash

 

/ROMS/Ports/MyGame.sh


Make sure you put the sh file in ROMS/Ports/ and the folder in ports/ (notice the different capitalization)



✅ STEP 7: Run Your Game on the RG35XX H

  1. Boot your device and go to Ports in Explore Content

  2. Press X > Refresh Lists or reboot

  3. Your game should now appear and launch!



🧭 Helpful Links



Problems I had

The game wouldn’t load. At first it was because I didn’t connect my Console to the wifi so it could pull the needed runtimes from portmaster.


The game wouldn’t load. After connecting to wifi found out I was pulling the wrong runtime. I programmed the runtime to be the Godot 4.3 when I was exporting the game from Godot 4.4. So I needed to update the .sh file with the right runtime requests.


The game would load but the controls didn’t do anything, I had to reset the console to turn off the game. I had just copy and pasted the template from gptk template. It didn’t have the right stuff in it. So I pulled up my game and found the inputMap and used AI to help me find the right way to write the script. It was a lot simpler than the template for my game. The game I was importing is really simple. In the future when I move over more complicated games I see this becoming a challenge.

Everything was working well after that. Join the Godot Discord to find help if you get stuck.

Comments

Popular posts from this blog

MuOS: Operating System for Game Console

Game Publishing Platforms and Methods