Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TmxMapLoader #2599

Closed
fchiusolo opened this issue Nov 20, 2014 · 1 comment
Closed

TmxMapLoader #2599

fchiusolo opened this issue Nov 20, 2014 · 1 comment

Comments

@fchiusolo
Copy link

I created my .tmx map using the editor "Tiled" and i noticed that the TmxMapLoader does not support tmx files that were created using multiple images instead of a single tileset image.

If it's not clear what i'm referring to, i post a screenshot:
cattura

Examining the first lines of two tmx files created in both way there is one difference:

(Created from a single image tileset)
cattura2

(Created from multiple images)
cattura1

Debugging my application, a NullPointerException was thrown and this was the stack trace:

Exception in thread "LWJGL Application" java.lang.NullPointerException
at com.badlogic.gdx.maps.tiled.TmxMapLoader.loadTilesets(TmxMapLoader.java:246)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:118)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:104)

So i went into the code and noticed that in the method "TmxMapLoader.loadTilesets" it tries to get the attribute "source" from the tileset 's child but tileset does not have a child image in the case that was created from multiple images.

@MobiDevelop
Copy link
Member

This has been recently added. You can use the latest nightly/snapshot, or wait for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants