Guest User

Untitled

a guest
Jul 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. package net.tides.lords.dev;
  2.  
  3. import java.io.IOException;
  4. import java.util.logging.FileHandler;
  5. import java.util.logging.Logger;
  6.  
  7. import org.newdawn.slick.*;
  8.  
  9. public class Lords extends BasicGame {
  10.    
  11.     static int width = 1024;
  12.     static int height = 768;
  13.  
  14.     static boolean fullscreen = false;
  15.  
  16.     static boolean showFPS = true;
  17.  
  18.     static String title = "Lords Dev";
  19.  
  20.     static int fpslimit = 60;
  21.  
  22.     private static FileHandler hand;
  23.     static Logger log = Logger.getLogger("logger");
  24.  
  25.     public Lords(String title) {
  26.         super(title);
  27.     }
  28.  
  29.     public void init(GameContainer gc) throws SlickException {
  30.  
  31.     }
  32.  
  33.     public void update(GameContainer gc, int delta) throws SlickException {
  34.  
  35.     }
  36.  
  37.     public void render(GameContainer gc, Graphics g) throws SlickException {
  38.  
  39.     }
  40.  
  41.     public static void main(String[] args) throws SlickException {
  42.        
  43.         try {
  44.             hand = new FileHandler("log.txt");
  45.         } catch(IOException e) {}
  46.         log.addHandler(hand);
  47.        
  48.         AppGameContainer app = new AppGameContainer(new Lords(title));
  49.         app.setDisplayMode(width, height, fullscreen);
  50.         app.setSmoothDeltas(true);
  51.         app.setTargetFrameRate(fpslimit);
  52.         app.setShowFPS(showFPS);
  53.         app.start();
  54.         log.info("Slick2D initialized and started.");
  55.         System.out.println(log.getName());
  56.     }
  57. }
Add Comment
Please, Sign In to add comment