How to switch between full-screen & window mode
by amaranthia · in Torque Game Builder · 01/09/2007 (1:56 pm) · 2 replies
Can anyone tell me which file contains the setting that controls whether the game opens in full-screen or windowed mode? What line should I edit?
Thanks!
Thanks!
#2
What I've wound up doing, after building a game, is edit the prefs/defaults files manually, delete the dso's built by the packager, and just include the .cs files in the game -- they are compiled at first run, and the .cs files are included in the build as well too -- might not be a bad idea to create a 'standard' prefs/defaults file and just copy/overwrite the ones from your development machine after building --
I also remove alot of references to unused preferences, both in the prefs/defaults as well as there creation in the common files -- stuff like networking preferences in a non-networked game can make editting the preferences file confusing for some users --
Also a note, the state that TGB was in when it closed, is usually the state it opens in, so if the user started in fullscreen, alt-entered into windowed up, and closed the game, it should open in windowed mode -- you can remove the 'alt-enter' key-binding in one of the common folders (do a file search for 'toggleFullscreen' and comment out the ActionMap.bindCmd line referencing it)
For Alpha/Beta builds, this stuff is usually 'irrelevant', but for production releases or 'public betas', it's best to spend a few hours making sure you clean up alot of the 'unnecessary' code included by TGB by default (it includes tons of stuff that some people dont ever need or use - for the sake of those that do).
A good review of the 'common' folder and the way it loads everything is the best thing to do, you'll most likely find that quite a bit of whats in there, you may not actually utilize -- but this time is best spent prior to a release, and it's usually a good idea to have two copies of TGB installed, one for 'release' and one for 'development', as the development copy you'd most likely want everything in, but the release is stripped down to just what you think you need, and you can do some quick tests and review the console.log file to see if any dependency errors are generated, as well as see all the things that are loaded -- anything you think isn't needed, find it's reference, take it out, and test ...
02/03/2007 (4:49 pm)
There are a series of 'pref' files scattered around, one is 'prefs.cs' and is in common (iirc), another is 'defaults.cs' and I believe there's yet another 'prefs' and 'defaults' in the game mod folder as well.What I've wound up doing, after building a game, is edit the prefs/defaults files manually, delete the dso's built by the packager, and just include the .cs files in the game -- they are compiled at first run, and the .cs files are included in the build as well too -- might not be a bad idea to create a 'standard' prefs/defaults file and just copy/overwrite the ones from your development machine after building --
I also remove alot of references to unused preferences, both in the prefs/defaults as well as there creation in the common files -- stuff like networking preferences in a non-networked game can make editting the preferences file confusing for some users --
Also a note, the state that TGB was in when it closed, is usually the state it opens in, so if the user started in fullscreen, alt-entered into windowed up, and closed the game, it should open in windowed mode -- you can remove the 'alt-enter' key-binding in one of the common folders (do a file search for 'toggleFullscreen' and comment out the ActionMap.bindCmd line referencing it)
For Alpha/Beta builds, this stuff is usually 'irrelevant', but for production releases or 'public betas', it's best to spend a few hours making sure you clean up alot of the 'unnecessary' code included by TGB by default (it includes tons of stuff that some people dont ever need or use - for the sake of those that do).
A good review of the 'common' folder and the way it loads everything is the best thing to do, you'll most likely find that quite a bit of whats in there, you may not actually utilize -- but this time is best spent prior to a release, and it's usually a good idea to have two copies of TGB installed, one for 'release' and one for 'development', as the development copy you'd most likely want everything in, but the release is stripped down to just what you think you need, and you can do some quick tests and review the console.log file to see if any dependency errors are generated, as well as see all the things that are loaded -- anything you think isn't needed, find it's reference, take it out, and test ...
Torque Owner Ben R Vesco
$pref::Video::fullScreen