/** * This method starts the game * @param mode identify the modality of the game */ public void startGame(String mode){ try { this.mode = mode; MazeView vl = new MazeView(this, mode); AppGameContainer app = new AppGameContainer(vl); app.setDisplayMode(608, 704, false); if(mode.equals("extreme")) app.setTargetFrameRate(260); else app.setTargetFrameRate(60); app.setShowFPS(false); app.start(); } catch (SlickException e) { e.printStackTrace(); } }
@Override public void update(GameContainer gc, StateBasedGame sbg, int i) throws SlickException { if (shouldToggleFullscreen) { shouldToggleFullscreen = false; boolean fs = !gc.isFullscreen(); AppGameContainer agc = (AppGameContainer)gc; agc.setDisplayMode(fs ? agc.getScreenWidth() : Application.DISPLAY_WIDTH, fs ? agc.getScreenHeight() : Application.DISPLAY_HEIGHT, fs); } if (gc.getInput().isKeyPressed(Input.KEY_ENTER)) { click.play(1.0f, CLICK_VOLUME); mainMenu.fade(1000, 0.0f, true); sbg.enterState(Application.GAME, new FadeOutTransition(Color.black, 1000), new EmptyTransition()); } if (gc.getInput().isKeyPressed(Input.KEY_C)) { sbg.enterState(Application.CREDITS); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new StateBasedTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { boolean sharedContextTest = false; try { AppGameContainer container = new AppGameContainer(new ImageCornerTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our simple test * * @param argv The arguments passed in */ public static void main(String argv[]) { try { Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER); Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER); AppGameContainer container = new AppGameContainer(new InkscapeTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv * The arguments passed to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer( new GeomUtilTileTest()); container.setDisplayMode(800, 600, false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new AntiAliasTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER); AppGameContainer container = new AppGameContainer(new GradientTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to the sound test * * @param argv The arguments provided to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new SoundURLTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new ImageOutTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new ImageMemTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new InputProviderTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to the test * * @param args The arguments passed into the test */ public static void main(String[] args) { try { AppGameContainer container = new AppGameContainer(new ImageBufferEndianTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new PackedSheetTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our simple test * * @param args The arguments supplied to the test * @throws SlickException Indicates a failure loading or processing resources * @throws IOException Indicates a failure loading the font */ public static void main(String[] args) throws SlickException, IOException { Input.disableControllers(); AppGameContainer container = new AppGameContainer(new UnicodeFontTest()); container.setDisplayMode(512, 600, false); container.setTargetFrameRate(20); container.start(); }
public final void Initialize() { // Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER); try { if (AppGameContainer.getBuildVersion() < 206) { System.err .println("Your slick.jar is outdated! Please reinstall the game."); JOptionPane .showMessageDialog(null, "Your slick.jar is outdated! Please reinstall the game."); System.exit(0); return; } slickResources = new SlickResources(game); slickGame = new SlickGame(game, this); container = new AppGameContainer(slickGame); // Setup the display if (game.gameOptions.displayWindowed == true) container.setDisplayMode(game.ResolutionX, game.ResolutionY, false); else container.setDisplayMode(game.ResolutionX, game.ResolutionY, true); container.start(); } catch (Exception e) { game.throwException(e); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new ClipTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv * The arguments passed to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer( new TransitionTest()); container.setDisplayMode(800, 600, false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Start the game as an application * * @param game The game to be started * @param width The width of the window * @param height The height of the window * @param fullscreen True if the window should be fullscreen */ public static void runAsApplication(Game game, int width, int height, boolean fullscreen) { try { AppGameContainer container = new AppGameContainer(game, width, height, fullscreen); container.start(); } catch (Exception e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed in the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new FontPerformanceTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new GUITest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new ParticleTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv * The arguments passed to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer( new MorphShapeTest()); container.setDisplayMode(800, 600, false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new FlashTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { GraphicsFactory.setUseFBO(false); AppGameContainer container = new AppGameContainer(new ImageGraphicsTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new TileMapTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new GradientImageTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new ImageReadTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to the sound test * * @param argv The arguments provided to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new SoundTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed to the test */ public static void main(String[] argv) { try { Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER); AppGameContainer container = new AppGameContainer(new GeomTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new PedigreeTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed in the test */ public static void main(String[] argv) { try { container = new AppGameContainer(new FontTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments to pass into the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new AlphaMapTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to the sound test * * @param argv The arguments provided to the test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new SoundPositionTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * Entry point to our test * * @param argv The arguments passed to the test */ public static void main(String[] argv) { try { Renderer.setRenderer(Renderer.VERTEX_ARRAY_RENDERER); AppGameContainer container = new AppGameContainer(new ShapeTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
/** * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer) */ public void init(GameContainer container) throws SlickException { if (container instanceof AppGameContainer) { app = (AppGameContainer) container; } input = container.getInput(); x = 300; y = 300; }