Game Development Community

How to add new level? Help....

by Venard Palms · in Torque Game Builder · 03/03/2010 (12:05 am) · 10 replies

good day!

hello, i'm venard. i'm looking for someone who could help me in my project. as of now i'm using the torque game builder and this is my first time to use this tool game builder. i could not find or get the answer on how could i put levels on my project game. it seems to be difficult to put on the codes. yes, i already did search on the net tutorials but still i cant do it.

will someone help me? pls... this would be my final project this sem. i am loosing time now.

i'm hoping for a positive response. thank you.


venard


#1
03/03/2010 (12:29 am)
Is it just me, or is there a lot of people using TGB for their senior projects or college projects who seems to have never used the engine before?

Not to pick on you, but depending upon what you're trying to do, it'll take more than a 2 weeks to learn the engine and create a little project.

If you check out tdn.garagegames.com/wiki/TGB/Tutorials_and_Guides, you'll find a guide on changing levels.

If you're trying to create a new level, just use "File -> New Scene" in the Builder.
#2
03/11/2010 (10:46 pm)
Good day...
Thanks a lot Mr. Sims...
Will you still help me if i have still a prob? I hope so...
Tnx...

palms_1.0
#3
03/12/2010 (4:46 am)
I'll help anytime I can!

I'm just saying that if you have a project due in 2 months and you don't know TGB yet, expect some long hours.

Good luck!
#4
03/12/2010 (6:02 pm)
huhuhu...

If I needed a long time to do this project, I should started it earlier. Toinkz!... I only have two weeks 2 finish this project..

Thanks a lot..
#5
03/14/2010 (6:20 am)
good day...

Mr. Sims,

Thank you for giving the resource website in my prob, but unfortunately I couldn't find the codes. I'm looking for it, why can't you give it to me if you have? Please... Can you give me the code... I really needed it. Well, I already spent a lot of money in searching... and knowing, I have no more allowance... I will really appreciate and include you in my documentation as a resource person... Thank You...

Hoping for an affirmative response...

palm's_1.0
#6
03/14/2010 (7:52 am)
Are you trying to create a new level? If so, then it is as William mentioned before. In the level builder, go to the File menu and choose New Scene. Level and Scene are two words that basically refer to the same thing in TGB. When you save the scene you will be asked to give it a name. Levels are typically saved in your project folder under game/data/levels.

If you are looking to change between levels then here is a example using a button press:

function GenericButton::onMouseDown(%this, %modifier, %worldPos)
{
   schedule(100, 0, "nextLevel");
}

Key here is to use the schedule command to call a new level, otherwise TGB would crash if you directly called the nextLevel function from the button object.

function nextLevel()
{ 
   %level = "game/data/levels/level2.t2d";
   
   if (isFile(%level))
   {
      sceneWindow2D.loadLevel(%level);
   }
}

This function then loads the file named level2.t2d. Just change level2 in the script to whatever name you gave your level file.
#7
03/15/2010 (3:38 am)
gud day!

Mr. Lilligreen,

Thank you for your help. I will try it when I get home. Hope it will work. I should try to search more tutorials.

For a while, can i ask for something? How about putting my first interface in fading as an entrance of my game before the user/player can play it? Hmmm... could torque do this event... Thank you....

palm's_1.0
#8
03/16/2010 (11:47 am)
tk-games.com/16/tgb-level-loader/

this is what i use. it works really well.
#9
03/17/2010 (1:02 am)
good day!

Mr. Castagna,

thank you for your help. i will surely try it... thanks a lot.....



palm's_1.0
#10
04/10/2010 (12:08 am)
good day!

yehey! i'm through with my project.... yepeey! o well, i guess i shuld be thankfull... thank you guys... for those who help me.... god bless...

palm's_1.0