I'm trying to make a 2d mario-like game, and I have encountered some problems, basically I cant get my TMX map to load. I debug the game in Eclipse and it highlights the asset path as faulty(line 3 here):
Using java Syntax Highlighting
- try {
- final TMXLoader tmxLoader = new TMXLoader(this, this.mEngine.getTextureManager(), TextureOptions.NEAREST, null);
- this.mTMXTiledMap = tmxLoader.loadFromAsset(this, "test2.tmx");
- } catch (final TMXLoadException tmxle) {
- Debug.e(tmxle);
- }
- // Add the non-object layers to the scene
- for (int i = 0; i < this.mTMXTiledMap.getTMXLayers().size(); i++){
- final TMXLayer layer = this.mTMXTiledMap.getTMXLayers().get(i);
- if (!layer.getTMXLayerProperties().containsTMXProperty("wall", "true")){
- scene.attachChild(layer);
- }
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
The TMX file is located directly in the "asset" folder. I think the file it self should be correctly written with the tileset path and so on because it is runnable in "Tiled"...?
I have tried to implement the code from this tutorial but i cant get it to work in my game T_T.
//MrFika
