示例#1
0
 public static void main(String[] args) {
   LoadingList.setDeferredLoading(true);
   try {
     AppGameContainer app = new AppGameContainer(new DragonGame());
     app.setDisplayMode(width, height, fullscreen);
     app.setShowFPS(false);
     app.setMouseGrabbed(false);
     app.setTargetFrameRate(60);
     app.setAlwaysRender(true);
     app.setUpdateOnlyWhenVisible(true);
     app.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
示例#2
0
文件: JTD.java 项目: LostMekka/JTD
 /** @param args the command line arguments */
 public static void main(String[] args) {
   StateBasedGame game =
       new StateBasedGame("JTD") {
         @Override
         public void initStatesList(GameContainer gc) throws SlickException {
           addState(TDGameplayState.get());
           GameCtrl.setController(TDGameplayState.get());
         }
       };
   try {
     AppGameContainer gc = new AppGameContainer(game, 1024, 768, false);
     gc.setUpdateOnlyWhenVisible(false);
     // gc.setTargetFrameRate(60);
     gc.start();
   } catch (SlickException ex) {
     Logger.getLogger(JTD.class.getName()).log(Level.SEVERE, null, ex);
   }
 }
示例#3
0
  /** @param args */
  public static void main(String[] args) {

    ClientGame clientGame = new ClientGame();

    // initialize (gfx) settings depending on game type
    if (clientGame != null) {

      try {

        AppGameContainer gc = new AppGameContainer(clientGame);
        gc.setDisplayMode(Settings.SCREENWIDTH, Settings.SCREENHEIGHT, false);
        gc.setVSync(true);
        gc.setSmoothDeltas(true);
        gc.setAlwaysRender(true);
        gc.setUpdateOnlyWhenVisible(false);
        gc.setMaximumLogicUpdateInterval(30);
        gc.setTargetFrameRate(60);
        gc.start();
      } catch (SlickException e) {
        e.printStackTrace();
      }
    }
  }