public static void main(String[] arg) {
   LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
   config.title = Application.TITLE;
   config.width = Application.VIEWPORT_WIDTH;
   config.height = Application.VIEWPORT_HEIGHT;
   config.backgroundFPS = 60;
   config.foregroundFPS = 60;
   config.resizable = true;
   new LwjglApplication(new Application(), config);
 }
예제 #2
0
  public static void main(String[] args) {
    LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
    cfg.title = "Boy In The Bubble";
    cfg.useGL20 = true;
    cfg.samples = 4;
    cfg.width = 480;
    cfg.height = 320;
    cfg.vSyncEnabled = true;
    cfg.foregroundFPS = 60;

    new LwjglApplication(new GameScreen(), cfg);
  }
예제 #3
0
 public static void main(String[] arg) {
   width = 1;
   height = 1;
   LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
   config.fullscreen = false;
   config.vSyncEnabled = true;
   config.width = width;
   config.height = height;
   config.foregroundFPS = 60;
   config.allowSoftwareMode = true;
   config.samples = 2;
   new LwjglApplication(new LovePirates(), config);
   // config.fullscreen = true;
 }
예제 #4
0
  public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.foregroundFPS = 1000;
    config.vSyncEnabled = false;
    config.width = 1280;
    config.height = 720;
    config.resizable = false;
    config.title = "Burst";
    // config.setFromDisplayMode(LwjglApplicationConfiguration.getDesktopDisplayMode());
    config.fullscreen = false;

    config.addIcon("img/logo.png", FileType.Internal);
    config.addIcon("img/logo_64.png", FileType.Internal);
    config.addIcon("img/logo_32.png", FileType.Internal);
    config.addIcon("img/logo_16.png", FileType.Internal);

    new LwjglApplication(new Burst(), config);
  }
  /**
   * Create a new desktop game that is drawn using libGDX.
   *
   * @param gameListener the game listener that receives the updates regarding the game
   * @param width the width of the game container
   * @param height the height of the game container
   * @param fullScreen the full screen flag of the container
   * @throws GdxEngineException in case the initialization goes wrong
   */
  public ApplicationGameContainer(
      GameListener gameListener, int width, int height, boolean fullScreen)
      throws GdxEngineException {
    this.gameListener = gameListener;
    config = new LwjglApplicationConfiguration();
    config.forceExit = false;
    config.vSyncEnabled = true;
    config.backgroundFPS = 10;
    config.foregroundFPS = 60;

    windowHeight = height;
    windowWidth = width;
    fullScreenResolution = getFittingFullScreenResolution(width, height);
    if (fullScreen) {
      config.height = fullScreenResolution.getHeight();
      config.width = fullScreenResolution.getWidth();
    } else {
      config.height = height;
      config.width = width;
    }
    config.fullscreen = fullScreen;
  }