Use extra scene for templates
by AIDan · in Torque X 3D · 05/19/2009 (4:50 am) · 6 replies
Is it possible two put all templates in an extra scene and load that as well?
Is it possible to let a template inherit from another one?
Another question also, can I use the Persistent flag for that so I simply load all the template scenes one after another before loading the actual level?
Is it possible to let a template inherit from another one?
Another question also, can I use the Persistent flag for that so I simply load all the template scenes one after another before loading the actual level?
About the author
#2
John K.
www.envygames.com
05/21/2009 (11:28 am)
The editor will only load one scene at a time. It would be nice to have the editor to clearly mark template objects so they can be distinguished from normal game objects. John K.
www.envygames.com
#3
List<string> levelsToLoad= new List<string>();
levelsToLoad.Add("_base"); // player camera, object types, rigid manager, etc.
levelsToLoad.Add("_materials"); // the materials used by objects
levelsToLoad.Add("_weapons"); // the weapon templates
levelsToLoad.Add("sector01"); // the actual map with the sky, sun and level objects
_gameManager.StartGame(SceneLoader, levelsToLoad.AsReadOnly());
I don't think that the editor must be able to edit all levels at the same time but at least it should be able to load them so it has all the stuff available. The problem here is the mixture of data files and actual levels.
05/21/2009 (11:35 am)
The problem that I see is when you want to use the same templates in multple levels. Here is the way I treat it at the moment:List<string> levelsToLoad= new List<string>();
levelsToLoad.Add("_base"); // player camera, object types, rigid manager, etc.
levelsToLoad.Add("_materials"); // the materials used by objects
levelsToLoad.Add("_weapons"); // the weapon templates
levelsToLoad.Add("sector01"); // the actual map with the sky, sun and level objects
_gameManager.StartGame(SceneLoader, levelsToLoad.AsReadOnly());
I don't think that the editor must be able to edit all levels at the same time but at least it should be able to load them so it has all the stuff available. The problem here is the mixture of data files and actual levels.
#4
John K.
www.envygames.com
05/21/2009 (1:39 pm)
So you would edit one level at a time, right? Not necessarily load all levels at once and have a drop list of which scene is currently being edited. I see the problem. The editor tries to be helpful and make sure that each saved level has a camera attached to it. This is not a good thing when you want multiple levels composited together. John K.
www.envygames.com
#5
Or maybe you split them into txscene and txdata files. Then the editor handles them separately. Only the txscene can be edited in the viewport, but you edit objects from the data files using the assets browser. Maybe it even groups them directly depending on which file they are from.
I just think that a solution for this problem is needed. It is too much work to maintain all copies of the same objects in all maps all the time. You will get errors because in one level the object was up-to-date in the other it was not.
05/21/2009 (1:47 pm)
Maybe a solution would be to be able to state references in a level. You only load one level and have only one you edit. All levels referenced will be loaded but cannot be edited.Or maybe you split them into txscene and txdata files. Then the editor handles them separately. Only the txscene can be edited in the viewport, but you edit objects from the data files using the assets browser. Maybe it even groups them directly depending on which file they are from.
I just think that a solution for this problem is needed. It is too much work to maintain all copies of the same objects in all maps all the time. You will get errors because in one level the object was up-to-date in the other it was not.
#6
05/21/2009 (5:00 pm)
If you get the editor when you purchase a source license for TX3D, why don't you get the source to it too?
Torque Owner AIDan
But of course all this is useless if the editor will not support it...