Java Code Examples for com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration

The following examples show how to use com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: gdx-pd   Source File: AudioGdxMusicTest.java    License: Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) 
{
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	
	new LwjglApplication(new Game(){
		@Override
		public void create() {
			
			// play a music
			Music music = Gdx.audio.newMusic(Gdx.files.classpath("cloudconnected.ogg"));
			music.setVolume(0.3f);
			music.play();
			
			// and a pd patch at the same time
			Pd.audio.create(new PdConfiguration());
			Pd.audio.open(Gdx.files.local("resources/test.pd"));
			
		}}, config);
	
}
 
Example 2
Source Project: gdx-pd   Source File: AudioGdxSoundTest.java    License: Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) 
{
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	
	new LwjglApplication(new Game(){
		@Override
		public void create() {
			
			// play a pd patch
			Pd.audio.create(new PdConfiguration());
			Pd.audio.open(Gdx.files.local("resources/test.pd"));
			
			// and sounds at the same time
			final Sound snd = Gdx.audio.newSound(Gdx.files.classpath("shotgun.wav"));
			snd.play();
			Gdx.input.setInputProcessor(new InputAdapter(){
				@Override
				public boolean touchDown(int screenX, int screenY, int pointer, int button) {
					snd.play();
					return true;
				}
			});
			
		}}, config);
	
}
 
Example 3
Source Project: shapedrawer   Source File: GraphDrawerTest.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 800;
    config.height = 800;
    config.samples = 4;
    new LwjglApplication(new GraphDrawerTest(), config);
}
 
Example 4
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 5
Source Project: talos   Source File: TalosDemo.java    License: Apache License 2.0 5 votes vote down vote up
public static void main (String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 400;
    config.height = 400;
    config.title = "Talos Demo";
    LwjglFrame frame = new LwjglFrame(new TalosDemo(), config);
}
 
Example 6
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 7
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 8
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 9
Source Project: uracer-kotd   Source File: URacerDesktop.java    License: Apache License 2.0 5 votes vote down vote up
public static void main (String[] argv) {
	int year = Calendar.getInstance().get(Calendar.YEAR);
	System.out.print(URacer.Name + " (" + URacer.versionInfo + ")\nCopyright (c) 2011-" + year + " Manuel Bua.\n\n");

	// load boot configuration, either from file or from defaults
	BootConfig boot = new BootConfig();

	// override boot config by command line flags, if any
	if (argv.length > 0) {
		if (!CommandLine.applyLaunchFlags(argv, boot)) {
			return;
		}
	} else {
		System.out.println("Try --help for a list of valid command-line switches.\n");
	}

	System.setProperty("org.lwjgl.opengl.Window.undecorated", "" + boot.getBoolean(BootConfigFlag.UNDECORATED));

	LwjglApplicationConfiguration config = createLwjglConfig(boot);

	System.out.print("Resolution set at " + (config.width + "x" + config.height) + " (x=" + boot.getWindowX() + ", y="
		+ boot.getWindowY() + ")\n");
	System.out.print("Vertical sync: " + (config.vSyncEnabled ? "Yes" : "No") + "\n");
	System.out.print("Fullscreen: " + (config.fullscreen ? "Yes" : "No") + "\n");
	System.out.print("Window decorations: " + (boot.getBoolean(BootConfigFlag.UNDECORATED) ? "No" : "Yes") + "\n");

	URacer uracer = new URacer(boot);
	LwjglApplication app = new LwjglApplication(uracer, config);

	URacerDesktopFinalizer finalizr = new URacerDesktopFinalizer(boot, (OpenALAudio)app.getAudio());
	uracer.setFinalizer(finalizr);

	if (!config.fullscreen) {
		Display.setLocation(boot.getWindowX(), boot.getWindowY());
	}
}
 
Example 10
Source Project: Norii   Source File: DesktopLauncher.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(final String[] arg) {
	final LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.title = "Norii a turn based strategy game by Jelte";
	config.width = 580;
	config.height = 580;
	config.fullscreen = false;
	config.initialBackgroundColor = Color.BLACK;

	final Application app = new LwjglApplication(new Norii(), config);
	Gdx.app = app;
	Gdx.app.setLogLevel(Application.LOG_DEBUG);
}
 
Example 11
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 12
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 13
Source Project: cocos-ui-libgdx   Source File: Runner.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    //config.width = DemoGame.GAME_WIDTH;
    // config.height = DemoGame.GAME_HEIGHT;
    //以下作为assetmanager使用
    config.width = 1280;
    config.height = 720;
    new LwjglApplication(new DemoGame(), config);
}
 
Example 14
Source Project: TerraLegion   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	PhysicsGame.instantiateSettings();
	config.width = Settings.getWidth();
	config.height = Settings.getHeight();
	new LwjglApplication(new PhysicsGame(), config);
}
 
Example 15
Source Project: killingspree   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main (String[] arg) {
		LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
		config.title = "Killing Spree";
		config.height = 720;
		config.width = 1280;
		config.vSyncEnabled = true;
//		config.fullscreen = true;
		new LwjglApplication(new KillingSpree(new DesktopServices()), config);
	}
 
Example 16
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 17
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 18
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 19
Source Project: buffer_bci   Source File: DesktopLauncher.java    License: GNU General Public License v3.0 5 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 480;
	config.height = 320;
	config.title = "Invaders";
	new LwjglApplication(new Invaders(), config);
}
 
Example 20
Source Project: riiablo   Source File: DS1Viewer.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
  LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
  config.title = "DS1 Viewer";
  config.resizable = true;
  config.width = 1280;
  config.height = 720;
  config.foregroundFPS = config.backgroundFPS = 144;
  DS1Viewer client = new DS1Viewer();
  new LwjglApplication(client, config);
}
 
Example 21
Source Project: riiablo   Source File: DirectionTool.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
  LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
  config.title = TAG;
  config.resizable = false;
  config.width = 256;
  config.height = 256;
  config.vSyncEnabled = false;
  config.foregroundFPS = config.backgroundFPS = 144;
  new LwjglApplication(new DirectionTool(), config);
}
 
Example 22
Source Project: fluid-simulator-v2   Source File: DesktopStarter.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
		LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
		config.fullscreen = true;
		config.resizable = false;
		config.title = "Fluid Simulator v2.1";
		config.vSyncEnabled = true;
		config.width = (int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();
		config.height = (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight();
//		config.width = 800;
//		config.height = 480;
		config.useGL20 = true;
		new LwjglApplication(new FluidSimulatorStarter(), config);
	}
 
Example 23
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 24
Source Project: ud406   Source File: DesktopLauncher.java    License: MIT License 5 votes vote down vote up
public static void main(String[] arg) {
    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.width = 640;
    config.height = 480;

    new LwjglApplication(new GigaGalGame(), config);
}
 
Example 25
Source Project: cocos2d-java   Source File: Main.java    License: MIT License 5 votes vote down vote up
public static void main(String[] args) {
	LwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();
	cfg.title = "SimpleGame";
	cfg.useGL20 = true;
	cfg.width = 852;
	cfg.height = 480;
	
	new AppDelegate();
	new LwjglApplication(Cocos2d.Game(), cfg);
}
 
Example 26
Source Project: Cardshifter   Source File: DesktopLauncher.java    License: Apache License 2.0 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 1024;
	config.height = 600;
	new LwjglApplication(new CardshifterGame(new NonGWTPlatform()), config);
}
 
Example 27
Source Project: talos   Source File: ParticleControlTest.java    License: Apache License 2.0 4 votes vote down vote up
public static void main (String[] args) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = 1280;
	config.height = 720;
	new LwjglApplication(new ParticleControlTest(), config);
}
 
Example 28
Source Project: ud405   Source File: DesktopLauncher.java    License: MIT License 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	new LwjglApplication(new DrawTheCantorGasket(), config);
}
 
Example 29
Source Project: ud405   Source File: DesktopLauncher.java    License: MIT License 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	new LwjglApplication(new InputTestbed(), config);
}
 
Example 30
Source Project: ud405   Source File: DesktopLauncher.java    License: MIT License 4 votes vote down vote up
public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	new LwjglApplication(new IciclesGame(), config);
}