/**
  * Runs the game on a desktop computer
  *
  * @param arg command line args -- not used
  */
 public static void main(String[] arg) {
   LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
   config.title = Malice.TITLE + " v" + Malice.VERSION;
   config.vSyncEnabled = true;
   config.width = Malice.GAME_WIDTH;
   config.height = Malice.GAME_HEIGHT;
   new LwjglApplication(new Malice(), config);
 }
Beispiel #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);
  }
 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;
 }
Beispiel #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);
  }
  public static void main(String[] args) {

    DisplayMode displayMode = LwjglApplicationConfiguration.getDesktopDisplayMode();

    //        try {
    //            // find first display mode that allows us 640*480*16
    //            int mode = -1;
    //            DisplayMode[] modes = LwjglApplicationConfiguration.getDisplayModes();
    //            for (int i = 0; i < modes.length; i++) {
    //                    if (modes[i].width == 800 && modes[i].height == 480) {
    //                            mode = i;
    //                            break;
    //                    }
    //            }
    //            if (mode != -1) {
    //                    // select above found displaymode
    //                    System.out.println("Setting display mode to " + modes[mode]);
    //                    displayMode = modes[mode];
    //                    System.out.println("Created display.");
    //            }
    //	    } catch (Exception e) {
    //	            System.err.println("Failed to create display due to " + e);
    //	    }
    //

    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();

    config.setFromDisplayMode(displayMode);

    config.width = 800;
    config.height = 480;
    config.title = "Qb";

    config.fullscreen = false;
    config.samples = 4;
    config.useGL20 = true;
    config.vSyncEnabled = true;
    config.useCPUSynch = true;
    new LwjglApplication(new DesktopStarter(), 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;
  }
Beispiel #7
0
  public LwjglApplication(
      ApplicationListener listener, String title, int width, int height, boolean useGL2) {
    LwjglNativesLoader.load();

    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.title = title;
    config.width = width;
    config.height = height;
    config.useGL20 = useGL2;
    config.vSyncEnabled = true;
    graphics = new LwjglGraphics(config);
    audio = new OpenALAudio(16, config.audioDeviceBufferCount, config.audioDeviceBufferSize);
    files = new LwjglFiles();
    input = new LwjglInput();
    this.listener = listener;

    Gdx.app = this;
    Gdx.graphics = graphics;
    Gdx.audio = audio;
    Gdx.files = files;
    Gdx.input = input;
    initialize();
  }