Closed thomaslecoeur closed 9 years ago
Could you provide the map which is giving you trouble?
Here is the xml of my .tmx map :
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="35" height="10" tilewidth="32" tileheight="32" nextobjectid="11">
<tileset firstgid="1" name="sol" tilewidth="32" tileheight="32">
<image source="floor.png" width="32" height="32"/>
</tileset>
<tileset firstgid="2" name="wall" tilewidth="32" tileheight="32">
<image source="wall.png" width="32" height="32"/>
<tile id="0">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
</tileset>
<tileset firstgid="3" name="Wall" tilewidth="32" tileheight="32">
<image source="wall_new.png" width="128" height="96"/>
<tile id="0">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="1">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="2">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="3">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="4">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="5">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="6">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="7">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="8">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="9">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="10">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
<tile id="11">
<properties>
<property name="collidable" value="true"/>
</properties>
</tile>
</tileset>
<tileset firstgid="15" name="meta" tilewidth="32" tileheight="32">
<image source="meta.png" width="96" height="32"/>
<tile id="0">
<properties>
<property name="start" value="true"/>
</properties>
</tile>
<tile id="1">
<properties>
<property name="spawn_enemy" value="true"/>
</properties>
</tile>
<tile id="2">
<properties>
<property name="exit" value="true"/>
</properties>
</tile>
</tileset>
<layer name="background" width="35" height="10">
<data encoding="base64" compression="zlib">
eJxjZGBgYBzFo3gUj+JRTDcMAMVpAV8=
</data>
</layer>
<layer name="collision" width="35" height="10">
<data encoding="base64" compression="zlib">
eJzjYWBg4BkEmB2IOYGYcRBgfG5hBmIWLJh1ANwCkuPAgpHV89HQLXwMpLkFXxiSGn74woWbAXsa4yUyDElNh9RKuwPpFvR0gi0MsYUfPcKFmmkXW94dCAwA9TAFTA==
</data>
</layer>
<layer name="meta" width="35" height="10">
<data encoding="base64" compression="zlib">
eJxjYBgFhAA/DcwUQMIMaGx6A1xuGQg34bObWm4h1hx0twxkXOEKl4FIM4TShyAU0xMMJrcQAwA97gKU
</data>
</layer>
</map>
Try renaming your layer to "navigation",or If you want to keep your name (meta) you need to use a different constructor for the navtmxmaploader. El abr 8, 2015 2:34 PM, "Thomeuxe" notifications@github.com escribió:
Here is the xml of my .tmx map :
<?xml version="1.0" encoding="UTF-8"?>
— Reply to this email directly or view it on GitHub https://github.com/xaguzman/pathfinding/issues/7#issuecomment-91013384.
After doing this I got this error :
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoClassDefFoundError: com/badlogic/gdx/maps/tiled/TmxMapHelper
Hmmm what libgdx version are you using? El abr 8, 2015 3:14 PM, "Thomeuxe" notifications@github.com escribió:
After doing this I got this error :
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoClassDefFoundError: com/badlogic/gdx/maps/tiled/TmxMapHelper
— Reply to this email directly or view it on GitHub https://github.com/xaguzman/pathfinding/issues/7#issuecomment-91022991.
I'm using LibGDX 1.5.3. It's not compatible with it ? Can I still use your project without using tmx ?
I wrote the library against v 1.5.2. It seems that by version 1.5.3 they removed that class (TmxMapHelper).
Will fix asap. I will open a new issue regarding this
And yes, you can still use this pathfinding library without the bridge. You would just need to provide the GridCell[][] matrix yourself.
Issue #8 has been resolved, please update to version 0.2.5 to get the gdx-bridge working again! Thanks for spotting the issue!
Hello, and thank you for your project !
I have an issue using your astar algorithm with my TiledMap. I basically used the code you give in your exemple :
Wich give me this error :
Do you have any clue ?
Thank you for your help ! Thomeuxe