Quick questions
by Charlie Malbaurn · in Torque Game Builder · 03/11/2005 (6:40 pm) · 13 replies
Hey all,
I have 3 quick questions.
1) does T2d follow the same class hierarchy as torque? In other words are there any classes that can derive members and methods from classes higher in the hiearchy?
2) is there any other way to do exec() in t2d? I saw in kens book where he used a function or something to load all script files from one directory? are those the only 2 ways to do it? or is there more, or less in T2D.
3) I haven't had the chance to read the source code. Can anyone tell me if you can make doxygen documents from it? I really want to see if T2D took anything from TGE besides sound and gui.
I ask because I'm at work and trying to figure something out in my head so I can hit it when I get home. I don't have any of the docs in front of me
Edit: added question 3
I have 3 quick questions.
1) does T2d follow the same class hierarchy as torque? In other words are there any classes that can derive members and methods from classes higher in the hiearchy?
2) is there any other way to do exec() in t2d? I saw in kens book where he used a function or something to load all script files from one directory? are those the only 2 ways to do it? or is there more, or less in T2D.
3) I haven't had the chance to read the source code. Can anyone tell me if you can make doxygen documents from it? I really want to see if T2D took anything from TGE besides sound and gui.
I ask because I'm at work and trying to figure something out in my head so I can hit it when I get home. I don't have any of the docs in front of me
Edit: added question 3
About the author
#2
I'm pretty sure they removed much more than sound and gui. TGE and T2D are 2 seperate products, each requiring a license. So my guess is they removed most of the TGE functionality that was specific to it (and served no real purpose on a 2D platform). This would be to prevent anyone from getting both engines for the price of one.
Again, just a guess.
EDIT: I just realised that you actual question had more to do with Doxygen than with T2D functionality.
<.<
>.>
O well. I tried. =)
03/11/2005 (8:32 pm)
I don't know for a fact, but I think I can answer #3. I may be way off with this answer.I'm pretty sure they removed much more than sound and gui. TGE and T2D are 2 seperate products, each requiring a license. So my guess is they removed most of the TGE functionality that was specific to it (and served no real purpose on a 2D platform). This would be to prevent anyone from getting both engines for the price of one.
Again, just a guess.
EDIT: I just realised that you actual question had more to do with Doxygen than with T2D functionality.
<.<
>.>
O well. I tried. =)
#3
Jeremy:
I think that classes can only call the methods and properties from the classes above them. not each class related to the parent. But I may be wrong
03/11/2005 (9:44 pm)
Yeah phillip and I said the 2 things that where not removed where gui and sound ; )Jeremy:
I think that classes can only call the methods and properties from the classes above them. not each class related to the parent. But I may be wrong
#4
03/11/2005 (10:26 pm)
Ohhh, you mean siblings calling eachother's functions? TGE did that?
#5
At least i know that there is only one base class above all the other classes and that will I need to do a little easier.
I'll look into the doxygen thing when I get home
03/11/2005 (11:19 pm)
Blah. No it didn't. I thought you where saying that it did. Nevermind lol.At least i know that there is only one base class above all the other classes and that will I need to do a little easier.
I'll look into the doxygen thing when I get home
#6
I don't know the implementation technique GG decided to use in the new component system, but you will probably be seeing a lot more encapsulated functionality grouped by logical use instead of strict inheritence when that comes down the pike.
03/11/2005 (11:19 pm)
There are a few (very few, IIRC) instances of friended methods in TGE, but it's not common at all.I don't know the implementation technique GG decided to use in the new component system, but you will probably be seeing a lot more encapsulated functionality grouped by logical use instead of strict inheritence when that comes down the pike.
#7
Basically all objects inherit from FxSceneObject2d and that only except fxParticleEmitter2d whos parent is fxParticleEffect2d whos parent is fxsceneobject2d. AS is:
fxParticleEmitter2d -> fxParticleEffect2d->FxSceneObject2d
So basically that means that fxParticleEmitter2d has all the effects of itself along with fxParticleEffect2d and those of FxSceneObject2d If I am not mistaken
Thats for anyone who really cares.
That leaves 2 and 3. 3 not being really important while 2 is very important :)
03/11/2005 (11:34 pm)
Well I answered question one. I forgot I had printed the docs.Basically all objects inherit from FxSceneObject2d and that only except fxParticleEmitter2d whos parent is fxParticleEffect2d whos parent is fxsceneobject2d. AS is:
fxParticleEmitter2d -> fxParticleEffect2d->FxSceneObject2d
So basically that means that fxParticleEmitter2d has all the effects of itself along with fxParticleEffect2d and those of FxSceneObject2d If I am not mistaken
Thats for anyone who really cares.
That leaves 2 and 3. 3 not being really important while 2 is very important :)
#8
exec() is the way you execute a script... is there some specific functionality you're looking for? Your question doesn't give enough information to know how to answer the question.
And yes you can run doxygen on the T2D source.
03/11/2005 (11:56 pm)
I'm not sure what you mean in question 2.exec() is the way you execute a script... is there some specific functionality you're looking for? Your question doesn't give enough information to know how to answer the question.
And yes you can run doxygen on the T2D source.
#9
The program that I am writing will make a treeview control of all the .cs scripts in the order they are executed in script from main.cs down.
Now the most common way I see to execute scripts is the exec() function. In kens book I could have sworn that he used some other method of calling all of the scripts in one certain directory, but I cannot find the book to find out.
The reason I need to know this is that in order for it to work properly, I need to condition for scripts being executed in other ways besides exec(). That is, if there is another way.
Also, I need to know if the program runs anything other then main.cs first.
03/12/2005 (12:08 am)
Ok, I wrote that in a hurry. The program that I am writing will make a treeview control of all the .cs scripts in the order they are executed in script from main.cs down.
Now the most common way I see to execute scripts is the exec() function. In kens book I could have sworn that he used some other method of calling all of the scripts in one certain directory, but I cannot find the book to find out.
The reason I need to know this is that in order for it to work properly, I need to condition for scripts being executed in other ways besides exec(). That is, if there is another way.
Also, I need to know if the program runs anything other then main.cs first.
#10
03/12/2005 (12:38 am)
Exec is pretty much it. There is a "compile()" function. But it just runs the script compiler on the script file, it doesn't execute it afterwards.
#11
Take a look in examples\T2D\main.cs and check the frst line of code :)
03/12/2005 (12:42 am)
You're looking for the LoadDir("diname"); function, and yes, T2D has it.Take a look in examples\T2D\main.cs and check the frst line of code :)
#12
one other question for you if you have the time.
I created the engine docs for T2d But to do so, I had to grab the overview.txt file from the TGE sdk along with the cfg files etc from the TGE sdk files.
Do you think it would be a problem to zip up the files doxygen needs to use for people who want to compile the files but don't have a TGE licience?
Or should I email GG first?
03/12/2005 (12:42 am)
Thanks harold. That saves me some time since I had already did the Exec part.one other question for you if you have the time.
I created the engine docs for T2d But to do so, I had to grab the overview.txt file from the TGE sdk along with the cfg files etc from the TGE sdk files.
Do you think it would be a problem to zip up the files doxygen needs to use for people who want to compile the files but don't have a TGE licience?
Or should I email GG first?
#13
03/12/2005 (12:45 am)
Thanks philip, That wont be to hard to look for.
Torque Owner Jeremy Tilton
All objects in t2d are derived from a single object. So all tiles, animations, particle effects, etc can call the same functions because they all share that object's methods to include collision info mounting points, physics info, visibility, etc etc.