Game Development Community

Ok let me ask Again

by Shakey · in Torque Game Builder · 04/16/2009 (10:41 am) · 9 replies

Why is it that when your are creating games in TGB you can't get the game to automatically start in fullscreen mode. I have looked at this forum for answers and the issue was never addressed. I created something really simple a project with just a blue background, ran the project and it defaults to 800X600 windowed mode. I mean has anyone ever had this problem. I asked the same question two days ago, no answer. Can anyone help me?

#1
04/16/2009 (11:23 am)
That's really not a helpful way to title your thread.

Look in the common folder for the prefs file.
#2
04/16/2009 (12:01 pm)
Jason I have done that, changed the value from 0 to 1

here is the code below. I still get the 800X600 windowed mode. Now I am running this from TGB, should I build the project and run it from the folder. I have never had as many problems with any of the other Torque products I own.


//-----------------------------------------------------------------------------
// Torque Game Builder
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

///
/// Network
///
$pref::Net::LagThreshold = 400;
$pref::Net::Port = 28000;

///
/// Input
///
$pref::Input::LinkMouseSensitivity = 1;
$pref::Input::MouseEnabled = 0;
$pref::Input::JoystickEnabled = 0;
$pref::Input::KeyboardTurnSpeed = 0.1;

///
/// Audio
///
$pref::Audio::driver = "OpenAL";
$pref::Audio::forceMaxDistanceUpdate = 0;
$pref::Audio::environmentEnabled = 0;
$pref::Audio::masterVolume   = 0.8;
$pref::Audio::channelVolume1 = 0.8;
$pref::Audio::channelVolume2 = 0.8;
$pref::Audio::channelVolume3 = 0.8;
$pref::Audio::channelVolume4 = 0.8;
$pref::Audio::channelVolume5 = 0.8;
$pref::Audio::channelVolume6 = 0.8;
$pref::Audio::channelVolume7 = 0.8;
$pref::Audio::channelVolume8 = 0.8;

///
/// TGB
///
$pref::T2D::dualCollisionCallbacks = 1;
$pref::T2D::imageMapDumpTextures = 0;
$pref::T2D::imageMapEchoErrors = 1;
$pref::T2D::imageMapFixedMaxTextureError = 1;
$pref::T2D::imageMapFixedMaxTextureSize = 0;
$pref::T2D::imageMapShowPacking = 0;
$pref::T2D::imageMapPreloadDefault = true;
$pref::T2D::imageMapAllowUnloadDefault = false;
$pref::T2D::particleEngineQuantityScale = 1.0;
$pref::T2D::renderContactChange = 0.5;
$pref::T2D::renderContactMax = 16;
$pref::T2D::warnFileDeprecated = 1;
$pref::T2D::warnSceneOccupancy = 1;

///
/// Server
///
$pref::Server::Name = "TGB Server";
$pref::Player::Name = "TGB Player";
$pref::Server::port = 28000;
$pref::Server::MaxPlayers = 32;
$pref::Server::RegionMask = 2;
$pref::Net::RegionMask = 2;
$pref::Master0 = "2:master.garagegames.com:28002";

///
/// Video
///

$pref::ts::detailAdjust = 0.45;

$pref::Video::appliedPref = 0;
$pref::Video::disableVerticalSync = 1;
$pref::Video::monitorNum = 0;
$pref::Video::screenShotFormat = "PNG";

$pref::OpenGL::gammaCorrection = 0.5;
$pref::OpenGL::force16BitTexture = "0";
$pref::OpenGL::forcePalettedTexture = "0";
$pref::OpenGL::maxHardwareLights = 3;
$pref::VisibleDistanceMod = 1.0;


// Here is where we will do the video device stuff, so it overwrites the defaults
// First set the PCI device variables (yes AGP/PCI-E works too)
initDisplayDeviceInfo();

// Default to OpenGL
$pref::Video::displayDevice = "OpenGL";
$pref::Video::preferOpenGL = 1;

// But allow others
$pref::Video::allowOpenGL = 1;
$pref::Video::allowD3D = 1;

// And not full screen
$pref::Video::fullScreen = 1;

// This logic would better be in a kind of database file
switch$( $PCI_VEN )
{
   case "VEN_8086": // Intel
      $pref::Video::displayDevice = "D3D";
      $pref::Video::allowOpenGL = 0;
      
      // Force fullscreen on the 810E and 815G
      if( $PCI_DEV $= "DEV_1132" || $PCI_DEV $= "DEV_7125" )
         $pref::Video::fullScreen = "1";
         
   case "VEN_1039": // SIS
      $pref::Video::allowOpenGL = 0;
      $pref::Video::displayDevice = "D3D";
      
   case "VEN_1106": // VIA
      $pref::Video::allowOpenGL = 0;
      $pref::Video::displayDevice = "D3D";
      
   case "VEN_5333": // S3
      $pref::Video::allowOpenGL = 0;
      $pref::Video::displayDevice = "D3D";
      
   case "VEN_1002": // ATI
      $pref::Video::displayDevice = "OpenGL";
      
      if( $PCI_DEV $= "DEV_5446" ) // Rage 128 Pro
      {
         $pref::Video::displayDevice = "D3D";
         $pref::Video::allowOpenGL = 0;
      }
         
   case "VEN_10DE": // NVIDIA
      $pref::Video::displayDevice = "OpenGL";
}

echo( "\nUsing " @  $pref::Video::displayDevice @ " rendering. Fullscreen: " @ $pref::Video::fullScreen @ "\n");
#4
04/16/2009 (12:12 pm)
I guess I should have been more specific, I understand the confusion with that. Look at the common/commonConfig file.
#5
04/16/2009 (12:36 pm)
Ok Jason with out using lyit-2's method ( Which worked but sluggishly), here is the content of my commonConfig.xml file, I changed the fullscrreen entry from false to true and still the same. This is after changing the fullscreen option in default preferences files back to 0 also.

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<TorqueGameConfiguration>
   <Company>Independent</Company>
   <GameName>UntitledGame</GameName>
   <Resolution>800 600 32</Resolution>
   <FullScreen>true</FullScreen>
   <CommonVer>114</CommonVer>
   <ConsoleKey>tilde</ConsoleKey>
   <ScreenShotKey>ctrl p</ScreenShotKey>
   <FullscreenKey>alt enter</FullscreenKey>
   <UsesNetwork>0</UsesNetwork>
   <UsesAudio>1</UsesAudio>
   <DefaultScene>~/data/levels/myscene.t2d</DefaultScene>
</TorqueGameConfiguration>

#7
04/16/2009 (1:24 pm)
OK here is what I have came up with so far, If I try to edit the commonConfig.xml it doesn't stick. If I change it to true then save it, it reverts back to false making the program run in windowed mode instead of fullscreen. The reson I know this is because, after I save the xml file then run the program, check the .xml file again it is syaying fullscreen "false", instead of "true". So it is something in the code that making it stick or saving it under true really isn't doing nothing. I even changed the fullscreen option to 1 in the preferences file, checked and it is still set at false reverting it back to windowed mode.
#8
04/16/2009 (3:15 pm)
I am really trying to like this engine, but something as simple as making a screen go from starting in windowed mode to fullscrren mode should not be this complicated. Thanks lyit-2 for your input and Jason. There should be a much simpler way to do this. I mean I own TX 2.0 Pro and all I have to do is go to the xml file and change the value from false to true. I thought that was all, to be needed in this engine, but after working with this for most of the day this is not true. I have read others in the community having the same problem. I think a member of the GG staff should address this. Just really frustrated right now and still nothing accomplished. The demo games don't even start in full screen mode.