Game Development Community

Newbie script questions

by Jeff Randall · in Torque Game Engine · 12/27/2001 (6:00 am) · 7 replies

Hi All,
Here's a bunch of stupid questions so I can get a handle on this engine.

1. What's the difference between 'fps' and 'common' dirs?
2. What should be 'client' side code and what should be 'server' side code?
3. Is there or will there ever be newbie documents explaining things like what files do what and dir structure?
4. Is there any reference list of the complete script functionality, as in, I'd like the ability to find out what different kind of 'health meters', 'guibuttons' and other things already exsist and what there settings are before I attempt to create my own.
5. Is there a time frame when v1.2 will be out? That one will have a full demo, right?
6. I want to create a new sub dir under example for my own game. How do I setup the engine to compile and use my new dir instead of 'fps'.

I'm sorry if these questions are stupid or if they were already answered in other posts, but a lack of centralized startup docs has left me scratching my head.
Thanks guys, the GG community rocks!

#1
12/27/2001 (7:59 am)
Hi Jeff,

1. What's the difference between 'fps' and 'common' dirs?

/fps is the "mod" directory, its there you should have your game specific code. the /common dir is where things that are common to all games go. One can ovverride the other to do specific things.

2. What should be 'client' side code and what should be 'server' side code?

Server side code is basically anything ALL players need to know, score, where everyone is, what theyre doing etc. Client side code is what a single player needs, such as what interface to show, some client side effects etc. Anything that affects more than one player goes server side.

3. Is there or will there ever be newbie documents explaining things like what files do what and dir structure?

There is a doxygen doc, but its not going to be massively helpful, dont know what the other GG guys are doing about this.


4. Is there any reference list of the complete script functionality, as in, I'd like the ability to find out what different kind of 'health meters', 'guibuttons' and other things already exsist and what there settings are before I attempt to create my own.

Not to my knowledge, its just a matter of trolling through the existing scripts right now (and perhaps more importantly, trolling through scripts for tribes 2).

5. Is there a time frame when v1.2 will be out? That one will have a full demo, right?

Unknown: Tim??

6. I want to create a new sub dir under example for my own game. How do I setup the engine to compile and use my new dir instead of 'fps'.

I simply copied the fps dir and renamed it (and any references to the /fps in the scripts).

My best advice would be to take a backup of the whole engine, then start hacking about doing small changes to the engine until you get more into the way the code works, it can be a bit mezmerising at times, but it gets clearer after a while.

Phil.
#2
12/27/2001 (8:06 am)
1) Common includes data which is used by all modifications. This data is important for each modification to run.
2) Server should be everything, which is important for the game. Remember: "The server is always right". So the server has to handle the data, which could be requested by a client.
3) Most things are very easy. 'server' includes everything for and loaded by the server; 'client' includes gui and gui scripts. You will easily find your way through.
4) Did you have a look at the 'documentation' on the upper left?
5) I don't think so. Tim can give you are more satisfying answer.
6) Search the scripts for 'fps/' and replace it with your mod name. You also have to change the name in the /main.cs

I advise you not to replace 'fps' Insted of this, you should add your mod and only copy modified code to your directory, so you don't get much trouble with CVS updates.
When you have finished your game, you can merge 'fps' and your mod.

greetings
Daniel
#3
12/27/2001 (8:46 am)
Thanks a lot for the quick responses. Helps me out quite a bit. Just a few more questions, though :)

My intention is to create a game that won't have any 'mod' or end user modification capability. With that in mind, would it be smart to combine the 'common' and the 'fps' dirs together? How hard would that be to do? Or is this really stupid? I know that if would affect merging with the CVS, but I wouldn't do it until I 'finalized' the code and stopped updating.

For now, I made a complete backup of the engine, and in my working copy I made a copy of 'fps' and renamed it. I'll search main.cs for any reference to 'fps'. What other files might have hard coded references?

Last question, what is a good multi-file search tool? I'd like a program that I can tell it to search all *.cs files for specific strings or commands.
#4
12/27/2001 (9:38 am)
My intention is to create a game that won't have any 'mod' or end user modification capability. With that in mind, would it be smart to combine the 'common' and the 'fps' dirs together? How hard would that be to do? Or is this really stupid? I know that if would affect merging with the CVS, but I wouldn't do it until I 'finalized' the code and stopped updating.

I wouldnt bother with the common and fps merging. In the end, you only need to give the .dso files out (compiled scripts) so no-one is going to mod you anyway.


For now, I made a complete backup of the engine, and in my working copy I made a copy of 'fps' and renamed it. I'll search main.cs for any reference to 'fps'. What other files might have hard coded references?

Some of the files in the script, and some of the files in the ui that use textures/models from the /fps dirs.


Last question, what is a good multi-file search tool? I'd like a program that I can tell it to search all *.cs files for specific strings or commands.

Visual Studio does this, use edit->findinfiles and it will do as you ask.

Phil.
#6
12/27/2001 (1:13 pm)
In windows explorer you can press ctrl+f, set the "Named" field to *.cs, and set the "Containing text" field to "fps".

It will search through the files. I do all my script editing in windows explorer and wordpad, so that's what I use.


Dark
#7
12/30/2001 (10:36 pm)
EditPlus for script editing, all the way