T2D Project Setup?
by Kneekick · in Torque Game Builder · 02/27/2006 (7:24 am) · 9 replies
I'm a little confused about the setup of T2D and how it launches a game.
I just went through the beginner's tutorial last night (very good by the way) and I'm ready to start playing around with some other stuff. In the tutorial it instructs you to copy everything under the T2D folder.
This can't be the way it works for every project can it? Does what you're currently working on have to be under the T2D folder?
What if I'm working on multiple projects? I am going to want each to have their own folder.
I found in the main.cs file at the T2D.exe level that there seems to be a line in there that tells it what folder to run? If this is correct then I guess I just need to change that line to whatever project I am working on at that time?
In other IDE's it just runs whatever project you have loaded at that time. I guess I'm a little spoiled, just trying to learn an new program & interface.
Thanks.
I just went through the beginner's tutorial last night (very good by the way) and I'm ready to start playing around with some other stuff. In the tutorial it instructs you to copy everything under the T2D folder.
This can't be the way it works for every project can it? Does what you're currently working on have to be under the T2D folder?
What if I'm working on multiple projects? I am going to want each to have their own folder.
I found in the main.cs file at the T2D.exe level that there seems to be a line in there that tells it what folder to run? If this is correct then I guess I just need to change that line to whatever project I am working on at that time?
In other IDE's it just runs whatever project you have loaded at that time. I guess I'm a little spoiled, just trying to learn an new program & interface.
Thanks.
About the author
#2
You can call t2d.exe with the -mod argument to specify which subdirectory to execute from. If you don't give this argument it will default to the t2d subdirectory.
In this way you can keep each of your precjects as subdirectories, at the same level as the executable, the common subdir and the different editors.
Hope this sheds some light on the matter.
02/27/2006 (7:33 am)
Hi,You can call t2d.exe with the -mod argument to specify which subdirectory to execute from. If you don't give this argument it will default to the t2d subdirectory.
In this way you can keep each of your precjects as subdirectories, at the same level as the executable, the common subdir and the different editors.
Hope this sheds some light on the matter.
#3
I think it all depends on how different your projects are. If you plan on changing the source code for one project that may not apply to a different project, then you should probably set each project up in a separate folder and copy the T2D source to that folder.
If you're not going to change source and you'll just be doing script work, then you can get away with creating folders inside the main T2D folder structure. Essentially, it's just a mod anyway.
All this is based on my interpretation of your question. Hope this helps.
-Tim
02/27/2006 (7:33 am)
Anthony,I think it all depends on how different your projects are. If you plan on changing the source code for one project that may not apply to a different project, then you should probably set each project up in a separate folder and copy the T2D source to that folder.
If you're not going to change source and you'll just be doing script work, then you can get away with creating folders inside the main T2D folder structure. Essentially, it's just a mod anyway.
All this is based on my interpretation of your question. Hope this helps.
-Tim
#4
02/27/2006 (7:42 am)
Tim is correct, unless you start changing anything in the common directory.
#5
Thanks everyone for your replies.
02/27/2006 (7:55 am)
This is exactly what I needed to know. I wanted to see how other's handle it.Thanks everyone for your replies.
#6
My personal vote has been for a "Project" tab in the level builder that lets you create a new project/select current project, and take care of the underpinnings for you, but I'm sure Justin is going to make it the way it needs to be!
02/27/2006 (10:48 pm)
TGB level editor is getting huge functionality adds as part of final dev and a workflow pass, and you can bet easier project management will get at least a kiss.My personal vote has been for a "Project" tab in the level builder that lets you create a new project/select current project, and take care of the underpinnings for you, but I'm sure Justin is going to make it the way it needs to be!
#7
Another question, say I'm creating a big game in T2D that doesn't make sense to have all of the code in the game.cs file. How do I break up code into different files and reference to them from the game.cs file?
02/28/2006 (7:36 am)
That would be awesome Stephen.Another question, say I'm creating a big game in T2D that doesn't make sense to have all of the code in the game.cs file. How do I break up code into different files and reference to them from the game.cs file?
#8
02/28/2006 (9:20 am)
In stock T2D, you initalize new script files through the initializeGame() function found in initalizeT2D.cs. Just stick an exec(path to new script file) in there. Some of the genre tutorials on TDN and the checkers tutorial in your docs folder give practical examples of doing that.
Torque Owner Kneekick