slick ライブラリの操作方法を学習しているときに、別の問題に遭遇しました。
サイズが50x50ピクセルの5x5 ブロックで単純な小さなマップを作成しました。私はすべてを試しましたが、それでも同じエラーが発生します。
ここに私のクラス:
public class PlayState extends BasicGameState{
int stateID = -1;
private TiledMap map;
public PlayState(int stateID){
this.stateID = stateID;
}
@Override
public void init(GameContainer gc, StateBasedGame sbg) throws SlickException {
map = new TiledMap("src/resources/map.tmx","src/resources");
}
@Override
public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException {
map.render(0, 0);
}
@Override
public void update(GameContainer gc, StateBasedGame sbg, int arg2) throws SlickException {
}
@Override
public int getID() {
return stateID;
}
}
ここで私のエラー:
Tue Jul 30 13:34:09 CEST 2013 INFO:Slick Build #237
Tue Jul 30 13:34:09 CEST 2013 INFO:LWJGL Version: 2.9.0
Tue Jul 30 13:34:09 CEST 2013 INFO:OriginalDisplayMode: 1600 x 900 x 32 @60Hz
Tue Jul 30 13:34:09 CEST 2013 INFO:TargetDisplayMode: 1280 x 720 x 0 @0Hz
Tue Jul 30 13:34:09 CEST 2013 INFO:Starting display 1280x720
Tue Jul 30 13:34:09 CEST 2013 INFO:Use Java PNG Loader = true
Tue Jul 30 13:34:09 CEST 2013 INFO:Controllers not available
Tue Jul 30 13:34:09 CEST 2013 WARN:class org.newdawn.slick.opengl.PNGImageData failed to read the data
java.io.IOException: Transparent color not support in custom PNG Decoder
at org.newdawn.slick.opengl.PNGImageData.loadImage(PNGImageData.java:78)
at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:62)
at org.newdawn.slick.opengl.CompositeImageData.loadImage(CompositeImageData.java:43)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:292)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:254)
at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:187)
at org.newdawn.slick.Image.<init>(Image.java:192)
at org.newdawn.slick.tiled.TileSet.<init>(TileSet.java:124)
at org.newdawn.slick.tiled.TiledMap.load(TiledMap.java:661)
at org.newdawn.slick.tiled.TiledMap.<init>(TiledMap.java:122)
at main.states.PlayState.init(PlayState.java:23)
at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:171)
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:393)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
at main.Main.main(Main.java:40)
Tue Jul 30 13:34:09 CEST 2013 ERROR:Unsupport tiled map type: base64,zlib (only gzip base64 supported)
org.newdawn.slick.SlickException: Unsupport tiled map type: base64,zlib (only gzip base64 supported)
at org.newdawn.slick.tiled.Layer.<init>(Layer.java:133)
at org.newdawn.slick.tiled.TiledMap.load(TiledMap.java:676)
at org.newdawn.slick.tiled.TiledMap.<init>(TiledMap.java:122)
at main.states.PlayState.init(PlayState.java:23)
at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:171)
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:393)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
at main.Main.main(Main.java:40)
Tue Jul 30 13:34:09 CEST 2013 ERROR:Failed to parse tilemap
org.newdawn.slick.SlickException: Failed to parse tilemap
at org.newdawn.slick.tiled.TiledMap.load(TiledMap.java:695)
at org.newdawn.slick.tiled.TiledMap.<init>(TiledMap.java:122)
at main.states.PlayState.init(PlayState.java:23)
at org.newdawn.slick.state.StateBasedGame.init(StateBasedGame.java:171)
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:393)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
at main.Main.main(Main.java:40)
Caused by: org.newdawn.slick.SlickException: Unsupport tiled map type: base64,zlib (only gzip base64 supported)
at org.newdawn.slick.tiled.Layer.<init>(Layer.java:133)
at org.newdawn.slick.tiled.TiledMap.load(TiledMap.java:676)
... 6 more