Why PiGo Needs a Standardized Game Package Format
Unlike single-emulator handhelds that only load ROM files into one core, the PiGo Handheld is built to run a wide mix of native Linux indie games, open-source ports, and fantasy consoles — including Godot Engine, LÖVE (Love2D), PICO-8, and C/SDL2 classics like OpenTyrian.
Each of those engines has different launch commands, bundled shared libraries, artwork
assets, and control schemes. Without a unified contract, pigogui would have no
way to discover installed titles, render cover art and screenshots, track playtime, or tell
uinput-pigo-mapper how to map the handheld's 16 buttons for each game.
pigo-games solves both halves of that problem: it provides the official game package template for developers and serves as the distribution hub (via GitHub Releases) for pre-packaged PiGo titles.
Purpose: Plug-and-Play Games & Developer Template
pigo-games fulfills two complementary roles in the ecosystem:
-
For Players: Its GitHub Releases host ready-to-play ZIP archives —
including PicoWar (Godot RTS), PicoRogue, PicoLancer,
OpenTyrian, a mouse-controlled LÖVE2D demo, and a PICO-8 starter
wrapper (for users who own a PICO-8 license). These archives can be downloaded straight
from
pigogui's built-in Store or unzipped manually into/opt/pigo/games/<game-folder>. -
For Indie Developers & Porters: The
game-template/directory shows the exact minimal files needed to turn any ARM64 Linux game into a native PiGo cartridge.
How the Code Is Structured
The repository is intentionally minimal and self-documenting, centered around two files inside
game-template/ plus installation instructions in README.md.
1. The Game Manifest (game-template/game.json)
At startup, pigogui's DataManager.findGames() scans every
subdirectory in /opt/pigo/games/ for a game.json file. Here is the
complete template schema:
"id": "com.pigo.thegame",
"title": "thegame",
"description": "A example game",
"main_image": "example.png",
"small_image": "example.png",
"dirname": "game-template",
"executable": "start.sh",
"requirements": ["example-engine-v3.1"],
"last_start": null,
"playtime": 0,
"is_installed": false,
"rating": null,
"size": "104",
"tags": ["console"],
"deletable": true,
"keymap": "UP=REL_Y=-2 DOWN=REL_Y=2 LEFT=REL_X=-2 RIGHT=REL_X=2 A=BTN_LEFT B=BTN_RIGHT X=BTN_MIDDLE",
"screenshots": ["example.png"]
}
Notice how cleanly this manifest connects the entire PiGo stack:
-
Store & UI Metadata:
title,description,tags,main_image,small_image, andscreenshotspopulateGamesOverviewPageandGameDetailsPageautomatically. -
Execution Contract:
executablepoints to the launch script (typicallystart.sh) relative to the game directory. -
Per-Game Controls (
keymap): Passed verbatim byApplicationManagertouinput-pigo-mapper. Even in the template above, you can see how effortlessly a game can request virtual mouse movement (REL_X/REL_Y) and mouse buttons (BTN_LEFT,BTN_RIGHT,BTN_MIDDLE) instead of keyboard keys.
2. The Portable Launcher Wrapper (game-template/start.sh)
The launch script is only four lines long, yet every single line matters on an embedded handheld:
GAME_PATH="$(dirname -- "${BASH_SOURCE[0]}")"
LD_LIBRARY_PATH=$GAME_PATH exec "$GAME_PATH/example-exec"
-
Self-Contained Paths: Resolving
GAME_PATHdynamically means a game works regardless of the current working directory. -
Bundled Dependencies: Setting
LD_LIBRARY_PATH=$GAME_PATHlets each game ship its own shared libraries (for example, a specific SDL or engine build) without conflicting with system libraries. -
execfor Clean Process Control: Usingexecreplaces the Bash process with the game binary itself while keeping the same PID. This is essential forpigogui'sApplicationManager, which sendsSIGSTOP,SIGCONT, andSIGKILLdirectly to the child PID it forked — withoutexec, pausing or quitting a game from the Quick Menu would only signal the wrapper shell instead of the actual game!
Role in the PiGo Handheld Ecosystem
pigo-games is the content and SDK layer of the PiGo Handheld.
It bridges game creators and players with the rest of the OS: pigogui's
data/store.json points directly to pigo-games GitHub Releases for
one-click downloads, DataManager reads every game's game.json, and
ApplicationManager hands each game's keymap to
uinput-pigo-mapper. Together, they turn PiGo into an open, hackable platform
where packaging and sharing a new handheld game takes just a folder, a JSON file, and a
four-line shell script.

