A sample libGDX game project targeting ArkOS using a custom Java SDL2 backend (gdx-backend-sdl2-arkos).
This setup produces a single fat JAR (game.jar) and all resources/launchers needed to run on ArkOS.
- Fat JAR export: All dependencies, including custom backend, in one game.jar.
- ArkOS-friendly native launcher and SDL2
.sopackaging. - Easy scriptable build/export (
assemblePort.gradle).
SampleArkOSGame/
├── assets/ # Game assets (textures, sounds, etc)
├── core/ # Main game code (libGDX ApplicationListener)
├── native/ # C/C++ SDL2 native backend & launcher source
│ └── build/ # Compiled launcher and SDL2 libs (.so)
├── port/ # Optional: extra scripts/docs for port
├── build.gradle
├── settings.gradle
├── assemblePort.gradle # Export script (see below)
└── README.md
- Download jdk.zip from this project, extract it and place it into /roms2 folder (or /roms folder)
- Change GAME_DIR, GAME_MAIN_CLASS, GAME_WIDTH, GAME_HEIGHT and JAVA_HOME inside port/run.sh (if needed).
From the project root (where assemblePort.gradle is):
./gradlew assemblePortYou'll get an export in:
build/port/
├── game.jar # All game code + backend + deps
├── libgdx_sdl2_arkos.so # Native SDL2 backend for ArkOS
├── launcher # Native launcher binary
├── assets/ # Your game assets
├── run.sh # (Optional) Reference launch script
Step 1. Copy native/, port/ and assemblePort.gradle from this project to your root folder.
Step 2. In your root build.gradle, add:
apply from: "assemblePort.gradle"Step 3. From the project root, run this:
./gradlew assemblePort- Copy
game.jar,run.sh,launcher,natives/, andassets/to your ArkOS SD card’s Ports area, in their own directory. - If you couldn't run the game, you can place the
run.shinto the Ports folder root.
By default, this backend displays a developer signature:
Made by tuananhdeveloper
If you wish to use the backend/launcher without this signature, please support the project by purchasing a signature-free version.
- Visit my Ko-fi page: https://ko-fi.com/s/7ab6cfa55e
- Buy now.