Very simple game launcher
- install dietpi and enable autologin in "dietpi-autostart"
- install the dependencies:
apt install -y cageNote
In the future I probably could create a DRM build, but using cage for running the launcher and games ensure more compatibility
- configure the GameHAT controller This step is only necessary if you are using a GameHAT, you can follow the instructions here
- start
To start the launcher at startup you can copy the following
.bash_profilein your user home directory:
if [[ -z $DISPLAY && $(tty) == /dev/tty1 ]]; then
export XDG_RUNTIME_DIR=/tmp/runtime-$(id -u)
mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR"
exec cage -- /usr/local/bin/GameHAT_Launcher > /tmp/gamehat.log 2>&1
fiYou can get the latest binaries here
Requires zig 0.17 and some of the following system libraries
git clone https://github.com/SimoneFelici/GameHAT-Launcher.git
cd GameHAT-Launcher
zig buildmkdir <sysroot-gamehat-path>
docker run --rm -it --platform linux/arm64 -v <sysroot-gamehat-path>:/sysroot debian:trixie bash
apt update
apt install -y libwayland-dev libxkbcommon-dev libegl1-mesa-dev libgles2-mesa-dev
mkdir -p /sysroot/usr/include /sysroot/usr/lib/aarch64-linux-gnu
cp -r /usr/include/* /sysroot/usr/include/
cp -r /usr/lib/aarch64-linux-gnu/* /sysroot/usr/lib/aarch64-linux-gnu/zig build gamehat -Dsysroot=<sysroot-gamehat-path> -Doptimize=ReleaseSmall
scp zig-out/gamehat/GameHAT_Launcher zig-out/gamehat/libraylib.so <dietpi-ip>:/tmp
ssh dietpi
cp /tmp/libraylib.so /usr/local/lib/
cp /tmp/GameHAT_Launcher /usr/local/bin/
sudo ldconfigImportant
You only need to copy the .so and launch ldconfig for the first time, or if the build.zig changes the raylib build
You can configure the GameHAT-Launcher by creating a config.zon file in ~/.config/GameHAT-Launcher
This is the default configuration:
.{
// Only rgb colors are supported!
.background_color = .{ .r = 0, .g = 30, .b = 39, .a = 255 },
.text_color = .{ .r = 156, .g = 194, .b = 195, .a = 255 },
.highlight_color = .{ .r = 245, .g = 75, .b = 0, .a = 255 },
// Folder where you store your games, the games needs to be in a folder
.games_folder = "/usr/local/games",
// How many items are viewable in the screen
.max_viewable_items = 5,
// Text dimensions, smaller value = bigger text :)
.text_scale = 10,
// Spacing between characters
.text_spacing = 5,
}You can also customize how the game will be launched by creating a .launchopts.zon file in one of your game directory.
For example:
.{
.exec = "/usr/local/games/so_long/so_long",
.args = .{ "maps/map.txt", "--fullscreen" },
.env = .{
.{ "TEST", "test" },
},
}