Bootstrap and structure an FXGL game application — set up GameApplication subclass, configure initSettings, initGameVars, initInput, initGame, initPhysics, initUI, and onUpdate. Use this skill when creating a new FXGL game, adding engine services, configuring window size/title, setting application mode, or wiring the game loop.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Bootstrap and structure an FXGL game application — set up GameApplication subclass, configure initSettings, initGameVars, initInput, initGame, initPhysics, initUI, and onUpdate. Use this skill when creating a new FXGL game, adding engine services, configuring window size/title, setting application mode, or wiring the game loop.
Every FXGL game extends GameApplication and launches via launch(args).
The engine calls lifecycle methods in strict order — honour that order or face NPEs.
Asset directory: all assets must be under src/main/resources/assets/. FXGL
auto-prefixes this path. Writing getAssetLoader().loadTexture("textures/player.png")
resolves to assets/textures/player.png on the classpath.
launch(args) is final — do not override it. Override lifecycle hooks instead.
initSettings runs before JavaFX Application.start() — avoid any JavaFX node
creation here.
Kotlin DSL: use import com.almasb.fxgl.dsl.* and GameApplication() — same hooks,
same order. The FXGLForKt file provides Kotlin-specific extension functions.
Application mode: always ship with ApplicationMode.RELEASE. The developer menu
and profiler are disabled automatically.
Module path for JavaFX: add --module-path and --add-modules javafx.controls,javafx.fxml
to JVM args in your build file if running outside a module-aware launcher.
initGameVars is mandatory for reactive properties: getip("score") throws
IllegalArgumentException if "score" was not declared in initGameVars.
World reset: calling getGameController().startNewGame() re-runs all init* hooks.
Avoid storing state in instance fields unless you reset it in initGameVars.