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();
 }
Esempio n. 2
0
  @Override
  /** Mis à jour à chaque frame */
  public void update(GameContainer container, int delta) throws SlickException {
    particleEngine.update();

    // Un peu de fun
    if (gameEngine.getStatus() != GameStatus.STARTED)
      if (Math.random() < 0.04) particleEngine.pushBlocks();

    // On gère le fenêtrage
    if (input.isKeyDown(Input.KEY_F)) {
      fullscreen = !fullscreen;
      ((AppGameContainer) container).setDisplayMode(800, 600, fullscreen);
    }
    if (input.isKeyDown(Input.KEY_ESCAPE)) {
      container.exit();
    }

    // On économise un peu de CPU ;)
    try {
      Thread.sleep(5);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }
Esempio n. 3
0
 public static void main(String[] argv) throws SlickException {
   AppGameContainer app = new AppGameContainer(new JuegoIAVJ111Slick());
   app.setDisplayMode(800, 600, false);
   app.setTargetFrameRate(60);
   // app.setVSync(true);
   app.start();
 }
  public static void main(String[] args) throws SlickException {
    AppGameContainer app = new AppGameContainer(new TestPlatformer());

    app.setDisplayMode(800, 600, false);
    app.setTargetFrameRate(FPS);
    app.start();
  }
Esempio n. 5
0
 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();
 }
Esempio n. 6
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();
  }
Esempio n. 7
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();
 }
Esempio n. 8
0
  public static void main(String[] args) throws SlickException {
    AppGameContainer app = new AppGameContainer(new SetupClass("Setup Test"));
    app.setDisplayMode(800, 600, false);
    app.setAlwaysRender(true);
    app.setTargetFrameRate(60);

    app.start();
  }
Esempio n. 9
0
 /**
  * Entry point to our test
  *
  * @param argv The arguments to pass into the test
  */
 public static void main(String[] argv) {
   try {
     AppGameContainer container = new AppGameContainer(new DistanceFieldTest());
     container.setDisplayMode(800, 600, false);
     container.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
Esempio n. 10
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();
 }
Esempio n. 11
0
 public static void main(String args[]) {
   try {
     AppGameContainer app = new AppGameContainer(new OOWorld());
     app.setDisplayMode(800, 600, false);
     app.start();
     app.setVSync(false);
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
 /**
  * Try to start a new game in a game container, setting the display mode. Log all errors.
  *
  * @param args None.
  */
 public static void main(String[] args) {
   try {
     AppGameContainer appgc;
     appgc = new AppGameContainer(new BasicNetworkTestClient("BasicNetworkTestClient Build Test"));
     appgc.setDisplayMode(640, 480, false);
     appgc.start();
   } catch (SlickException ex) {
     Logger.getLogger(BasicNetworkTestClient.class.getName()).log(Level.SEVERE, null, ex);
   }
 }
Esempio n. 13
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();
  }
Esempio n. 14
0
 public static void main(String[] args) {
   try {
     AppGameContainer appgc;
     appgc = new AppGameContainer(new PlaceholderGame("Simple Slick Game"));
     appgc.setDisplayMode(640, 480, false);
     appgc.start();
   } catch (SlickException ex) {
     Logger.getLogger(PlaceholderGame.class.getName()).log(Level.SEVERE, null, ex);
   }
 }
Esempio n. 15
0
 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();
   }
 }
Esempio n. 16
0
  /**
   * Entry point to our test
   *
   * @param argv The arguments to pass into the test
   */
  public static void main(String[] argv) {
    try {
      Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER);

      AppGameContainer container = new AppGameContainer(new GradientTest());
      container.setDisplayMode(800, 600, false);
      container.start();
    } catch (SlickException e) {
      e.printStackTrace();
    }
  }
Esempio n. 17
0
 public static void main(String[] args) {
   try {
     RunnerGame game = new RunnerGame("runner");
     AppGameContainer appgc = new AppGameContainer(game);
     appgc.setDisplayMode(GAME_WIDTH, GAME_HEIGHT, false);
     appgc.setMinimumLogicUpdateInterval(1000 / 60);
     appgc.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
Esempio n. 18
0
 public static void main(String[] args) {
   System.setProperty("java.library.path", "libs");
   System.setProperty("org.lwjgl.librarypath", new File("libs/natives").getAbsolutePath());
   try {
     AppGameContainer app = new AppGameContainer(new Game("Doge the Bullets"));
     app.setDisplayMode(1920, 1080, true);
     app.start();
   } catch (SlickException e) {
     e.printStackTrace();
   }
 }
  /**
   * Entry point to our test
   *
   * @param argv The arguments passed to the test
   */
  public static void main(String[] argv) {
    try {
      Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER);
      Renderer.getLineStripRenderer().setLineCaps(true);

      AppGameContainer container = new AppGameContainer(new LineRenderTest());
      container.setDisplayMode(800, 600, false);
      container.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();
    }
  }
Esempio n. 21
0
 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();
   }
 }
Esempio n. 22
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();
   }
 }
Esempio n. 23
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();
   }
 }
 /**
  * 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();
   }
 }
  public static void main(String[] args) {
    try {
      container = new AppGameContainer(new TranparencyTest());
      container.setMinimumLogicUpdateInterval(20);
      container.setDisplayMode(800, 600, false);
      container.setClearEachFrame(false);
      container.start();

    } catch (SlickException e) {
      e.printStackTrace();
    }
  }
Esempio n. 26
0
  /** @param argv */
  public static void main(String[] argv) {

    try {
      AppGameContainer container =
          new AppGameContainer(new CircularLinkedTest3("Circular Linked List Test"));
      container.setDisplayMode(800, 600, false);
      container.setTargetFrameRate(2);
      container.start();

    } catch (SlickException e) {
      e.printStackTrace();
    }
  }
 /**
  * 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();
   }
 }
Esempio n. 28
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");
   }
 }
Esempio n. 29
0
  public Main() throws SlickException {
    // Init LWJGL
    final File nativesDir = new File("natives" + File.separator + SystemUtils.getSystemOS().name());
    System.setProperty("org.lwjgl.librarypath", nativesDir.getAbsolutePath());
    System.setProperty("net.java.games.input.librarypath", nativesDir.getAbsolutePath());

    game = new MainGame(this);

    container = new AppGameContainer(game);
    container.setDisplayMode(1024, 768, false);

    board = new Board();
  }
Esempio n. 30
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();
    }
  }