Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package net.rymate.gaming;
- import java.io.File;
- import org.lwjgl.LWJGLUtil;
- import org.newdawn.slick.*;
- public class Game extends BasicGame {
- static int height = 480;
- static int width = 640;
- static boolean fullscreen = false;
- static boolean showFPS = true;
- static String title = "Slick Basic Game Template";
- static int fpslimit = 60;
- public Game(String title) {
- super(title);
- }
- public void init(GameContainer gc) throws SlickException {
- }
- public void update(GameContainer gc, int delta) throws SlickException {
- }
- public void render(GameContainer gc, Graphics g) throws SlickException {
- }
- public static void main(String[] args) throws SlickException {
- System.setProperty("org.lwjgl.librarypath", new File(System.getProperty("user.home") + "/.rymate/native/" + LWJGLUtil.getPlatformName()).getAbsolutePath());
- System.setProperty("net.java.games.input.librarypath", System.getProperty("org.lwjgl.librarypath"));
- AppGameContainer app = new AppGameContainer(new Game(title));
- app.setDisplayMode(width, height, fullscreen);
- app.setSmoothDeltas(true);
- app.setTargetFrameRate(fpslimit);
- app.setShowFPS(showFPS);
- app.start();
- }
- }
Add Comment
Please, Sign In to add comment