org.newdawn.slick.AppGameContainer Java Examples
The following examples show how to use
org.newdawn.slick.AppGameContainer.
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 File: TestBox.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer) */ public void init(GameContainer c) throws SlickException { if (games.size() == 0) { currentGame = new BasicGame("NULL") { public void init(GameContainer container) throws SlickException { } public void update(GameContainer container, int delta) throws SlickException { } public void render(GameContainer container, Graphics g) throws SlickException { } }; currentGame.init(c); index = -1; } else { index = 0; container = (AppGameContainer) c; startGame(); } }
Example #2
Source File: StateBasedTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #3
Source File: ClipTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #4
Source File: GeomUtilTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 GeomUtilTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #5
Source File: AnimationTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 AnimationTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #6
Source File: SavedStateTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Entry point to our test * * @param argv The arguments passed in the test */ public static void main(String[] argv) { try { container = new AppGameContainer(new SavedStateTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #7
Source File: DistanceFieldTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 DistanceFieldTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #8
Source File: DoubleClickTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Entry point to our test * * @param argv The arguments to pass into the test, not used here */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new DoubleClickTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #9
Source File: UnicodeFontTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); }
Example #10
Source File: CopyAreaAlphaTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 CopyAreaAlphaTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #11
Source File: AlphaMapTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #12
Source File: Scroller.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Entry point to the scroller example * * @param argv The argument passed on the command line (if any) */ public static void main(String[] argv) { try { // create a new container for our example game. This container // just creates a normal native window for rendering OpenGL accelerated // elements to AppGameContainer container = new AppGameContainer(new Scroller(), 800, 600, false); container.start(); } catch (Exception e) { e.printStackTrace(); } }
Example #13
Source File: LineRenderTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Entry point to our test * * @param argv The arguments passed to the test */ public static void main(String[] argv) { try { Renderer.setLineStripRenderer(Renderer.QUAD_BASED_LINE_STRIP_RENDERER); Renderer.getLineStripRenderer().setLineCaps(true); AppGameContainer container = new AppGameContainer(new LineRenderTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #14
Source File: PureFontTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Entry point to our test * * @param argv The arguments passed in the test */ public static void main(String[] argv) { try { container = new AppGameContainer(new PureFontTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #15
Source File: KeyRepeatTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 KeyRepeatTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #16
Source File: GraphicsTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 GraphicsTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #17
Source File: ImageGraphicsTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #18
Source File: PolygonTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Entry point into our test * * @param argv The arguments passed on the command line */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new PolygonTest(), 640, 480, false); container.start(); } catch (Exception e) { e.printStackTrace(); } }
Example #19
Source File: GeomUtilTileTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #20
Source File: BigImageTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 BigImageTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #21
Source File: InputTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * Entry point to our test * * @param argv The arguments passed into our test */ public static void main(String[] argv) { try { AppGameContainer container = new AppGameContainer(new InputTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #22
Source File: InputTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * @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; }
Example #23
Source File: ShapeTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #24
Source File: MorphSVGTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 MorphSVGTest()); container.setDisplayMode(800, 600, false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #25
Source File: GUITest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #26
Source File: DeferredLoadingTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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 DeferredLoadingTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } }
Example #27
Source File: FontTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #28
Source File: ImageBufferEndianTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #29
Source File: PedigreeTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }
Example #30
Source File: GeomTest.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 5 votes |
/** * 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(); } }