Reuse most of the level?
by Christopher Ellis · in Torque Game Builder · 05/11/2010 (11:08 pm) · 3 replies
I'm making a game where there's basically a frame around the level which I will use in each level, and only the area inside the frame will change. On the frame I have things that use behaviors like lives, health, score, menus, etc.
Is there any way for me to create the frame so that I make it once and use it for all levels? I'd like to do it in such a way that I can make a template, and when that template changes the change shows up in all of the levels.
Is this possible, or do I just have to make a template level as a base for each new level, and make any changes manually to all the levels?
Thanks in advance.
-Christopher Ellis
Is there any way for me to create the frame so that I make it once and use it for all levels? I'd like to do it in such a way that I can make a template, and when that template changes the change shows up in all of the levels.
Is this possible, or do I just have to make a template level as a base for each new level, and make any changes manually to all the levels?
Thanks in advance.
-Christopher Ellis
#2
05/12/2010 (6:54 am)
This is a lot of work, but if you reconstruct your frame in script then it becomes reusable wherever you want. You simply call your "buildFrame" function at the start of each new level. And it can change on the fly based on dynamic conditions you set throughout the game.
#3
Tile layers are saved out in files, so making a change to the base file will affect all instances of it.
Your Guis also save out in files and can be re-used a lot.
Your behaviors are saved together and will apply the same across levels.
I'm not sure what the problem is - pretty much everything already works the way you want it to.
05/12/2010 (9:56 am)
Well, you can always save and re-use the tile layers you create in your base level. Then just place them in the same spot when you change levels.Tile layers are saved out in files, so making a change to the base file will affect all instances of it.
Your Guis also save out in files and can be re-used a lot.
Your behaviors are saved together and will apply the same across levels.
I'm not sure what the problem is - pretty much everything already works the way you want it to.
Torque Owner Shaderman