Game Development Community

Fullscreen game

by Andrew H · in Torque Game Builder · 07/28/2011 (5:53 pm) · 9 replies

Is there any way to make a game appear fullscreen?

#1
07/28/2011 (7:01 pm)
Press Alt + Enter
#2
07/29/2011 (6:07 am)
Oh. I should have been a bit more clear: How do I give the OPTION for a player to switch between windowed and fullscreen mode through a checkbox in GUI?
#3
07/29/2011 (7:43 am)
There is an options dialog, press Ctrl + O that should be standard in your project. You could then reskin that dialog to suit your needs.
#4
07/29/2011 (8:31 am)
I pressed Ctrl + O but nothing happened. I tried it in the level editor and in a running project. Level editor just assumed I wanted to open a scene - project did nothing.
#5
07/29/2011 (12:32 pm)
@Laura - It depends on how your GUI is set up, but ultimately you want to use this function:

setScreenMode(%resolutionX, %resolutionY, %bpp, %newFullScreen);

So if you have a checkbox called FullScreenToggle, you would try something like this:

function FullScreenToggle::onAction(%this)
{
   %toggle = %this.getValue();

   // You have to get the first three parameters
   // The fourth parameter is what determines the fullscreen mode
   setScreenMode(%resolutionX, %resolutionY, %bpp, %toggle);
}
#6
07/29/2011 (12:54 pm)
@Michael Perry

Thanks! So how do I get the %resolutionX, %resolutionY and %bpp parameters?
#7
08/08/2011 (8:21 pm)
Please? I really need to know here.
#8
08/10/2011 (12:13 am)
@Laura %resolutionX is, as its name suggests, the resolution of the screen along the X axis you want to set, or width, and the %resolutionY is height. BPP stands for bits-per-pixel, its value usually is 32. You can set these manually for now, but the proper way to do this is to look through the supported resolutions returned by getResolutionList() and choose one that fits your game better.
#9
08/10/2011 (7:42 am)
@Rpahut, Thanks!