Game Development Community

Game Loading

by Bruno · in Torque Game Builder · 05/15/2007 (2:00 pm) · 4 replies

Hi,

The situation is the following.
All my game was made inside the Editor, so all my resources are inside a common file.
The problem is that the game takes a while to boot, like 7 or 8 seconds where the screen is all black.
I already disabled the "preload" in all textures, but it has no effect at all (is this even working ??)
I would like to show a image, while this is all black, saying "please wait" or "game loading", however any texture that i load into the game, is loaded trough the LoadLevel function in the script, and as long as this function is not called, i can't display anything.

Is there a way to load a single texture to display it before the game scenegraph is created\loaded ?

thanks,
Bruno

#1
05/16/2007 (6:22 am)
You can load a fake "game is loading" image before you call loadStartupProject(); so that users know that something is happening during the blackout. This is what I do in my shipping game.

I use a GuiFadeinBitmapCtrl for the fake "game is loading" screen; and then:

function pleaseWaitSplash()
{
	canvas.setContent( loadingScreenGui );
	schedule( 100, 0, checkPleaseWaitSplash );
}

function checkPleaseWaitSplash()
{
if ( loadingScreenGui.done )  
	{
	loadStartupProject();
	}
else schedule( 100, 0, checkPleaseWaitSplash );
}

While this certainly lacks the elegance of a true 'game is loading' progress bar, which is something I wish the good people at GGs would add to the engine; at least it's something.
#2
05/16/2007 (8:24 am)
But, how can you do that ?
a Scenegraph is only created when you call loadStartupProject ??
Everything you draw before that, should not be rendered at all.
Can you post the code you use, to load the image inside loadingScreenGui ??
#3
05/16/2007 (9:14 am)
I figure it out..., gui's are independent from the sceneGraph, so they can be loaded.
thanks ;)
#4
05/16/2007 (10:22 am)
I made a post a while ago about the same thing and got very good suggestions on how to create a loading screen. Check it out:

garagegames.com/mg/forums/result.thread.php?qt=59518