Hey am trying to learn how applets work with lwjgl & slick, but i can’t seem to get it working… Here are the steps i take -
- Export Game as “JAR file”
- get - slick.jar, lwjgl.jar, natives-win.jar & lwjgl_util_applet.jar… i put it on my desk top
- then i create a html file (notepad) the put the code it it.
this is the code i have in my html file -
`
Applet Test
`
my game code -
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
public class Display extends BasicGame {
public static void main(String[] args){
try{
AppGameContainer app = new AppGameContainer(new Display());
app.setDisplayMode(800, 600, false);
app.start();
}catch (SlickException e){ e.printStackTrace(); }
}
public Display() {
super("Applet Game");
}
@Override
public void render(GameContainer gc, Graphics g) throws SlickException {
g.setColor(Color.white);
g.fillOval(150, 150, 50, 50, 5);
}
@Override
public void init(GameContainer gc) throws SlickException {
// TODO Auto-generated method stub
}
@Override
public void update(GameContainer gc, int delta) throws SlickException {
// TODO Auto-generated method stub
}
}
Error ‘extracting downloaded packages’
Am not using any images in my code just appGameContainer using the Graphics to create an filloval
Cheers for taking a look