Game Development Community

Torque 3D Game Structure

by Jon Ray · in Torque 3D Beginner · 01/19/2010 (2:23 am) · 6 replies

Last time I messed with Torque it was TGE. Now I have Torque 3D and have gone through all the editor and scripting information in the Documentation. I'm armed here with Kenneth Finney's "3D Game Programming All In One 2ed." book and trying to figure out what went where so I can relearn this engine, it's been awhile.

Is there a place I missed where the Torque 3D Game Structure is listed? Maybe a brief on what the main purpose of the file is and what calls what on bootup?

Old setup:
[game root]->control->data/scripts
[game root]->common
tge.exe

New setup:
[game root]->art
[game root]->core
[game root]->levels
[game root]->scripts
[game root]->shaders
[game root]->tools
[game root]->web
GameApp.exe

I'm basically looking for a tabulated version of these expanded down the tree to show what goes where under Torque 3D. I know that GameApp.exe is in the game root folder and calls main.cs in the same folder as the root main module. From there.. *begins to scratch head*



#1
01/19/2010 (3:26 am)
The two folders that really matter here are core/ and scripts/.

core/ basically is the core script framework used by the engine. Generally, this should be left alone and updated from the Torque SDK between releases. It's a bit like what common/ was, but much slimmer.

scripts/ builds on this framework on contains anything that is specific to the game you are building. This is the folder that you should do all you custom scripting in. Feel free to completely mess around here and move/remove/change/add stuff.

tools/ is just that, the script-side parts of the Torque editors bundled up in their own directory hierarchy so they can be easily removed.

The rest is mainly about assets. art/ contains shapes, datablocks, etc. levels/ contains .mis files and their associated binary files (decals, for example). shaders/ contains the procedural as well as hand-written shaders.

BTW, you'll also find the same separation between client and server scripts in core/ and scripts/ that you're probably already accustomed to from TGE.
#2
01/19/2010 (11:00 pm)
Thanks Rene, this along with Chapters 4 - 7 are really helping me make head way here.
#3
01/20/2010 (2:33 am)
I can see that scripts/server/ has a player.cs but not the old server.cs that should have %this.createPlayer(); and %player = new Player(){...};

Can anyone point me to the default location for

%this.createPlayer(); and %player = new Player(){...};

#4
01/23/2010 (12:51 am)
I have Torsion and I found the nifty little Code Browser Tab, however, even with this tool I'm not able to find this information of a Project with a Full Template. It may be named something different? But basically I'm looking for the path/filename that holds the function where the Player is created.
#5
01/23/2010 (3:37 am)
its not in gamecore.cs? I don't have the scripts in front of me right now.
#6
01/23/2010 (4:05 am)
I think you may be right. Thanks for the info. I found it at /scripts/server/gameCore.cs. I'm both relearning the engine from a few years ago and trying to catch up on the new T3D.