Game Development Community

White screen Problem.

by Keegan Gibson · in iTorque 2D · 10/20/2010 (10:52 pm) · 6 replies

Hello,

We do all our developing on windows and bring the build across to the mac to test on the devices.

The game runs fine in the windows environment however on the simulator and devices it just displays a blank white screen.

Had a bit of a look around of the forums and from what i could tell this can be caused by incorrect resolution settings.

The game runs in portrait.

Here is the XML
TorqueGameConfiguration>
   <CommonVer>114</CommonVer>
   <Company>NDA</Company>
   <GameName>NDA</GameName>
   <Resolution>320 480 32</Resolution>
   <FullScreen>1</FullScreen>
   <UsesAudio>1</UsesAudio>
   <DefaultScene>~/data/levels/emptyLevel.t2d</DefaultScene>
</TorqueGameConfiguration>
<iDeviceSettings>
   <iDeviceType>0</iDeviceType>
   <iDeviceScreenOrientation>1</iDeviceScreenOrientation>
   <iDeviceScreenResolution>1</iDeviceScreenResolution>
   <iFeatureUseStoreKit>0</iFeatureUseStoreKit>
   <iFeatureUseNetwork>1</iFeatureUseNetwork>
   <iFeatureUseGameKit>0</iFeatureUseGameKit>
   <iFeatureUseMusic>0</iFeatureUseMusic>
   <iFeatureUseLocation>0</iFeatureUseLocation>
   <iFeatureUseMultitouch>1</iFeatureUseMultitouch>
   <iFeatureUseMoviePlayer></iFeatureUseMoviePlayer>
   <iFeatureUseAutoRotate>0</iFeatureUseAutoRotate>
   <iFeatureUseOrientation>0</iFeatureUseOrientation>
   <iFeatureStatusBarType>0</iFeatureStatusBarType>
</iDeviceSettings>

//-----------------------------------------------------------------------------
// 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;

// Audio profiles for default
$pref::Audio::sfxVolume = 0.8;
$pref::Audio::musicVolume = 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;

//platform
if( $platform $= "iphone" ) 
{
   $Project::Game::CompanyName         = "NDA";
   $Project::Game::ProductName         = "NDA";
   $Project::Game::Resolution          = "320 480 32";
   $Project::Game::FullScreen          = 1;
   $Project::Game::UsesAudio           = 1;
   $Project::Game::DefaultScene        = "~/data/levels/emptyLevel.t2d";
   
   //set default iDevice settings.
   
   $pref::iDevice::DeviceType          = $iDevice::constant::iPhone;
   $pref::iDevice::ScreenOrientation   = $iDevice::constant::Portrait;
   $pref::iDevice::ScreenResolution    = $iDevice::constant::ResolutionSmall;
   $pref::iDevice::ScreenDepth		   = 32;
   
   //Turn all features off by default
   
   $pref::iDevice::UseGameKit          = 0;
   $pref::iDevice::UseLocation         = 0;
   $pref::iDevice::UseMultitouch       = 1;
   $pref::iDevice::UseMusic            = 0;
   $pref::iDevice::UseNetwork          = 1;
   $pref::iDevice::UseStoreKit         = 0;
   $pref::iDevice::UseMoviePlayer      = 0;
   $pref::iDevice::UseAutoRotate       = 0;   
   $pref::iDevice::UseOrientation      = 0;   
   $pref::iDevice::StatusBarType       = 0;
}

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

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

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

echo( "\nUsing " @  $pref::Video::displayDevice @ " rendering. Fullscreen: " @ $pref::Video::fullScreen @ "\n");

Any ideas? Have other iT2D projects running on these devices perfectly fine.

The only thing from the logs that i could see might be causing the problem.
Loaded Compiled Script gui/profiles.cs Took 0 MS
Failed to load profile bitmap ()
Failed to load profile bitmap ()
then it continues to load in the gui stuff.

Thanks.

#1
10/22/2010 (4:40 pm)
I know that I have seen this in the past and it is usually due to an incorrect resolution or something not being added to the bundle correctly.

FuzzYspo0N explains several options here. Have you made sure that everything is being added to the bundle in XCode's console when it runs?
#2
10/23/2010 (5:55 am)
I think i have set everything correctly. Cant see anything other then the networking scripts that are missing. I'm assuming i don't need these as i'm not using the torque networking stuff.

Still having trouble with the white screen will post the log.

Log.
pastebin.com/7qtmfUGx

The xml file and the default prefs file resolution seem to be setup correctly.
#3
10/23/2010 (7:32 am)
camera / resolution on the scene graph is setup correctly too?
#4
10/23/2010 (7:37 am)
In the torque game builder these are my settings.

Camera X: 160.0
Camera Y: 240.0
// Makes the camera have its origin in the top left.

Width : 320.0
Height : 480.0

Design Res X :320
Y : 480

Keegan,
#5
10/25/2010 (12:24 am)
Resolved!

Thanks for everyone who helped with with this. Including Donald. Much appreciated.

Turns out the problem was due to me accidentally commenting out the line in TGBAppDelegate called _RuniPhoneInnerGameLoop()

My bad.

Thanks again to everyone, much appreciated.
#6
10/25/2010 (4:37 pm)
Good to see you truckin' through it.