Exemplo n.º 1
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");
   }
 }
Exemplo n.º 2
0
  public static void main(String[] args) throws SlickException {
    TankzGame tankz = new TankzGame("Tankz");
    AppGameContainer container = new AppGameContainer(tankz);
    container.setDisplayMode(
        Math.round(container.getScreenWidth() * 0.7f),
        Math.round(container.getScreenHeight() * 0.8f),
        false);
    container.setAlwaysRender(true);
    // container.setDisplayMode(1920, 1200, true);
    // container.setTargetFrameRate(60);
    // container.setMaximumLogicUpdateInterval(1);
    // container.setMinimumLogicUpdateInterval(1);

    container.setMusicOn(false);
    container.setMusicVolume(0.1f);
    container.setSoundOn(false);
    container.setSoundVolume(0.1f);

    container.start();
  }