예제 #1
0
  public static void main(String[] args) throws SlickException {

    AppGameContainer app = new AppGameContainer(new ElementalWar());
    app.setDisplayMode(800, 600, false);
    app.setShowFPS(false);
    app.start();
  }
예제 #2
0
파일: Main.java 프로젝트: reiknight/ld26
 public static void main(String[] args) throws SlickException {
   AppGameContainer app = new AppGameContainer(new Main());
   app.setDisplayMode(C.SCREEN_WIDTH, C.SCREEN_HEIGHT, false);
   app.setShowFPS(C.DEBUG_MODE);
   app.setMouseGrabbed(true);
   app.start();
 }
예제 #3
0
 public static void main(String[] args) throws SlickException {
   AppGameContainer app = new AppGameContainer(new Game(TITLE));
   app.setDisplayMode(Screen.SCREEN_W, Screen.SCREEN_H, false);
   app.setAlwaysRender(true);
   app.setTargetFrameRate(60);
   app.setShowFPS(true);
   app.start();
 }
예제 #4
0
 public static void main(String[] args) throws SlickException {
   AppGameContainer app = new AppGameContainer(new IceIceBabyGame());
   app.setDisplayMode(Game.WINDOW_WIDTH, Game.WINDOW_HEIGHT, false);
   app.setVSync(true);
   app.setFullscreen(false);
   app.setShowFPS(false);
   //       app.setIcon("res//images//icon.png");
   app.start();
 }
예제 #5
0
  public static void main(String[] args) throws SlickException {
    // Erstellung des Programms/Fensters
    AppGameContainer app = new AppGameContainer(new BrickBreaker());
    app.setShowFPS(false);
    app.setDisplayMode(1000, 700, false);
    // app.setVSync(true); Nur anmachen, falls es zu problemen kommt

    // Auf gehts...
    app.start();
  }
예제 #6
0
파일: Kyra.java 프로젝트: almendez/Kyra
 public static void main(String[] arguments) {
   try {
     AppGameContainer app = new AppGameContainer(new Kyra());
     app.setDisplayMode(1024, 768, false);
     app.setShowFPS(false);
     app.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
  /**
   * Run the game
   *
   * @param args Command line arguments
   */
  public static void main(String[] args) {
    try {
      AppGameContainer app = new AppGameContainer(new BreakTheBlocks());

      app.setDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, FULL_SCREEN);
      app.setTargetFrameRate(TARGET_FRAMES_PER_SECOND);
      app.setShowFPS(SHOW_FRAMES_PER_SECOND);
      app.start();
    } catch (SlickException e) {
      e.printStackTrace();
    }
  }
예제 #8
0
파일: Main.java 프로젝트: gero2/OGAM-1
 public static void main(String[] args) {
   Main game = new Main(Main.TITLE);
   try {
     AppGameContainer app = new AppGameContainer(game);
     app.setDisplayMode(WIDTH, HEIGHT, false);
     app.setTargetFrameRate(60);
     app.setShowFPS(true);
     app.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
 /**
  * Boucle main
  *
  * @param args l'argument quand on lance le programme
  * @throws SlickException
  */
 public static void main(String[] args) throws SlickException {
   loadNatives(Game.class);
   AppGameContainer appGc;
   try {
     appGc = new AppGameContainer(new Game(GAMENAME));
     appGc.setDisplayMode(WIDTH, HEIGHT, false);
     appGc.setShowFPS(false);
     appGc.start();
   } catch (SlickException ex) {
     ex.printStackTrace();
   }
 }
예제 #10
0
파일: Game.java 프로젝트: NeoN0x/JeeTrix
 /**
  * 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();
   }
 }
예제 #11
0
  /**
   * Starting point for the game.
   *
   * @param args Command line parameters
   */
  public static void main(String[] args) {
    try {
      AppGameContainer app = new AppGameContainer(new RubberBandBall());

      app.setDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, false);
      app.setShowFPS(false);
      app.setVSync(true);
      app.start();
    } catch (SlickException e) {
      // So we didn't even manage to start the freaking game now, did we.
      e.printStackTrace();
    }
  }
예제 #12
0
 public static void main(String[] args) {
   AppGameContainer appgc;
   try {
     appgc = new AppGameContainer(new Main(gamename));
     height = appgc.getScreenHeight() - 80;
     width = appgc.getScreenWidth() - 15;
     appgc.setDisplayMode(width, height, false);
     appgc.setShowFPS(Menu.accepted);
     appgc.start();
   } catch (SlickException e) {
     System.out.println("Cannot load Game");
   }
 }
 /**
  * Método principal del juego
  *
  * @param args: argumentos del programa
  */
 public static void main(String[] args) {
   try {
     AppGameContainer app =
         new AppGameContainer(new LuffySurvival(Locale.INSTANCE.getText("title")));
     app.setDisplayMode(WIDTH, HEIGHT, false);
     app.setFullscreen(p.isFullScreen());
     app.setShowFPS(false);
     app.setVSync(true);
     app.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
예제 #14
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();
   }
 }
예제 #15
0
 /**
  * O método main desta classe faz algumas configurações importantes para o jogo.
  *
  * @param args
  */
 public static void main(String[] args) {
   AppGameContainer appgc;
   try {
     appgc = new AppGameContainer(new Main(gamename));
     appgc.setDisplayMode(
         width, height, false); // configura o tamanho da tela e desabilita full screen.
     appgc.setTargetFrameRate(fps); // limita quantidade de FPS
     appgc.setShowFPS(false); // configura para que o fps não seja mostrado na tela do jogo
     appgc.setForceExit(
         false); // diz que a aplicação não vai ser abortada após o jogador fechar a tela do jogo.
     appgc.start(); // inicia o app game container
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
예제 #16
0
  public static void main(String[] args) {
    // TODO Auto-generated method stub

    // This  is used to find out which OS is being used
    System.setProperty(
        "org.lwjgl.librarypath",
        new File(new File(System.getProperty("user.dir"), "native"), LWJGLUtil.getPlatformName())
            .getAbsolutePath());
    try {
      AppGameContainer app = new AppGameContainer(new Game("Game"));
      app.setDisplayMode(1050, 750, false);
      app.setTargetFrameRate(60);
      app.setShowFPS(false);
      app.start();
    } catch (SlickException e) {
      e.printStackTrace();
    }
  }
예제 #17
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
  }
예제 #18
0
  public static void main(String[] args) {

    try {
      gardenWidth = Integer.parseInt(settingsPropertiesManager.stringValueForKey("garden-width"));
      gardenHeight = Integer.parseInt(settingsPropertiesManager.stringValueForKey("garden-height"));
      displayWidth = gardenWidth * 10 + 10;
      displayHeight = gardenHeight * 10 + 100;

      AppGameContainer appGameContainer;
      appGameContainer =
          new AppGameContainer(
              new GameOfLife("Game of Life", gardenWidth, gardenHeight, GARDEN_WALLED));
      appGameContainer.setTargetFrameRate(60);
      appGameContainer.setShowFPS(false);
      appGameContainer.setDisplayMode(displayWidth, displayHeight, false);
      appGameContainer.start();
    } catch (SlickException e) {
      Logger.getLogger(SlickGameOfLife.class.getName()).log(Level.SEVERE, null, e);
    } catch (NumberFormatException e) {
      Logger.getLogger(SlickGameOfLife.class.getName()).log(Level.SEVERE, null, e);
    }
  }