#!/bin/bash # Work-Death Balance — avvio su Raspberry Pi 5 (arm64) # # Variabili d'ambiente: # WDB_MODE gl (default) | vulkan | mobile # gl = driver OpenGL; su V3D desktop GL e' 3.1 (< 3.3 richiesto), # Godot ripiega da solo su OpenGL ES 3.1 # vulkan = v3dv; il Forward+ viene declassato a Mobile # ("Platform supports less than 48 textures per stage") # mobile = chiede direttamente il renderer Mobile # WDB_RES risoluzione, default 960x540 (prova 640x360 se non regge) # WDB_MAXFPS tetto fps, default 30 (0 = illimitato) # WDB_API base dell'API classifica, default https://enne2.net/api/zombie-fps # (stringa vuota = classifica disattivata) # # Nota: --api= va DOPO il separatore "--", perche' leaderboard.gd legge # OS.get_cmdline_user_args(); senza "--" il gioco stampa "Classifica disattivata". set -u DIR=$(cd "$(dirname "$0")" && pwd) API="${WDB_API-https://enne2.net/api/zombie-fps}" RES="${WDB_RES-960x540}" MODE="${WDB_MODE-gl}" MAXFPS="${WDB_MAXFPS-30}" args=("--resolution" "$RES" "--max-fps" "$MAXFPS") case "$MODE" in gl) args+=("--rendering-driver" "opengl3") ;; opengl) args+=("--rendering-driver" "opengl3") ;; vulkan) args+=("--rendering-driver" "vulkan") ;; mobile) args+=("--rendering-method" "mobile") ;; *) echo "WDB_MODE sconosciuto: $MODE (usa gl|vulkan|mobile)" >&2; exit 2 ;; esac echo "avvio: mode=$MODE res=$RES maxfps=$MAXFPS api=${API:-disattivata}" if [ -n "$API" ]; then exec "$DIR/work_death_balance.arm64" "${args[@]}" -- "$@" --api="$API" fi exec "$DIR/work_death_balance.arm64" "${args[@]}" -- "$@"