Game Development Community

selecting default scene

by rennie moffat · in iTorque 2D · 06/16/2010 (6:40 pm) · 6 replies

Hi,
In TGB I was able to choose which scene is loaded after the splash by using the following in the main.cs

function initializeProject()
$defaultScene = "game/data/levels/loadingScreen.t2d";

However I can not see where this should go in iTGB main.cs



Currently, in a new project, when I run my game it goes to an all black screen. How and where do I determine my $defaultScene?

About the author

My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.


#1
06/17/2010 (1:27 am)
Rennie, take a look at this thread where I posted my splash startup code - you will see where that variable gets set:

www.torquepowered.com/community/forums/viewthread/114477
#2
06/17/2010 (7:33 am)
ok, it's just that the initialise project is much different in this case (as far as I can tell.

it does not appear as...

function initialise project()
{
}


////but as....

_initializeProject();

// Startup the project
initializeProject();

I am unsure as to how to plug in the info.





#4
06/17/2010 (9:16 am)
ok, will give it a shot. Forgive me I am just uneasy about changing anything that comes native. But I will trust you. Thanks.


Also tho I had replaced it earlier, simply replacing the whole main.cs from tgb to the itgb. But perhaps just treat...

initializeProject();

as
function initializePorject()
{
}

see that is where I am iffy. I am doing so many things in prep right now, so I have not gotten to this yet, but your help is appreciated.

Thanks.

#5
06/19/2010 (8:10 am)
Also,
in the main.cs this line exists. With out touching anything it takes you to emptyLevel.cs

My question is, how do I make this line of code take me to level38AlphaBeta.cs

:??




startGame( expandFilename($Project::Game::DefaultScene) );
#6
06/19/2010 (9:20 am)
just a side note, since this loaded "emptyLevel.t2d" I changed my desired level (to load first) to emptyLevel.t2d thinking that would load my first level and then I could follow along in my previously made game structure. However all i get now is a black screen.