Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: FxObj
Wraps FXGL's GameController interface (com.almasb.fxgl.app.GameController), the engine-wide lifecycle controller that drives scene transitions, save / load, pause / resume, and exit. Reached at runtime via fxgl.getGameController; obtain a wrapper via adopt. Only one GameController exists per running engine. The methods here mostly route through to FXGL's main thread, so call them from game code that runs on the JavaFX UI thread.
GameController (Ajo = null)
Creates a GameController wrapper. Empty by default; the (Ajo) form wraps an existing instance from fxgl.getGameController.
Ajo is an optional AussomJavaObject around a GameController.adopt (object Ajo)
Wraps an existing GameController AussomJavaObject.
Ajo is an AussomJavaObject around a GameController.A new wrapper.gotoIntro ()
Transitions to the intro scene.
this objectgotoMainMenu ()
Transitions to the main menu.
this objectgotoGameMenu ()
Transitions to the in-game pause menu.
this objectgotoLoading (callback Cb)
Switches to the loading scene, runs the given Runnable loading task, then switches to play when the task finishes.
Cb is a callback with no arguments to run while loading.this objectgotoLoadingTask (object TaskObj)
Switches to the loading scene, runs the supplied javafx.concurrent.Task while the loading scene is visible, then switches to play.
TaskObj is an AussomJavaObject around a javafx.concurrent.Task.this objectgotoPlay ()
Transitions to the play scene.
this objectstartNewGame ()
Starts a brand-new game, discarding any current state and re-running the init callbacks.
this objectsaveGame (object DataFileObj)
Saves the current game state into the supplied DataFile. Does not write to the file system on its own; pair with SaveLoadService.writeTask to persist.
DataFileObj is an AussomJavaObject around a DataFile.this objectloadGame (object DataFileObj)
Loads the supplied DataFile into the running game. Does not read from the file system on its own; pair with SaveLoadService.readTask to obtain the DataFile.
DataFileObj is an AussomJavaObject around a DataFile.this objectpauseEngine ()
Pauses the game engine.
this objectresumeEngine ()
Resumes a paused game engine.
this objectexit ()
Exits the running FXGL game.
this object
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.