How do I make my game fullscreen? It's always in windowed mode. I'm using Eclipse on a Mac.
At one place in your code, you create your game container. If you followed the tutorials, that part will look something like this:
AppGameContainer container = new AppGameContainer(game);
Now you can call setDisplayMode on the container object:
container.setDisplayMode(640, 480, true);
The first two parameter define the window resolution, the third if slick should be opened in windowed or fullscreen mode (true for fullscreen mode).
You should head to the slick2d wiki, as it has some beginner tutorials explaining such things. For example in this tutorial the basic things are explained step by step (also your question is answered there): Creating a Basic Game tutorial
All tutorials: Slick2d Tutorials Index
-
1\$\begingroup\$ He can also set fullscreen during execution, on any gameState's
update()
, usingcontainer.setFullscreen(boolean true_or_false);
--- (NOTE: You can also do on therender()
, but then you are doing it wrong). \$\endgroup\$ – XenoRo Sep 18 '12 at 15:33