My Projects question on core vs scripts folder
by Zeph · in Torque 3D Beginner · 11/26/2012 (5:30 am) · 7 replies
I was reading over the documentation on the directory overview. I noticed that it stated:
"The core folder contains files that are commonly used by every Torque 3D project."
So I commented out//$Pref::Video::ProfilePath = "core/profile";
launched the game as a host, and ran a duplicate as a reg player having two running at the same time.. I played around on the level.. Seemed to both run fine..
My question is is the core/profile really needed to design your game? Im asking because it ran without it in the main include with no problems... Or, is that just an extra core folder there for common sake kinda like a backup folder?
"The core folder contains files that are commonly used by every Torque 3D project."
So I commented out//$Pref::Video::ProfilePath = "core/profile";
launched the game as a host, and ran a duplicate as a reg player having two running at the same time.. I played around on the level.. Seemed to both run fine..
My question is is the core/profile really needed to design your game? Im asking because it ran without it in the main include with no problems... Or, is that just an extra core folder there for common sake kinda like a backup folder?
#2
Maybe I can better explain it by saying, Im use to one client, and one server folder in any game engine..
Torque seems a bit different, and the Docs does not really explain the difference in the 4 folders, as to why there is 2 client folders, and 2 server folders.. Seeing 4 folders 2 of each confuses me..
There is:
My Projectstest1gamescriptsserver
My Projectstest1gamescriptsclient
and,
My Projectstest1gamecorescriptsserver
My Projectstest1gamecorescriptsclient
So Im assuming atm that.. The corescripts folders is for the server, and the gamesripts would be the client side..
Thus on release and package of final game would be gamescripts which ships out the customer.. While corescripts stays on the developers server side...
Am I right on this?
12/01/2012 (3:35 am)
Ok I comprehend... I commented out the core because I thought it was the core folder ie.. the core of the engine, and I was reverse engineering the source to see what does what.. I was thinking of taking out portions, and building from the ground up to better understand how the engine works with client vs server code.. So I can re-engineer the server connect code, and put in exactly what I need for the game project its self script wise.. I just dont like the way Torque server connect is designed for shooters, and maps with multiple servers allowing the player to host their own map. I want full control, one persistent world.Maybe I can better explain it by saying, Im use to one client, and one server folder in any game engine..
Torque seems a bit different, and the Docs does not really explain the difference in the 4 folders, as to why there is 2 client folders, and 2 server folders.. Seeing 4 folders 2 of each confuses me..
There is:
My Projectstest1gamescriptsserver
My Projectstest1gamescriptsclient
and,
My Projectstest1gamecorescriptsserver
My Projectstest1gamecorescriptsclient
So Im assuming atm that.. The corescripts folders is for the server, and the gamesripts would be the client side..
Thus on release and package of final game would be gamescripts which ships out the customer.. While corescripts stays on the developers server side...
Am I right on this?
#3
just grab torsion.demo or full anyone.
open *.torsion.press f11.
u will go to very 1st line on script side.
go through until mainmenu come up.
that is how i have seperated client and server part completely.
but u will need basic knowledge on torque script
12/01/2012 (4:17 am)
just grab torsion.demo or full anyone.
open *.torsion.press f11.
u will go to very 1st line on script side.
go through until mainmenu come up.
that is how i have seperated client and server part completely.
but u will need basic knowledge on torque script
#4
Core contains client and server basic initialization scripts, as Michael said.
Scripts contains game-specific client and server scripts.
The concept was that you could leave Core alone because it is basic setup code that should be the same for practically any Torque game. You would focus all of your efforts in Scripts because that's where the game-play code is.
To point to the nose of it, in Scripts/main.cs you'll find the definition for the fps package - which is activated at the end of the file. This package contains the base command line parser for the fps game-play in the template. If you search the project for 'package' you'll find a few in the template - examine them and see what they do. Most of the gameplay for the template is defined in the GameCore package in scripts/server/gameCore.cs.
12/01/2012 (7:37 am)
Your assumptions are incorrect.Core contains client and server basic initialization scripts, as Michael said.
Scripts contains game-specific client and server scripts.
The concept was that you could leave Core alone because it is basic setup code that should be the same for practically any Torque game. You would focus all of your efforts in Scripts because that's where the game-play code is.
To point to the nose of it, in Scripts/main.cs you'll find the definition for the fps package - which is activated at the end of the file. This package contains the base command line parser for the fps game-play in the template. If you search the project for 'package' you'll find a few in the template - examine them and see what they do. Most of the gameplay for the template is defined in the GameCore package in scripts/server/gameCore.cs.
#5
12/01/2012 (11:45 am)
Moving forward, this kind of confusion is one I hope to prevent by merging the so-called "core" into the "game" scripts and refactoring the directory structure as I mentioned in my Template Update blog.
#6
12/01/2012 (4:02 pm)
I'm really looking forward to that, Mike. I think the original idea was sound but in practice it's too confusing - and you can still use packages to alter gameplay based on game type as intended with all of the scripts unified.
#7
So basically, any editing I do in game.. To existing scripts, or new scripts would be in the game/scripts client or server folders. While completely leaving the Core files alone.
The part that threw me off was when I was in the GUI building a login menu to go with the server database. There a connection with the original example login that is in game/arts/gui, and not in game/scripts/GUI where I thought it should be. But then there is Gui in the game/scripts/gui for the rest of the game play.. Then I took a look at the rest of the folders, and I was like Huh??? The way my mind thinks is server is server, and client is client, why are there so many folders for two instance separations in code.
I wanted to design, some new features, and tools, in GUI to help in game design, and content creation, that maybe some of the code can be passed off to the player gui that could possibly assist in world building. I wanted to do this with out reediting the code server vs client side, and just set maybe flags or admin rights, while not getting lost or confused on which folders I have to add the new scripts or gui.
I kinda like Micheal halls idea on the merging aspect, would probably be less confusing.
12/08/2012 (9:03 am)
Ok. Now I understand, I think lol.. So basically, any editing I do in game.. To existing scripts, or new scripts would be in the game/scripts client or server folders. While completely leaving the Core files alone.
The part that threw me off was when I was in the GUI building a login menu to go with the server database. There a connection with the original example login that is in game/arts/gui, and not in game/scripts/GUI where I thought it should be. But then there is Gui in the game/scripts/gui for the rest of the game play.. Then I took a look at the rest of the folders, and I was like Huh??? The way my mind thinks is server is server, and client is client, why are there so many folders for two instance separations in code.
I wanted to design, some new features, and tools, in GUI to help in game design, and content creation, that maybe some of the code can be passed off to the player gui that could possibly assist in world building. I wanted to do this with out reediting the code server vs client side, and just set maybe flags or admin rights, while not getting lost or confused on which folders I have to add the new scripts or gui.
I kinda like Micheal halls idea on the merging aspect, would probably be less confusing.
Associate Michael Hall
Distracted...
What you commented out is not the "core", only the GFX card profiles that are used to enable/disable special settings for the named card. These are optional adjustments and shouldn't cause any averse effect for not using them unless you've had to tweak a specific GFX setting for a unique video card.
That variable simply lets the resource manager know the directory or filepath location to find the various card profiles.