Beispiel #1
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();
 }
Beispiel #2
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();
  }
 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();
 }
 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();
  }
Beispiel #6
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();
  }
Beispiel #7
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();
   }
 }
Beispiel #8
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);
   }
 }
  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();
  }
 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);
   }
 }
Beispiel #12
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();
   }
 }
Beispiel #13
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();
   }
 }
Beispiel #14
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();
    }
  }
Beispiel #15
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();
   }
 }
Beispiel #16
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();
   }
 }
  /**
   * 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();
    }
  }
  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();
    }
  }
  /**
   * 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();
    }
  }
Beispiel #20
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();
   }
 }
 /**
  * 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();
   }
 }
  /** @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();
    }
  }
  /**
   * 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();
    }
  }
Beispiel #24
0
 /** @see org.newdawn.slick.BasicGame#keyPressed(int, char) */
 public void keyPressed(int key, char c) {
   if (key == Input.KEY_ESCAPE) {
     System.exit(0);
   }
   if (key == Input.KEY_F1) {
     if (app != null) {
       try {
         app.setDisplayMode(600, 600, false);
         app.reinit();
       } catch (Exception e) {
         Log.error(e);
       }
     }
   }
 }
  @Override
  public void init(GameContainer gc) throws SlickException {
    gc.setShowFPS(true);

    this.runwayX = -70;
    this.runwayY = 298;

    this.landingX = app.getWidth() - 400;
    this.landingY = 80;

    this.takeoffX = app.getWidth() - 400;
    this.takeoffY = 298;

    this.airplaneImage = new Image("lab4_AirportSimulation/images/plane.png");
    this.backgroundImage = new Image("lab4_AirportSimulation/images/background.png");
  }
Beispiel #26
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();
    }
  }
Beispiel #27
0
 /**
  * Inicia el Visor OpenGL indicando la instancia de partido, las dimensiones de la pantalla
  * (sx,sy), si Se ejecuta en pantalla completa(fullscreen), e indicando la instancia del jframe
  * Principal(dejar nulo)
  *
  * @param partido
  * @param sx
  * @param sy
  * @param fullscreen
  * @param principal
  * @throws SlickException
  */
 public VisorOpenGl(Partido partido, int sx, int sy, boolean fullscreen, PrincipalFrame principal)
     throws SlickException {
   this.partido = partido;
   this.sx = sx;
   this.sy = sy;
   this.dxsaque = (sx + 300 * 2) / 75;
   sx2 = sx / 2;
   sy2 = sy / 2;
   this.principal = principal;
   AppGameContainer container = new AppGameContainer(this);
   container.setForceExit(false);
   container.setDisplayMode(sx, sy, fullscreen);
   container.start();
   SoundStore.get().clear();
   InternalTextureLoader.get().clear();
 }
Beispiel #28
0
 public void start() {
   try {
     container.start();
   } catch (final SlickException e) {
     e.printStackTrace();
   }
 }
Beispiel #29
0
  public static void main(String[] args) throws Exception {
    System.setProperty(
        "org.lwjgl.librarypath",
        new File(new File("lib\\native"), LWJGLUtil.getPlatformName()).getAbsolutePath());
    System.setProperty(
        "net.java.games.input.librarypath", System.getProperty("org.lwjgl.librarypath"));

    try {
      AppGameContainer appgc =
          new AppGameContainer(
              new Game(GAME_TITLE)); // Makes a new game container with the specified title.
      appgc.setDisplayMode(640, 400, false); // Sets the screen size to 640x400.
      appgc.setTargetFrameRate(60); // Sets the frame rate to 60.
      appgc.start(); // Starts the game.
    } catch (SlickException e) {
      e.printStackTrace(); // Prints an error if it doesn't work.
    }
  }
Beispiel #30
0
 /** @param args the command line arguments */
 public static void main(String[] args) {
   StateBasedGame game =
       new StateBasedGame("JTD") {
         @Override
         public void initStatesList(GameContainer gc) throws SlickException {
           addState(TDGameplayState.get());
           GameCtrl.setController(TDGameplayState.get());
         }
       };
   try {
     AppGameContainer gc = new AppGameContainer(game, 1024, 768, false);
     gc.setUpdateOnlyWhenVisible(false);
     // gc.setTargetFrameRate(60);
     gc.start();
   } catch (SlickException ex) {
     Logger.getLogger(JTD.class.getName()).log(Level.SEVERE, null, ex);
   }
 }