Slick project stub

Here’s a stub for quickly creating a project in Slick. It’s the BasicGame structure.

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;

public class GameTest extends BasicGame {

	public GameTest() {
		super("Title Here");
	}

	@Override
	public void init(GameContainer gc) throws SlickException {

	}

	@Override
	public void render(GameContainer gc, Graphics g) throws SlickException {

	}

	@Override
	public void update(GameContainer gc, int delta) throws SlickException {

	}

	// Not part of Slick, but handy all the same.
	public void reset(GameContainer gc) throws SlickException {
		init(gc);
	}

	public static void main(String[] args) throws SlickException {
		AppGameContainer app = new AppGameContainer(new GameTest());
		app.setDisplayMode(640, 480, false);
		app.setShowFPS(true);
		app.start();
	}

}
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;

public class GameTest extends BasicGame {

public GameTest() {
super(“Title Here”);
}

@Override
public void init(GameContainer gc) throws SlickException {

}

@Override
public void render(GameContainer gc, Graphics g) throws SlickException {

}

@Override
public void update(GameContainer gc, int delta) throws SlickException {

}

// Not part of Slick, but handy all the same.
public void reset(GameContainer gc) throws SlickException {
init(gc);
}

public static void main(String[] args) throws SlickException {
AppGameContainer app = new AppGameContainer(new GameTest());
app.setDisplayMode(640, 480, false);
app.setShowFPS(true);
app.start();
}

}

Leave a Reply

 

Staypressed theme by Themocracy