Poll

Which coding langauge is best for learning Torque?

C++
Java
Niether, does not matter

Author Topic: C++ and Torque Script  (Read 3735 times)

If I know how to code in C++, then would that mean I can code in Torque too? Are they the same, different?

I've never coded in C++ or Torgue... but I'm sure they'd be different

Torque's syntax uses a bit of C++ and C#, from the looks. So if you can learn those you might be able to understand the Torque syntax. However you'll still need to learn the engines functions and whatnot.

Torgue
What is this stuff

I find that Torque is really close to Java. And Java is apparently close to C++/C#, from what I've heard. So yeah.

not really. syntax is similar but that's about it.

Wait so, I don't get it. Which coding langauge is best to know first, because Torque script isn't as popular Java and C++ and that makes it hard for me to find good tutorials for Torque script. I need to know which language to learn so it makes it easier for me to understand how to code in Torque better.

If you can figure out how to learn any language, it doesn't matter which type, you will be able to learn torque. Programming is  about problem solving, critical thinking, and patience more than anything else.


Torque is most similar to C#, C and C++ syntax wise.

The difference is that there's only two one variable type.
So no int,float,bool or whatever is needed to declare variables.
There is many differences but that's the one I find most noticable

Oh and you need to put a % or $ to declare local and global variables.
« Last Edit: March 24, 2013, 11:30:36 AM by Aide33 »

The difference is that there's only two variable types.

there are no value types in TorqueScript
numbers are strings

If you understand then it's easy.

Lol, some of you say its most similar to C++,  and then some of you are saying it does not matter, its just "critical thinking." So I have no idea who is right or wrong.

The syntax seems very similar to me-- I think torque is a derivative a C++

although they are technically different, if you are already proficient in C++ I don't think you should have any trouble coding in torque

The truth is

Java is similar to C, C is similar to C++, C++ is similar to C# and Torque is similar to C#.

There almost all the same

They syntax isn't really that similar.  TorqueScript functions go something like
Code: [Select]
function doStuff(%cl,%arg1,%arg2)
{
     echo(2+2);
}
and C++ is more like
Code: [Select]
int main(void)
{
     cout >> "4";
}

I haven't done C++ in a while, so above will probably just give you a syntax error.