Scripts and C++?
by Judah Himango · in Torque Game Engine · 06/03/2002 (2:42 pm) · 9 replies
After reading the doco included on the SDK cd, it says there are two ways to program the SDK - scripts and C++. I see that scripts are for creating mods rather than standalone games. My questions are:
1. Are these scripts included on the SDK cd or are they downloaded using WinCVS?
2. What are these .cs files? Am am familiar with .cpp...
3. What are these .cc files? ^
4. How do you edit the scripts? I don't need to compile them, right?
I'm sorry to plague you guys with so many questions, but the lack of documentation is just terrible - I know more will come in due time :) (A step-by-step "How to start" tutorial that is included on the cd/in the sdk download would stop these questions from being so frequent)
1. Are these scripts included on the SDK cd or are they downloaded using WinCVS?
2. What are these .cs files? Am am familiar with .cpp...
3. What are these .cc files? ^
4. How do you edit the scripts? I don't need to compile them, right?
I'm sorry to plague you guys with so many questions, but the lack of documentation is just terrible - I know more will come in due time :) (A step-by-step "How to start" tutorial that is included on the cd/in the sdk download would stop these questions from being so frequent)
About the author
#2
The script objects are nothing more than front ends for the C++ objects.
Lots of neat things can be done purely with scripting.
That said, lots of other stuff can only be done by creating new C++ classes.
What these things are, as they say, "are an exercise for the reader". Mainly because there is lots of overlap and way to many possiblilities.
Once the full text searching is turned on that will help greatly. Otherwise, start digging thru the forums, resources and news.
06/03/2002 (3:52 pm)
actually the scripting language IS used to create the "game" part of most of the games, not only mods.The script objects are nothing more than front ends for the C++ objects.
Lots of neat things can be done purely with scripting.
That said, lots of other stuff can only be done by creating new C++ classes.
What these things are, as they say, "are an exercise for the reader". Mainly because there is lots of overlap and way to many possiblilities.
Once the full text searching is turned on that will help greatly. Otherwise, start digging thru the forums, resources and news.
#3
Most of the doco is on the site, not on the CD. Here is a good link for beginners www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2119.
Also, all of the questions you asked are covered in the on-line documentation. Check the Documentation link on the left side of the screen in the Torque Engine SDK feature box. There is an axplanation of the difference between script and C++ and examples of the two.
Jeff Tunnell GG
06/03/2002 (4:20 pm)
Judah,Most of the doco is on the site, not on the CD. Here is a good link for beginners www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2119.
Also, all of the questions you asked are covered in the on-line documentation. Check the Documentation link on the left side of the screen in the Torque Engine SDK feature box. There is an axplanation of the difference between script and C++ and examples of the two.
Jeff Tunnell GG
#4
This explains the difference between .cs and .cs.
Jeff Tunnell GG
06/03/2002 (4:55 pm)
Here is an exerpt from the documentation:Quote:
Console functions can be declared in either console scripts or in the C++ game/engine code. A simple script function declaration for example:
Example.cs:
function helloWorld ()
{
echo("Hello World!");
}
helloWorld();
or, for a method on a class:
function SimObject::helloWorld(%this)
{
echo("Hello World!");
echo("Called on object: " @ %this);
}
$object = new SimObject();
$object.helloWorld();
Unlike in C++, the this variable is not implicit in the function declaration. To declare console functions in the game or engine code, the ConsoleFunction macro (declared in engine/console/console.h) should be used.
Example.cc:
ConsoleFunction(helloWorld, void, 1, 1, "helloWorld()")
{
Con::printf("Hello World!");
}
This explains the difference between .cs and .cs.
Jeff Tunnell GG
#5
06/04/2002 (2:06 am)
Thanks! I must say that the lack of documentation (or at least relative lack) is certainly made up for by the quick and numerous replies. Thanks :)
#6
What are you looking for in documentation? The questions you asked were actually in the documentation. I'm trying to find the problem. Is it the way they were presented? Written? Were they not friendly enough? Too hard to find?
Seems to me that you are looking for tutorials or newbie starter kits or ??? There is the getting started area of the documentation that includes the overviews, how to use cvs, how to compile, etc, but you seemed to have missed them. The Torque is very large and not all people want to use it in the same way, but it seems to me that our doco has covered the questions you had. This is not a click and play engine, so it takes some time to get your head around it.
The documentation is a work in progress, but I no longer classify it as terrible. I'm not a programmer, but I have downloaded the engine, set up cvs, installed MS C++, compiled the engine, imported models and Worldcraft shapes, and made a mod all at home without the help of any GG programmers. I have done this in order to test our doco and make sure things are working. If I can do it, anybody should be able to.
However, I want to continue to make it easier and more friendly to newbies. If you can post what it is you think is lacking, or maybe even write up some simple steps that allowed you to succeed, we would appreciate it. I eventually want the Torque to be approachable by people that don't even know how to program. Ron Yacketta's script documentation is step in the right direction (check the Make Game News section).
Jeff Tunnell GG
06/04/2002 (8:29 am)
Judah,What are you looking for in documentation? The questions you asked were actually in the documentation. I'm trying to find the problem. Is it the way they were presented? Written? Were they not friendly enough? Too hard to find?
Seems to me that you are looking for tutorials or newbie starter kits or ??? There is the getting started area of the documentation that includes the overviews, how to use cvs, how to compile, etc, but you seemed to have missed them. The Torque is very large and not all people want to use it in the same way, but it seems to me that our doco has covered the questions you had. This is not a click and play engine, so it takes some time to get your head around it.
The documentation is a work in progress, but I no longer classify it as terrible. I'm not a programmer, but I have downloaded the engine, set up cvs, installed MS C++, compiled the engine, imported models and Worldcraft shapes, and made a mod all at home without the help of any GG programmers. I have done this in order to test our doco and make sure things are working. If I can do it, anybody should be able to.
However, I want to continue to make it easier and more friendly to newbies. If you can post what it is you think is lacking, or maybe even write up some simple steps that allowed you to succeed, we would appreciate it. I eventually want the Torque to be approachable by people that don't even know how to program. Ron Yacketta's script documentation is step in the right direction (check the Make Game News section).
Jeff Tunnell GG
#7
I've been developing with the WildTangent API for over 2 years, and they are really really really good on tutorials, help, and doco. The organization is really good: every tutorial can be found on one page, http://wildtangent.com/default.asp?pageID=dev_tutorials , rather than forcing users to sift through resource forum posts searching for them.
They do the same with their tools: http://wildtangent.com/default.asp?pageID=dev_downloads Again, all on one page.
They also have an online and offline API reference in .chm format which is really easy to navigate. They not only have simple doco, but also a Lab to demonstrate uses of more advanced methods of the API. I am not trying to blow WildTangent's horn here - what I'm trying to say is that because WildTangent was so easy to start with, it got me hooked for 2 years, and no doubt more.
I was planning on waiting to buy the TGE until more doco was out, but after talking to Melvyn May (a former WildTangent developer himself), he said I may have to wait a long time before a lot of doco is released, so I went ahead and bought it anyway. I've since found that, like you said Jeff, the doco is not terrible, instead, it is just hard to find exactly what I'm looking for, which is currently beginner (newbie?) tutorials. Right now I would be satisfied to make a spinning box in the world - nothing too advanced!
No doubt, with time the doco itself and its organization will only improve. I think that is what the doco should shoot for: making it easy for a complete newbie to get started, rather than focusing on helping the advanced developers. Because once they've started, they can figure out more things on their own - if they don't know where to start or what to do, well then you've lost them for good.
06/04/2002 (1:24 pm)
I would say that the number one problem is the fact that it wasn't that easy to find; I visit GG every so often, but I don't know the site inside and out - I was expecting to find everything on the cd, or at least all on one page. I realize that this isn't click and play, nor did I expect it to be when I purchased the engine. In my opinion, and I could be wrong here, again I'm no GG frequent, but the problem with the doco is that it was hard for me as a newbie to find, and was quite unorganized.I've been developing with the WildTangent API for over 2 years, and they are really really really good on tutorials, help, and doco. The organization is really good: every tutorial can be found on one page, http://wildtangent.com/default.asp?pageID=dev_tutorials , rather than forcing users to sift through resource forum posts searching for them.
They do the same with their tools: http://wildtangent.com/default.asp?pageID=dev_downloads Again, all on one page.
They also have an online and offline API reference in .chm format which is really easy to navigate. They not only have simple doco, but also a Lab to demonstrate uses of more advanced methods of the API. I am not trying to blow WildTangent's horn here - what I'm trying to say is that because WildTangent was so easy to start with, it got me hooked for 2 years, and no doubt more.
I was planning on waiting to buy the TGE until more doco was out, but after talking to Melvyn May (a former WildTangent developer himself), he said I may have to wait a long time before a lot of doco is released, so I went ahead and bought it anyway. I've since found that, like you said Jeff, the doco is not terrible, instead, it is just hard to find exactly what I'm looking for, which is currently beginner (newbie?) tutorials. Right now I would be satisfied to make a spinning box in the world - nothing too advanced!
No doubt, with time the doco itself and its organization will only improve. I think that is what the doco should shoot for: making it easy for a complete newbie to get started, rather than focusing on helping the advanced developers. Because once they've started, they can figure out more things on their own - if they don't know where to start or what to do, well then you've lost them for good.
#8
Once we have the change up, I will let you know so you can comment while you are still a newbie and can remember what it is like.
Thanks for hanging in there.
Jeff Tunnell GG
06/04/2002 (1:48 pm)
Wild Tangent has kick ass doco. Of course, they have burned through over $50,000,000 in venture capital to get there. That is still no excuse for us. Like I posted in another thread, Tim and I are working on some orgainzational fixes to the doco, and I have been trying to get more newbie tutorials as well.Once we have the change up, I will let you know so you can comment while you are still a newbie and can remember what it is like.
Thanks for hanging in there.
Jeff Tunnell GG
#9
Glad to hear you all are working on it - it is only a matter of time before this place really gets going, and no doubt I will be here to see it grow :)
06/04/2002 (2:08 pm)
Wow - 50 million in capital; I had no idea :DGlad to hear you all are working on it - it is only a matter of time before this place really gets going, and no doubt I will be here to see it grow :)
Torque Owner Mike Stoddart
www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=3691
.cc are C++ source files.
.cs are script source files.
.cs.dso are compiled scripts file.
.gui are GUI source files.
.gui.dso are compiled GUI files.
Get Tribal IDE to edit the script and GUI source files.
I don't know if the scripts are on the CD as I don't have it, but I would presume they are. If not you can get them via CVS.