I’m trying to render a map I’ve made in tiled but I can’t seem to figure out how to get it to work. Can anyone give me an example of how to render one all the way from loading it up to rendering it? That would be awesome.
Thanks
I’m trying to render a map I’ve made in tiled but I can’t seem to figure out how to get it to work. Can anyone give me an example of how to render one all the way from loading it up to rendering it? That would be awesome.
Thanks
This guy has made some great simple tutorials on how to do it from scratch
I copied that exact code but it’s still not working.
I literally just did this. Do a pastebin or w/e of the relevant code and I’ll have a look for you if you’d like
Are you using the most current version of LibGdx? I am and it’s not recognizing a few of the class names.
I don’t know enough about this issue to help, but one thing I can say is that you really need to give us more to go on when asking for help. The single most useless bit of information you can give is “it doesn’t work”. What would be helpful is:
I’ve asked clients when trying to describe errors to express them in terms of words, shapes and colours. This actually works quite well.
Are you using the latest stable release or the nightly? The new maps API isnt yet in stable
I’m using the latest stable build. It’s LibGdx - 0.9.8
That might be the Problem. You should switch to the nightly builds because as Stein102 posted, the new map API is not yet in stable.
Is there a way I can change from the stable to the nightly? Using eclipse by the way.
Just download the latest nightly from the libgdx website and add it to your build path in eclipse. Just the way you did it when you started with this build :).
I actually used the LibGdx setup ui
Not a fan of eclipse… I cocked it up and just re-ran the setup UI, allowed it to download the nightly for me
Thanks, got it working now. Just have some errors on loading the map itself, looks like this:
Exception in thread “LWJGL Application” com.badlogic.gdx.utils.SerializationException: Error parsing file: maps/map.tmx
at com.badlogic.gdx.utils.XmlReader.parse(XmlReader.java:71)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:100)
at com.badlogic.gdx.maps.tiled.TmxMapLoader.load(TmxMapLoader.java:88)
at jesse.rscl.Screens.GameScreen.(GameScreen.java:49)
code is:
map = new TmxMapLoader().load("maps/map.tmx")
That’s probably just the JVM not being able to find it, try refreshing the Android project.
Thanks for all the replies. Turns out I was just using the wrong compression format for my map. So simple.