AlmasB / FXGL

Java / JavaFX / Kotlin Game Library (Engine)
http://almasb.github.io/FXGL/
MIT License
4.4k stars 552 forks source link

Support for Tiled .tmx infinite maps #1265

Open AlmasB opened 1 year ago

AlmasB commented 1 year ago

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](https://user-images.githubusercontent.com/118936956/229801227-0a5d7271-fd84-4ec7-811a-f5bda8fc7f2d.png) 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](https://user-images.githubusercontent.com/118936956/229801078-3ac4b5ee-5aa8-4c9f-8811-a024b46a8a03.png) Map was created with Tiled.
AlmasB commented 1 year ago

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