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 directly:
CLI Options¶
| Option | Argument | Description |
|---|---|---|
--project |
<path> |
Path to the .litidata resource bundle file (e.g. --project mygame.litidata). |
--startup-script |
<id> |
ID or class of the primary GameScript to execute on boot. If omitted, the first bound GameScript is run automatically. |
--map |
<name> |
Initial map to load. If omitted, the first map in the project bundle is loaded. |
--scale |
<float> |
Default render scale factor (e.g. --scale 2.0 for pixel art). |
--title |
<string> |
Custom window title text. |
--gravity |
<int> |
2D physics gravity value (default: 0). |
--release |
None | Run in production release mode (disables debug overlays). |
--help, -h |
None | Print command line usage and available flags. |
--version, -v |
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.