Skip to content

Directory Structure (FXGL 11)

Almas Baimagambetov edited this page May 30, 2020 · 1 revision

The recommended approach is to use the Maven directory structure alongside Maven/Gradle. The source root is "src/main/java" and assets are placed in "src/main/resources". This allows easy packaging and deployment, as all assets packaged into jar/native image will continue loading with exactly the same code.

IntelliJ IDEA (with Maven / Gradle)

Screenshot

Structure (Uber jar)

NOTE: this structure is only for uber-jars.

project directory (typically project name)
    src (source code directory)
        assets
            textures (image files ".png", ".jpg")
            sounds (sound files ".wav")
            music (music files ".mp3")
            text (text files ".txt")
            ui/css (stylesheets for customizing UI elements)
            ui/fonts (fonts ".ttf", ".otf")
        (your packages / code)

Clone this wiki locally