TMX map loading error.

  ... discussions about development with the GLES1 branch of AndEngine.

TMX map loading error.

Postby MrFika » Mon Mar 12, 2012 6:42 pm

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):

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. try {
  2.             final TMXLoader tmxLoader = new TMXLoader(this, this.mEngine.getTextureManager(), TextureOptions.NEAREST, null);
  3.                 this.mTMXTiledMap = tmxLoader.loadFromAsset(this, "test2.tmx");
  4.                 } catch (final TMXLoadException tmxle) {
  5.                 Debug.e(tmxle);
  6.                 }
  8.             // Add the non-object layers to the scene
  9.            for (int i = 0; i < this.mTMXTiledMap.getTMXLayers().size(); i++){
  10.                   final TMXLayer layer = this.mTMXTiledMap.getTMXLayers().get(i);
  11.                    if (!layer.getTMXLayerProperties().containsTMXProperty("wall", "true")){
  12.                         scene.attachChild(layer);
  13.                    }
  14.             }
Parsed in 0.033 seconds, using GeSHi

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.

My project file. Warning for bad coding and swedish comments!
(1.58 MiB) Downloaded 56 times
Posts: 2
Joined: Mon Mar 12, 2012 5:51 pm
Location: Sweden

Re: TMX map loading error.

Postby MrFika » Thu Mar 15, 2012 12:58 pm

No one?
I would really appreciate some help!
Posts: 2
Joined: Mon Mar 12, 2012 5:51 pm
Location: Sweden

Return to GLES1

Who is online

Users browsing this forum: Exabot [Bot] and 20 guests