package com.lucasdnd.ags.main; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.DisplayMode; import org.newdawn.slick.AppGameContainer; import com.lucasdnd.ags.system.GameSystem; public class Start { public static void main(String args[]) { try { /* * Special thanks to * * Mark James - icons (modified version in game) (opengameart.org) * * D W - coin sound (freesound.org) * Caps Lock - cash register sound (freesound.org) * Notification sound - Cabeeno Rossley (freesound.org) http://freesound.org/people/Cabeeno%20Rossley/sounds/126418/ * Click sound - D W (edited, first click only) (freesound.org) http://freesound.org/people/D%20W/sounds/152537/ * Placement sound - DasDeer (freesound.org) http://freesound.org/people/DasDeer/sounds/161544/ * Popping sound - SunnySideSound (freesound.org) http://freesound.org/people/SunnySideSound/sounds/67087/ * */ // Create the App Container AppGameContainer container = new AppGameContainer(new GameSystem("Awesome Game Store v" + GameSystem.VERSION)); container.setDisplayMode(1366, 768, false); container.setTargetFrameRate(60); container.setMinimumLogicUpdateInterval(3); container.setMaximumLogicUpdateInterval(3); container.setVSync(true); container.setAlwaysRender(true); container.start(); } catch(Exception e) { e.printStackTrace(); System.exit(0); } } private static void getAvailableDisplayModes() { // Get the local Graphics Environment GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); // Get user's main monitor resolution GraphicsDevice gd = ge.getDefaultScreenDevice(); int width = gd.getDisplayMode().getWidth(); int height = gd.getDisplayMode().getHeight(); // Display Modes try { DisplayMode[] modes = Display.getAvailableDisplayModes(); for (int i = 0; i < modes.length; i++) { System.out.println("--- Mode[" + i + "] -------------"); System.out.println("width = " + modes[i].getWidth()); System.out.println("height = " + modes[i].getHeight()); System.out.println("fs = " + modes[i].isFullscreenCapable()); System.out.println("freq = " + modes[i].getFrequency()); } // DisplayMode displayMode = modes[0]; // Display.setDisplayMode(displayMode); // Display.setFullscreen(true); // Display.create(); } catch (LWJGLException e) { e.printStackTrace(); } } }