Example #1
0
 public static void main(String[] args) throws SlickException {
   AppGameContainer app = new AppGameContainer(new GameEngine("Setup Test"));
   app.setDisplayMode(1200, 800, false);
   app.setAlwaysRender(true);
   app.setVSync(true);
   app.setTargetFrameRate(60);
   app.start();
 }
Example #2
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();
 }
Example #3
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();
   }
 }
  /**
   * 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();
    }
  }
 /**
  * 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();
   }
 }
  public Airport(
      /*int duration,*/ double newLandingProbability,
      double newTakeoffProbability,
      int simulationDelay) {
    super("Airport Simulator");

    // -- AIRPORT SIMULATOR STUFF --

    // this.duration = duration;
    this.currentUpdate = 0;
    this.newLandingProbability = newLandingProbability;
    this.newTakeoffProbability = newTakeoffProbability;
    this.simulationDelay = simulationDelay;
    this.lastUpdate = System.currentTimeMillis();

    rand = new Random();

    airQueue = new LinkedList<Airplane>();
    groundQueue = new LinkedList<Airplane>();

    runway = new Runway(2);

    // --SLICK STUFF--

    System.setProperty(
        "org.lwjgl.librarypath",
        System.getProperty("user.dir") + "/lib/native/" + LWJGLUtil.getPlatformName());
    System.setProperty(
        "net.java.games.input.librarypath", System.getProperty("org.lwjgl.librarypath"));

    try {
      app = new AppGameContainer(this);
      app.setDisplayMode(750, 370, false);
      app.setVSync(true);
      app.setTargetFrameRate(60);
      app.start();
    } catch (SlickException e) {
      e.printStackTrace();
    }
  }
Example #7
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();
      }
    }
  }