Guest User

Untitled

a guest
Feb 18th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.37 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package net.rymate.gaming;
  6.  
  7. import java.io.File;
  8. import org.lwjgl.LWJGLUtil;
  9. import org.newdawn.slick.*;
  10.  
  11. public class Game extends BasicGame {
  12.  
  13.     static int height = 480;
  14.     static int width = 640;
  15.     static boolean fullscreen = false;
  16.     static boolean showFPS = true;
  17.     static String title = "Slick Basic Game Template";
  18.     static int fpslimit = 60;
  19.  
  20.     public Game(String title) {
  21.         super(title);
  22.     }
  23.  
  24.     public void init(GameContainer gc) throws SlickException {
  25.     }
  26.  
  27.     public void update(GameContainer gc, int delta) throws SlickException {
  28.     }
  29.  
  30.     public void render(GameContainer gc, Graphics g) throws SlickException {
  31.     }
  32.  
  33.     public static void main(String[] args) throws SlickException {
  34.         System.setProperty("org.lwjgl.librarypath", new File(System.getProperty("user.home") + "/.rymate/native/" + LWJGLUtil.getPlatformName()).getAbsolutePath());
  35.         System.setProperty("net.java.games.input.librarypath", System.getProperty("org.lwjgl.librarypath"));
  36.         AppGameContainer app = new AppGameContainer(new Game(title));
  37.         app.setDisplayMode(width, height, fullscreen);
  38.         app.setSmoothDeltas(true);
  39.         app.setTargetFrameRate(fpslimit);
  40.         app.setShowFPS(showFPS);
  41.         app.start();
  42.     }
  43. }
Add Comment
Please, Sign In to add comment