I’m using slick2d, but I want fullscreen without literally stretching the display to the point where it’s ugly and unrecognizable…the resolution is 600x500(Strange I know), but I need it to take up the whole screen, seeing as I’m entering this in a contest, and a game that can’t go fullscreen won’t look so hot.
Anyway, any thoughts? I’m so far in, editing all of the values for the menu select and what-not is relatively out of the question; unless I would have to edit the ENTIRE thing, which would take longer than I’d like to spend.
Not that i’ve really ever used slick properly, but i’d encourage you to literally just type what you want to find out into google, I almost always find something useful and plus it saves you a heap of time asking people.
I never had any trouble, setting the window resolution to my monitors resolution, with the fullscreen flag set to true. Ofcourse, that would require some tinkering, since not everyone is using the same resolution.
This is what I got, now, I need it to center the Canvas, and also slightly stretch it as well. Is there a way to do this? If not, how do I fully stretch it, and how do I simply center as if I were doing both seperately? Thank you.
[quote]I’m using slick2d, but I want fullscreen without literally stretching the display to the point where it’s ugly and unrecognizable…the resolution is 600x500(Strange I know), but I need it to take up the whole screen, seeing as I’m entering this in a contest, and a game that can’t go fullscreen won’t look so hot.
Anyway, any thoughts? I’m so far in, editing all of the values for the menu select and what-not is relatively out of the question; unless I would have to edit the ENTIRE thing, which would take longer than I’d like to spend.
[/quote]
For convenience, Slick provides a utility class for this purpose: ScalableGame. Check out ScalableGameTest.
For convenience, Slick provides a utility class for this purpose: ScalableGame. Check out ScalableGameTest.
[/quote]
Thank you.
EDIT: The graphics look a little pixel-y in the stretched mode. Is there a way to center the container to the middle of the window when it’s stretched? I’ll add it as an option.
EDIT, EDIT:
You can’t resize the window to whatever you wish that way, you have to have change it to designated sizes within the code. As when I implement it into an app container, it doesn’t allow me to resize the window.
Is there no way to center the container inside the window though? That’s really all I need to do at this point…along with the proper shutdown of javaw.exe.
Thanks. I think it worked.
EDIT:
I’m still having trouble getting javaw.exe to shut off, and turning off the screen disposing just leaves the window up too to add to insult.
EDIT, EDIT:
Fixed by modifying some lines. Here it is for anyone else who may come across this in the future:
frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent we){
Display.destroy();
System.exit(0);
}
});
Do that anywhere you plan on turning the game off at, and change this too: