No-code, open-source game engine and editor for building 2D, 3D and multiplayer games for mobile, desktop and the web.
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
Add the FXGL Maven dependency to your project (version 25)
<dependency> <groupId>com.github.almasb</groupId> <artifactId>fxgl</artifactId> <version>25</version> </dependency> - 2
Or start from the Maven/Gradle template project for Java or Kotlin
- 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
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
Godot is a free, MIT-licensed, cross-platform game engine for building 2D and 3D games from one unified editor.
A data-driven game engine written in Rust, built on an Entity Component System for 2D and 3D games.
A lightweight, script-driven game engine for 2D, third-person 3D and mixed games, built to be driven by scripts and AI tools.
A cross-platform Java game development framework built on OpenGL ES for desktop, Android, web, and iOS games.
A JavaScript/TypeScript rewrite of the Box2D 2D physics engine for HTML5 game development.