FXGL icon indicating copy to clipboard operation
FXGL copied to clipboard

Support for Tiled .tmx infinite maps

Open AlmasB opened this issue 2 years ago • 1 comments

Discussed in https://github.com/AlmasB/FXGL/discussions/1262

Originally posted by tobithe1st April 4, 2023 Hey,

Im just getting started with FXGL and already have problems getting the TileMap set up.

    @Override
    protected void initGame(){
        FXGL.getGameWorld().addEntityFactory(new KeplerTownFactory());

        FXGL.setLevelFromMap("test.tmx");
    }

    public static void main(String[] args) {
        launch(args);
    }
}

After starting the application I get the following exception:

image

I already tried all possible directories - nothing. When choosing a json file, the AssetLoader finds it ind resources/assets/json , but is also throwing an exception:

image

Map was created with Tiled.

AlmasB avatar Apr 05 '23 20:04 AlmasB

For reference purposes: <chunk> in https://doc.mapeditor.org/en/stable/reference/tmx-map-format/

AlmasB avatar Apr 05 '23 20:04 AlmasB