Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How do I make my game fullscreen? It's always in windowed mode. I'm using Eclipse on a Mac.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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

share|improve this answer
1  
He can also set fullscreen during execution, on any gameState's update(), using container.setFullscreen(boolean true_or_false); --- (NOTE: You can also do on the render(), but then you are doing it wrong). –  TheLima Sep 18 '12 at 15:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.