JavaFX 8 Game Library written in Java + Kotlin
- 2D or casual UI based games
- Hobby & academic projects
- Learning & practising game development
- Fast prototyping
- 3D, mobile or web (until JavaFX can painlessly support these)
- Commercial projects
- Full JavaFX Integration (FXGL is built on top of JavaFX 8)
- Top level Java interfaces with lower level Kotlin implementation
- JBox2D Physics Engine Integration (fork based on v.2.3.0)
- Ents Entity Component/Control System Integration
- FXEventBus Event System Integration
- AStar Pathfinding Integration (A* Search)
- gdxAI Artificial Intelligence Framework Integration
- Game Loop
- Input Bindings (Keys + Mouse)
- Automated Asset Management (".png", ".jpg", ".wav", ".mp3", ".txt", ".ttf/.otf", custom binary formats)
- Text/Script Parsers
- JavaScript Behavior Injections (for entities)
- Automated Collision Handling (physics collisions are hooked into FXGL)
- Automated Target Screen Resolution (+Fullscreen)
- Particle System with Canvas Rendering
- Multi-Layer Rendering
- Dynamic Texture Manipulation (Texture Processing + Sprite Sheet Animations)
- Time Management System
- Audio System
- Multithreading
- Networking (both TCP and UDP)
- Quick Time Events (QTE)
- Customizable Intro Video / Animation
- Customizable Main Menu / Game Menu
- Customizable UI elements (Dialogs, Bars, Buttons, etc)
- Customizable Global CSS for menus / UI elements
- Saving / Loading System
- User Profiles (Save/Load/Restore Game Settings)
- Achievement System
- In-game Notification System
- Log4j2 Logging Framework
- EasyIO IO Framework
- Performance Monitor + Profiling
- Global Services Framework
- Other minor game dev features
If you have a use case (feature) that FXGL doesn't cover, raise an issue, carefully describing the use case.
public class BasicGameApp extends GameApplication {
@Override
protected void initSettings(GameSettings settings) {
settings.setWidth(800);
settings.setHeight(600);
settings.setTitle("Basic Game App");
settings.setVersion("0.1");
// other settings
}
@Override
protected void initInput() {}
@Override
protected void initAssets() {}
@Override
protected void initGame() {}
@Override
protected void initPhysics() {}
@Override
protected void initUI() {}
@Override
protected void onUpdate(double tpf) {}
public static void main(String[] args) {
launch(args);
}
}
class BasicGameApp : GameApplication() {
override fun initSettings(settings: GameSettings) {
with(settings) {
width = 800
height = 600
title = "Basic Game App"
version = "0.1"
// other settings
}
}
override fun initInput() { }
override fun initAssets() { }
override fun initGame() { }
override fun initPhysics() { }
override fun initUI() { }
override fun onUpdate(tpf: Double) { }
}
fun main(args: Array<String>) {
Application.launch(BasicGameApp::class.java, *args)
}
- For all (up to date) "Getting Started" tutorials check out the Wiki.
- The (up to date) Samples folder will be constantly updated to include demonstrations of various features.
- The YouTube (outdated) videos will walk you through the basics.
- For advanced examples please see FXGLGames.
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.AlmasB</groupId>
<artifactId>FXGL</artifactId>
<version>0.2.5</version>
</dependency>
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.AlmasB:FXGL:0.2.5'
}