예제 #1
0
  public static void main(String[] args) throws SlickException {
    AppGameContainer app = new AppGameContainer(new TestPlatformer());

    app.setDisplayMode(800, 600, false);
    app.setTargetFrameRate(FPS);
    app.start();
  }
 /**
  * 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();
   }
 }
예제 #3
0
 public static void main(String args[]) {
   AppGameContainer appgc;
   try {
     appgc = new AppGameContainer(new Game());
     appgc.setDisplayMode(WINDOW_WIDTH, WINDOW_HEIGHT, false);
     // appgc.setFullscreen(true);
     appgc.setTargetFrameRate(15);
     appgc.start();
   } catch (SlickException ex) {
     ex.printStackTrace();
   }
 }
예제 #4
0
  public static void main(String[] args) {

    AppGameContainer appgc;

    try {

      appgc = new AppGameContainer(new Main(gamename));

      appgc.setDisplayMode(xSize, ySize, false);

      int maxFPS = 60;

      appgc.setTargetFrameRate(maxFPS);

      appgc.setTargetFrameRate(60);

      appgc.start();

    } catch (SlickException e) {

      e.printStackTrace();
    }
  }
예제 #5
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");
   }
 }
예제 #6
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();
   }
 }