Repolode
AlmasB

AlmasB/FXGL

A JavaFX-based Java/Kotlin game framework for building 2D games and UI-heavy apps, with cross-platform packaging.

Stars
4,874
Forks
711
Open issues
144
Last commit
21 days ago

What is it?

FXGL is a game development framework built on JavaFX and written for Java and Kotlin. It provides a higher-level API on top of JavaFX for building 2D games, including entity-component design, interpolated animations and particle effects. Because it is a superset of JavaFX, developers can use standard JavaFX UI controls alongside game features.

The framework targets Windows, macOS, Linux, Android, iOS and the web, and supports Java 8 through 25. Games can be packaged into a single executable JAR or as native images. It is distributed through Maven Central and Gradle, and includes modular support via module-info.java.

The project comes with sample code, a book, video tutorials and a wiki, and is used in teaching as well as for hobby and commercial games. Experimental 3D support is also available.

Key features

  • 01Entity-Component architecture for game objects
  • 02Interpolated animations and particle effects
  • 03Superset of JavaFX, so standard JavaFX UI controls work directly
  • 04Targets Windows, macOS, Linux, Android, iOS and Web
  • 05Packages games into a single executable JAR or native image

Use cases

  • Building 2D side-scrollers, platformers, arcade or RPG games in Java or Kotlin
  • Creating desktop business applications with complex UI controls and animations
  • Learning or teaching game development with JavaFX
  • Rapid prototyping of app or game ideas

Quick start

  1. 1

    Add the FXGL Maven dependency to your project (version 25)

    <dependency> <groupId>com.github.almasb</groupId> <artifactId>fxgl</artifactId> <version>25</version> </dependency>
  2. 2

    Or start from the Maven/Gradle template project for Java or Kotlin

  3. 3

    Create a GameApplication subclass and run its main method

Things to know

  • Requires Java and JavaFX knowledge, so it is not a general-purpose engine for other languages.
  • The Gradle example in the README uses the deprecated jcenter repository and compile configuration.

In collections

Topics

#game-engine#javafx#java#kotlin#2d#game-development#gamedev#2d-framework#2d-game-engine#2d-game-framework

FAQ

What is FXGL?
A JavaFX-based Java/Kotlin game framework for building 2D games and UI-heavy apps, with cross-platform packaging. FXGL is a game development framework built on JavaFX and written for Java and Kotlin. It provides a higher-level API on top of JavaFX for building 2D games, including entity-component design, interpolated animations and particle effects. Because it is a superset of JavaFX, developers can use standard JavaFX UI controls alongside game features.
Is FXGL free to use? What license does it have?
FXGL is open source under the MIT license. Check the license terms before using it in commercial products.
Is FXGL still maintained?
Actively maintained. The last commit to FXGL was on Oct 16, 2026.
What can I use FXGL for?
Building 2D side-scrollers, platformers, arcade or RPG games in Java or Kotlin Creating desktop business applications with complex UI controls and animations Learning or teaching game development with JavaFX Rapid prototyping of app or game ideas
How do I install FXGL?
Add the FXGL Maven dependency to your project (version 25): <dependency> <groupId>com.github.almasb</groupId> <artifactId>fxgl</artifactId> <version>25</version> </dependency> Or start from the Maven/Gradle template project for Java or Kotlin Create a GameApplication subclass and run its main method
Where can I get FXGL?
The source code and installation instructions are on GitHub: https://github.com/AlmasB/FXGL

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects