Feedback on an a more intuitive directory structure wanted
by Michael Hall · in Torque 3D Beginner · 02/18/2013 (12:15 pm) · 6 replies
As some of you may know, I've been modifying the template offerings in MIT T3D in effort to make them easier to use and to maintain -- hopefully for the next release. I'm not going to go into any details here, but simply want to pose a question: based upon this organizational approach does this directory structure appear intuitive and obvious as to subdirectory usage? Or is it too much of a separation?

Don't let the name "FPS Template" mislead you, this is not a FPS Tutorial based project. The Steering Committee has no direct way of updating the FPS Tutorial so we are not wanting to introduce changes to it beyond that of the obvious Toolbox vs Project Manager confusion.

Don't let the name "FPS Template" mislead you, this is not a FPS Tutorial based project. The Steering Committee has no direct way of updating the FPS Tutorial so we are not wanting to introduce changes to it beyond that of the obvious Toolbox vs Project Manager confusion.
About the author
Been dabbling with game-programming since the age of 10 when I got my first computer, a Commodore. Got serious about game-development after modding Tribes for several years. Doesn't sleep much. Drinks rum. Teaches guitar. Plays cello.
#2
02/18/2013 (1:40 pm)
/sys is a combination of the client data and scripts needed to get the client's machine initialized. Subsystems such as audio, gfx, postfx, lighting, etc., that do not deal with gameplay. We want to keep this separate from actual game specific scripts. Hopefully this directory shouldn't have to be touched by anyone when they make their game -- except for fixes and improvements.
#3
02/18/2013 (5:25 pm)
Yeah, I think "sys" should have it's own folder rather than being stuck inside any of the data/scripts directories.
#4
common
client
server.
for developer side, it will have another folder "tools".
my target was complete separation of client and server side code.
if i need to send a client only pack then common and client folder is the only thing to pack.
" Or is it too much of a separation?"
obviously for my design answer would be "yes".
but for your folder structure it is certainly not.
02/18/2013 (6:35 pm)
i was building my own template structure and it contains only 3 folder:common
client
server.
for developer side, it will have another folder "tools".
my target was complete separation of client and server side code.
if i need to send a client only pack then common and client folder is the only thing to pack.
" Or is it too much of a separation?"
obviously for my design answer would be "yes".
but for your folder structure it is certainly not.
#5
I came up with a directory structure more or less exactly the same after an attempt to identify the bare bone/essential elements required to launch a stripped down client. I think the separation is logical and makes these elements more obvious.
Instead of sys & user, I used %APPDATA% which is more implementation specific, but the concept is the same. Other than that I also used client & server as opposed to "scripts" - but that's 6 in one, half dozen in the other as well. Game play related scripts live for me under a separate location in the server directory. I'm assuming you're looking to do something similar?
J
02/18/2013 (9:22 pm)
Quote:
Or is it too much of a separation
I came up with a directory structure more or less exactly the same after an attempt to identify the bare bone/essential elements required to launch a stripped down client. I think the separation is logical and makes these elements more obvious.
Instead of sys & user, I used %APPDATA% which is more implementation specific, but the concept is the same. Other than that I also used client & server as opposed to "scripts" - but that's 6 in one, half dozen in the other as well. Game play related scripts live for me under a separate location in the server directory. I'm assuming you're looking to do something similar?
J
#6
The /user/ folder (assuming it's for storing prefs/config files) is probably fine for development but the community needs to add support for saving/loading preferences from the appropriate folder (/AppData/ in Windows and Library/Preferences/ (?) in MacOS). The days of being able to load/save stuff to the app's folder and have it work across systems are long gone.
/tools/ needs to be entirely self-contained so that with a single line change to main.cs the editors can be added/removed from a project.
/scripts/ should still contain /client/ and /server/ folders to emphasize the internal separation the engine uses.
/sys/ makes sense provided it's as barebones as it can get. I brought this up in one of the threads a few weeks ago. Currently the /core/ directory contains an enormous amount of bloat, support files for the editors (which should all be in /tools/), etc. /sys/ should contain just enough to create the window, initialize shaders/lighting/audio/etc. subsystems and provide console support.
02/19/2013 (9:46 pm)
That setup looks fine to me. There's probably a case to be made for moving datablocks and/or gui into /scripts but having everything cleanly separated will make the transition to T3D easier for new users.The /user/ folder (assuming it's for storing prefs/config files) is probably fine for development but the community needs to add support for saving/loading preferences from the appropriate folder (/AppData/ in Windows and Library/Preferences/ (?) in MacOS). The days of being able to load/save stuff to the app's folder and have it work across systems are long gone.
/tools/ needs to be entirely self-contained so that with a single line change to main.cs the editors can be added/removed from a project.
/scripts/ should still contain /client/ and /server/ folders to emphasize the internal separation the engine uses.
/sys/ makes sense provided it's as barebones as it can get. I brought this up in one of the threads a few weeks ago. Currently the /core/ directory contains an enormous amount of bloat, support files for the editors (which should all be in /tools/), etc. /sys/ should contain just enough to create the window, initialize shaders/lighting/audio/etc. subsystems and provide console support.
Torque Owner Demolishun
DemolishunConsulting Rocks!
If "sys" is platform/profile type stuff it might be better as a sub under scripts.
I think datablocks would be better as a sub under scripts as well. They are mainly there to support the scripts anyway. I never understood why they were in art to begin with.
Of course if the scripting is simplified anyway, having more root level directories is not a big deal. We will work around whatever structure you come up with. The only thing it makes difficult zipping these up. If there was a simple way to zip them all into one single root directory for shipping that would be really nice. I don't know if there is a transparent way to do this though. Some directories may need to be written to and one monolithic zip location makes that a pain.