Game Development Community

Game window graphics glitch while game loading.....

by Raja John · in Torque Game Builder · 12/10/2008 (12:00 am) · 4 replies

Hi everyone..

im done my game project in TGB Pro 1.7.4. While loading my game, game screen GLITCH for few seconds, after that splash screen is load.

im working on Windows XP with

1 GB Ram
ATI Graphics card

Thanks.

#1
12/10/2008 (10:34 pm)
Do you mind been more clear of what kinda glitch you get?...
#2
12/11/2008 (4:33 am)
Thank you Ehrlichmann.....


Whenever I am starting the game , an unwanted screen is appeared (i.e) a screen with tiles of images that previously used is appeared in a disorder way, it holds only for few seconds, but it should not be happen in a standard game. I don't know where the problem is.... fix me the problem if you know. I've attached the image link for your reference



e.imagehost.org/0569/error_copy_copy.jpg
#3
12/11/2008 (11:23 pm)
It happens because default engine is initializing Canvas without any content set and then starts loading assets. It may took some time and in mean time there is nothing to show in the window.

You can set up any image you want (maybe logo, maybe one-pixel image) just after Canvas initialization (somewhere in ~/common/ scripts).
#4
12/12/2008 (1:06 am)
Thanks. But, where can i put the function?

in ~/common/gamescripts/canvas.cs?
$canvasCreated = false;
function initializeCanvas(%windowName)
{
   // Don't duplicate the canvas.
   if($canvasCreated)
   {	
      error("Cannot instantiate more than one canvas!");
      return;
   }
   
   videoSetGammaCorrection($pref::OpenGL::gammaCorrection);
   
   if (!createCanvas(%windowName))
   {
      error("Canvas creation failed. Shutting down.");
      quit();
   }

thanks again