내 게임 refactorying 내 TiledMaps
렌더링 성능을 높이기 위해 AltasTmxMapLoader
사용할 싶습니다. 나는 맵에 atlas 속성을 추가하는 작업에 몰두했다. 예를 들어이지도에 어디에 넣어야합니까?AtlasTmxMapLoader에 대한 atlas 속성을 추가 할 위치
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="10" height="10" tilewidth="32" tileheight="32">
<tileset firstgid="1" name="tile2" tilewidth="32" tileheight="32">
<image source="tile2.png" width="512" height="512"/>
</tileset>
<tileset firstgid="257" name="mountain" tilewidth="32" tileheight="32">
<image source="mountain.png" width="512" height="512"/>
</tileset>
<tileset firstgid="513" name="pubdlcnt" tilewidth="32" tileheight="32">
<image source="pubdlcnt.png" width="512" height="512"/>
</tileset>
<tileset firstgid="769" name="snowWit" tilewidth="32" tileheight="32">
<image source="snowWit.png" width="512" height="512"/>
</tileset>
<tileset firstgid="1025" name="tile2" tilewidth="32" tileheight="32">
<image source="tile2.png" width="512" height="512"/>
</tileset>
<tileset firstgid="1281" name="tree+rock" tilewidth="32" tileheight="32">
<image source="tree+rock.png" width="512" height="512"/>
<tile id="129">
<properties>
<property name="blocked" value=""/>
</properties>
</tile>
<tile id="161">
<properties>
<property name="move" value=""/>
</properties>
</tile>
</tileset>
<tileset firstgid="1537" name="trees" tilewidth="32" tileheight="32">
<image source="trees.png" width="512" height="512"/>
</tileset>
<tileset firstgid="1793" name="trees2" tilewidth="32" tileheight="32">
<image source="trees2.png" width="512" height="512"/>
</tileset>
<layer name="background1" width="10" height="10">
<data encoding="base64" compression="zlib">
eJzzZ2Bg8B/FgwYDAFyQHt0=
</data>
</layer>
<layer name="background" width="10" height="10">
<data encoding="base64" compression="zlib">
eJxjYGBgmISEGfDQi5AwAx76KBSPAtxgIysEowMAMnYKLw==
</data>
</layer>
<layer name="background" width="10" height="10">
<data encoding="base64" compression="zlib">
eJybxMDAcBqIJxGgFwHxbSJoUsA1IL6OR/4XlD4KxSMBAAA87BJ0
</data>
</layer>
<layer name="foreground1" width="10" height="10">
<data encoding="base64" compression="zlib">
eJxjYCAOzCdCzTwofQyIj+NR94pIO0m1l5pgoOwFACVaBi8=
</data>
</layer>
<layer name="blocked" width="10" height="10">
<data encoding="base64" compression="zlib">
eJxrYmVgaKIiJgUQ0kOqeUMJLGKFYHQAAKpXDXA=
</data>
</layer>
</map>
이미지도 태그와 타일 세트 태그에 추가하여 시도했지만 이미 올바른 해결책이 아닙니다. 나는 이미 atlas를 tmx 파일과 동일한 폴더에 넣어야한다는 것을 알아 차 렸지만 태그를 어디에 넣을 지 궁금합니다.
Exception in thread "main" java.lang.NoClassDefFoundError: com/badlogic/gdx/util
s/GdxRuntimeException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: com.badlogic.gdx.utils.GdxRuntimeEx
ception
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more
이것은 퇴행을 초래합니다. 스택을 추가했습니다. extensionfolder로 이동하여 명령을 입력했습니다. befor 그 폴더를 처리/입력 및 출력 같은 디렉토리에 추가하고 일부 tmx 파일을 포함합니다. inputfolder에 타일셋 – BennX
내가 그것을 해결했지만 커맨드 라인을 통해 아닙니다. coreprojekt 내부에 추가 했으므로 시작되었습니다. 게시물을 편집하고 정답으로 확인하십시오. 감사. 하지만 그건지도를 망칠뿐입니다. 이유는 아직 모른다. badlogicgames 포럼에 게시 – BennX