public static void main(String[] args) throws SlickException {
   AppGameContainer app = new AppGameContainer(new DungeonGardenGame());
   app.setAlwaysRender(true);
   app.setDisplayMode(800, 600, false);
   app.setMaximumLogicUpdateInterval(40);
   app.start();
 }
Example #2
0
 /**
  * CrĂ©ation de la fenĂȘtre
  *
  * @param args
  */
 public static void main(String[] args) {
   try {
     AppGameContainer app = new AppGameContainer(new Game());
     app.setShowFPS(false);
     app.setMinimumLogicUpdateInterval(Game.FRAME_TIME);
     app.setMaximumLogicUpdateInterval(Game.FRAME_TIME);
     app.setDisplayMode(800, 600, fullscreen);
     app.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
Example #3
0
  public static void main(String[] args) {
    game = new Game("Platformer");
    AppGameContainer appGC;
    try {
      appGC = new AppGameContainer(game);
      appGC.setDisplayMode(WIDTH, HEIGHT, false);
      appGC.setShowFPS(false);
      appGC.setTargetFrameRate(60);

      appGC.setMaximumLogicUpdateInterval(
          20); // this makes it so that the speed of the game isn't connected to the FPS
      appGC.setMinimumLogicUpdateInterval(20);

      appGC.start();
    } catch (SlickException e) {
      e.printStackTrace();
    }
    // test - Marc
  }
Example #4
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();
      }
    }
  }