FXGL is a free, MIT-licensed Java game library built on JavaFX that lets Java and Kotlin developers write 2D games — and some 3D and business UIs — without installing anything beyond their JVM toolchain.
What it is
FXGL is a game development framework for the JVM ecosystem: it is written in Kotlin, published to Maven Central as com.github.almasb:fxgl, and layered directly on top of JavaFX. The project describes itself as a JavaFX game development framework with a simple, clean API that sits at a higher level than other engines, and it presents JavaFX itself as a superset, so developers do not have to learn a new UI API to build their interfaces and menus. Games built with it can be packaged into a single executable .jar or into native images.
The concrete problem FXGL addresses is the setup and platform friction of JVM game development. The README states that no installation or setup is required, that it works "out of the box" with Java 8 through 25, and that it targets Win/Mac/Linux, Android 8+, iOS 11.0+, and the web. It also supplies real-world game development techniques — Entity-Component architecture, interpolated animations, and particles — that a developer would otherwise have to assemble from scratch when starting from plain JavaFX.
Key capabilities
- Runs unmodified across Java 8 to 25 and deploys to Windows, Mac, Linux, Android 8+, iOS 11.0+, and web from a single codebase.
- Exposes Entity-Component architecture, interpolated animations, and particle systems as built-in core features.
- Reuses the JavaFX API as a superset, so application UI code carries over without a separate widget toolkit.
- Supports both 2D games such as side-scrollers, platformers, arcade and RPG titles, and experimental 3D.
- Packages a finished game into one executable
.jar or into native images, and offers a standalone uber jar via GitHub Releases.
- Ships modular JVM support, with a documented
module-info.java that only needs requires com.almasb.fxgl.all;.
- Provides a Maven Central artefact at version 25, a Maven/Gradle template project, and sample code in the
fxgl-samples directory.
Who uses it and how
- Academic institutions use it for teaching and for student projects, including the University of Brighton, the University of Nottingham, Georgia Institute of Technology, the Federal Institute of Education, Science and Technology of Rio Grande do Sul, and several secondary schools across the US, Germany, and Denmark.
- Hobbyists and commercial developers publish finished games with source in the FXGLGames repository and host playable builds on itch.io.
- Developers prototype ideas quickly, using FXGL for business applications that need complex UI controls and animations as well as for games.
- Learners follow the accompanying book, the written wiki tutorials, and a YouTube tutorial playlist, then work from the standalone basic examples in
fxgl-samples/src/main/java/basics.
- Kotlin and Java teams start from the FXGL-MavenGradle template project and consume the library as a normal dependency.
Getting started
Add com.github.almasb:fxgl:25 from Maven Central — the README offers an FXGL-MavenGradle template project for Maven and Gradle, or download the uber jar directly from the GitHub Releases page and subclass GameApplication, overriding initSettings(GameSettings settings) and calling launch(args).
How it compares
The project's own documentation positions it as a higher-level API than other engines while remaining a superset of JavaFX, but it names no competing tools for a point-by-point comparison. On the facts available here, it stands alone in this registry.
When to use it — and when not to
Because it is a library rather than a hosted service, there is no database, storage, or SMTP for an operator to run — the commitment is a JVM, a build tool, and a dependency on com.github.almasb:fxgl. It should not be the first choice for teams that need a mature 3D pipeline (3D support is explicitly experimental) or for developers outside the Java/Kotlin/JVM world. The repository currently carries 150 open issues, and prospective adopters should check them before committing to a long-lived project.
project readme (upstream, from github) — read inline

Languages
English
简体中文
Русский
About

JavaFX Game Development Framework

Why FXGL?
- No installation or setup is required
- "Out of the box": Java 8-25, Win/Mac/Linux/Android 8+/iOS 11.0+/Web
- Simple and clean API, higher level than other engines
- Superset of JavaFX: no need to learn new UI API
- Real-world game development techniques: Entity-Component, interpolated animations, particles, and many more
- Games are easily packaged into a single executable .jar, or native images
Good for:
- Any 2D game (side-scroller / platformer / arcade / RPG)
- Any business application with complex UI controls / animations
- Experimental 3D
- Hobby / academic / commercial projects
- Teaching / learning / improving game development skills
- Fast prototyping of app ideas
Minimal Example
public class BasicGameApp extends GameApplication {
@Override
protected void initSettings(GameSettings settings) {
settings.setWidth(800);
settings.setHeight(600);
settings.setTitle("Basic Game App");
}
public static void main(String[] args) {
launch(args);
}
}
Getting Started
For a quick dive into code, see standalone basic examples.
Otherwise, see:
Maven
- Maven template project if you use Java and/or Kotlin
<dependency>
<groupId>com.github.almasb</groupId>
<artifactId>fxgl</artifactId>
<version>25</version>
</dependency>
Gradle
- Gradle template project if you use Java and/or Kotlin
Please refer to the template if there are any errors.
repositories {
jcenter()
}
dependencies {
compile 'com.github.almasb:fxgl:25'
}
Modularity
If you wish to develop a modular application, here's a complete example of your module-info.java:
open module app.name {
requires com.almasb.fxgl.all;
}
Uber jar
Download the latest uber jar from Releases
Community
- University of Brighton, UK
- University of Nottingham, UK
- Georgia Institute of Technology, USA
- kidOYO, USA
- Walton High School, USA
- Conant High School, USA
- Zealand Institute of Business and Technology, Denmark
- Federal Institute of Education, Science and Technology of Rio Grande do Sul, Brazil
- FHNW School of Engineering / Computer Science, Switzerland
- Johann-Andreas-Schmeller-Gymnasium Nabburg, Germany
If your institution wants to use or is using FXGL, add a note via GitHub Discussions to be added to the list.
Community tutorials:
Community projects (identified using fxgl topic):
If you'd like your project featured here, just add a note via GitHub Discussions.
Development Team
A description of roles is given in the Contribution Guide.
Maintainers (Collaborators):
Coordinators:
Testers:
Contribution & Support
If you want to build FXGL from the source code or want to contribute,
please see the Contribution Guide (including non-code).
FXGL is fully modular, so new contributors do not need to understand the entire codebase, only the module to which the contribution is made.
Contributions will be reviewed in accordance with the Code of Conduct.
You can support the FXGL development or show interest by simply starring the repo or becoming a sponsor.
Sponsors
Users:
- @Marsl10
- @SergeMerzliakov
- @mbains
- @sabit86
- @hendrikebbers
- @ImperaEtConquer
- @thejeed
- @chikega
Companies:
Contact