Hey Guys,
i have some problems with animation and tiledmaps on android by using Slick AE.
Here is my code for the animation:
Code:
package game;
import org.newdawn.slick.Animation;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.SpriteSheet;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;
public class Player extends BasicGameState {
Animation player;
public Player() {
super();
}
public void init(GameContainer container, StateBasedGame statebasegame) throws SlickException {
SpriteSheet sheet = new SpriteSheet("resources/images/player/animation_up.png", 16, 32);
player = new Animation();
player.setAutoUpdate(true);
player.addFrame(sheet.getSprite(0, 0), 100);
player.addFrame(sheet.getSprite(1, 0), 100);
player.addFrame(sheet.getSprite(2, 0), 100);
}
public void render(GameContainer container, StateBasedGame statebasegame, Graphics g) throws SlickException {
g.drawAnimation(player, 200, 200);
}
public void update(GameContainer container, StateBasedGame statebasegame, int delta) throws SlickException {
}
@Override
public int getID() {
// TODO Auto-generated method stub
return 0;
}
}
And the LogCat says, that lwjgl.Sys is missing ("java.lang.NoClassDefFoundError: org.lwjgl.Sys").
On this picture you can see, which libs I use for the project.

The next problem is the TiledMap.
Here is my source:
Code:
package game;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.tiled.TiledMap;
public class Map extends BasicGameState {
TiledMap map;
public Map() {
super();
}
public void init(GameContainer container, StateBasedGame statebasegame) throws SlickException {
map = new TiledMap("resources/maps/Map1.tmx", "resources");
}
public void render(GameContainer container, StateBasedGame statebasegame, Graphics g) throws SlickException {
map.render(0, 0);
}
public void update(GameContainer container, StateBasedGame statebasegame, int delta) throws SlickException {
}
public int getID() {
return 0;
}
}
And here LogCat says: java.lang.StringIndexOutOfBoundsException: length=9; regionStart=0; regionLength=-1
Hope you can help me..
