Skip to content

Sergerg/FXGL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FXGL

JavaFX Game Development Framework

Maven Javadoc Code Test

Chat Website Showcase Wiki MIT

Good for ...

  • 2D or casual UI based games
  • Hobby & academic projects
  • Learning & practising game development
  • Fast prototyping

Not so good for ...

  • 3D, mobile or web (until JavaFX can painlessly support these)
  • Commercial projects

Latest Release Features

Graphics & UI Application Framework
JavaFX 8 FXEventBus
Multi-Layer Rendering Time Management System (in-game time + real time)
Canvas Particle System Multithreading
Dynamic Texture Manipulation Log4j2
Sprite Sheet Animations Performance Monitor + Profiling
Target Screen Resolution (+Fullscreen) Global Services Framework
Customizable Intro Video / Animation Developer Panel
Customizable Main Menu / Game Menu (3 built-in menu styles)
Customizable UI elements (Dialogs, Bars, Buttons, etc)
Customizable Global CSS for menus / UI elements
User Input I/O
Key & Mouse Bindings EasyIO & Networking (TCP and UDP)
Full Input Mocking Asset Management (".png", ".jpg", ".wav", ".mp3", ".txt", ".ttf/.otf", custom)
Physics Utilities
JBox2D GameUtils
Unified Collision Handling (jbox2d + FXGL physics)
Gameplay AI
Ents gdxAI
Game Loop AStar
Quick Time Events (QTE) JavaScript Behavior Injections (for entities) + JavaScript Coding Environment
Achievement System Text/Script Parsers
Notification System
Saving / Loading System
User Profiles (Save/Load/Restore Game Settings)

If you have a use case (feature) that FXGL doesn't cover, raise an issue, carefully describing the use case.

Showcase

You can browse sample games (with screenshots) on the FXGLGames website. The source code is included.

Basic Usage

Java Example

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);
    }
}

Kotlin Example

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.

Setup Tutorials

Maven

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.AlmasB</groupId>
    <artifactId>FXGL</artifactId>
    <version>0.2.7</version>
</dependency>

Gradle

repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    compile 'com.github.AlmasB:FXGL:0.2.7'
}

Contact

Gmail Google+

About

Java / JavaFX / Kotlin Game Library (Engine)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 64.6%
  • Kotlin 34.0%
  • CSS 1.4%