GameLauncher CLI & Standalone Runner¶
GameLauncher (de.gurkenlabs.litiengine.launch.GameLauncher) is LITIENGINE's standalone CLI launcher. It boots and runs .litidata resource bundles without requiring you to compile a custom public static void main class.
Quick Start¶
Run any .litidata game or project directory directly:
# Pass the project bundle or directory as an argument
java -cp litiengine.jar de.gurkenlabs.litiengine.launch.GameLauncher game.litidata
# Or use explicit CLI options
java -cp litiengine.jar de.gurkenlabs.litiengine.launch.GameLauncher -p ./mygame --map overworld --scale 2.0
CLI Options¶
| Option | Argument | Description |
|---|---|---|
-p, --project |
<path> |
Path to the game project root folder or .litidata bundle. |
-s, --startup-script |
<name> |
Specify the initial GameScript definition to execute on boot. |
-m, --map |
<name> |
Specify the initial map/environment to load. |
-t, --title |
<title> |
Custom game window title. |
--scale |
<float> |
Set base render scale factor (e.g. --scale 2.0 for pixel art). |
--gravity |
<int> |
Set global physics gravity in pixels/sec (default: 0). |
--release |
<int> |
Java language level for runtime script compilation (e.g. --release 25). |
-h, --help |
None | Display command-line usage and available options. |
-v, --version |
None | Display engine version information. |
Auto-Detection & Fallback Rules¶
When executing GameLauncher:
- Startup Script: If
--startup-scriptis not specified,GameLauncherinspects the project's boundGameScripts and boots the first active one. If none are bound, it searches for any registeredGameScriptdefinition. - Initial Map: If
--mapis not specified,GameLauncherchecks if the activeGameScriptloaded a map in itsonStarted()hook. If no map was loaded, it loads the first map found in.litidata. - Audio & Physics: Audio and physics engines are automatically initialized before any scripts are attached.