Closed goldspark closed 2 years ago
You can read Tiled files using methods of the TiledReader class, which is the main class of the library. Details can be found in the javadoc linked on the library's website, which in turn is linked in the About section of this repo. The same documentation can also be found in this repo's code files.
Ah okay. Thank you very much, This is a very good project!
I did TiledReader = new TiledReader and after that I did reader.getMap() and got this message: Cannot invoke "String.length()" because "spec" is nul
INFO: Beginning to parse TMX file: assets/map/game.tmx Exception in thread "main" java.lang.RuntimeException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog. at org.tiledreader.TiledReader.getMap(TiledReader.java:618) at Main.main(Main.java:61)
I got it. I had to use methods from FileSystemTiled inside overrides of TiledReader.
How do I use this? What is the main class? How to load .tmx file? How to read contents from it?