Java libtiled : Can't read input file



to begin I would like to say a big thank you, Tiled is an incredible software :heart_eyes: .

A few months ago I was using Slick2D features to import and use my maps generated with Tiled, but the library development stopped several years ago and new versions of Tiled are no longer supported. So I decided to rewrite my map loader. I discovered libtiled which I think will make my task easier:).

After some tests, and running maven tests I noticed that there were errors when loading files write into the tmx.

All calls are made to the root of the project with no file path (placing all files to be loaded at the root of the project solves the problem besides, it allows me to continue to advance on my game)

The tests (mvn and junits) in my environment confirm that too.

I would like to know if it comes from my environment or if it comes from tiled-lib java ?
And an opinion on the solution to adopt:

  • i have made some mistake in my config ? maven import ? buildpath ?
  • rewrite a part of the lib?
  • add datapath to tmx file? (with a script or by hand)
  • Another suggestion?

I’ll run some tests on my own until I know if it’s from my configuration, and try to find a viable solution.

Thanks for reading me. Sincerely, Razormarx

Here is a link to the maven test logs:

Environment :
OS: Windows 7
Java: Jdk 1.8.0_112
IDE : Eclipse Neon

PS: Forgive my language levels, traductor and review.

(Thorbjørn Lindeijer) #2

That’s great to hear, thanks!

Maybe @mikethomas can help figure out where it’s going wrong. I ran mvn test from the util/java directory in the repository and didn’t get any errors.

(Mike Thomas) #3

I’ve been a little busy with work this week but will take a look this weekend and get back to you as soon as I have had a chance to look into it :slight_smile: