TorqueScript vs C++
by Emperor Coder · in Torque Game Engine · 06/16/2004 (5:27 pm) · 7 replies
I've been developing games professionally for 5 years and I am strongly considering licensing Torque for some hobby projects. From what I've read of the specs, Torque has all the features I need for my game.
However, I've read in this forums that TorqueScript seems the preferred choice for implementing game logic. Personnally I'd rather write all game logic in plain C++, so I am wondering how "open" is the Torque SDK for that kind of usage pattern. Obviously, everything that can be done is TorqueScript has roots in the C++ core somehow, but the simplicity with which one can switch from one language to the other can greatly vary depending on the amount of effort that has been put in the design to allow it.
I'm not completely rejecting script, I'd certainly find practical uses for it. Although I am not familiar with the engine yet to decide which, I am thinking of usign script as a data binding tool more than a way to implement game logic.
So, my questions would be :
- How "open" is the Torque SDK to use C++ instead of script to implement game logic ?
- How can one debug/profile TorqueScript ? Which tools are provided ?
- Has anyone in this forum already taken the pure C++ route and is willing to share their feelings about their experience ?
Thanks
Emp
However, I've read in this forums that TorqueScript seems the preferred choice for implementing game logic. Personnally I'd rather write all game logic in plain C++, so I am wondering how "open" is the Torque SDK for that kind of usage pattern. Obviously, everything that can be done is TorqueScript has roots in the C++ core somehow, but the simplicity with which one can switch from one language to the other can greatly vary depending on the amount of effort that has been put in the design to allow it.
I'm not completely rejecting script, I'd certainly find practical uses for it. Although I am not familiar with the engine yet to decide which, I am thinking of usign script as a data binding tool more than a way to implement game logic.
So, my questions would be :
- How "open" is the Torque SDK to use C++ instead of script to implement game logic ?
- How can one debug/profile TorqueScript ? Which tools are provided ?
- Has anyone in this forum already taken the pure C++ route and is willing to share their feelings about their experience ?
Thanks
Emp
#2
How open is the code? About as open as you can get. With the SDK you get the entire source code. Hack away at your own pleasure.
Debug/Profile - From what I can tell there's two options. TGE logs just about everything it compiles and runs through so you can dig through that for errors. Also with a simple switch you can run your app in debug mode and get a lot more logging.
Pure C++ route - Not I, but I'm learning C++ as I'm learning TGE. From what I can tell the script is very close to base C++ and the engine is C++.
Hope it helps.
- C
06/16/2004 (5:42 pm)
Understand I've only had the SDK myself for a few months, so I'm still getting the hang of it myself.How open is the code? About as open as you can get. With the SDK you get the entire source code. Hack away at your own pleasure.
Debug/Profile - From what I can tell there's two options. TGE logs just about everything it compiles and runs through so you can dig through that for errors. Also with a simple switch you can run your app in debug mode and get a lot more logging.
Pure C++ route - Not I, but I'm learning C++ as I'm learning TGE. From what I can tell the script is very close to base C++ and the engine is C++.
Hope it helps.
- C
#3
But I don't think it's really worth it. The script language provides a very practical way of programming the gameplay and I don't beleive it's your bottleneck. What really slows things down is the graphical part, polygons, etc.
06/16/2004 (5:55 pm)
Well, you certainly can program everything in C++. In theory, all I beleive you have to do is look for the console functions C++ interface and call them directly.But I don't think it's really worth it. The script language provides a very practical way of programming the gameplay and I don't beleive it's your bottleneck. What really slows things down is the graphical part, polygons, etc.
#4
06/16/2004 (7:11 pm)
Also, script is very useful for tweaking gameplay without having to re-compile.
#5
06/16/2004 (11:28 pm)
Script also tends to be more robust. It's more challenging to crash things with script.
#6
Script debugging is not as robust as working with C++, but it's also not a deal breaker for most people by any means.
I'm sure you're aware that we recommend doing highly performance-dependent routines in C++, and using script as much as possible for the rest of your needs. But the only reason we recommend that is because script is usually much easier for people. If you prefer to use C++ for everything, there is nothing stopping you, and you won't encounter any difficulties (other than those inherit with working in the language and being a human who can make mistakes).
06/17/2004 (12:29 am)
You can code gameplay logic in C++ with no problem whatsoever. Most people choose to use script just because they find it easier to work with, faster to prototype in, and quicker for testing and modifying things without re-compiling.Script debugging is not as robust as working with C++, but it's also not a deal breaker for most people by any means.
I'm sure you're aware that we recommend doing highly performance-dependent routines in C++, and using script as much as possible for the rest of your needs. But the only reason we recommend that is because script is usually much easier for people. If you prefer to use C++ for everything, there is nothing stopping you, and you won't encounter any difficulties (other than those inherit with working in the language and being a human who can make mistakes).
#7
Emp
06/17/2004 (5:21 pm)
Thanks for your answers, that definetly clears the last interrogations I had before making the move.Emp
Torque Owner Ace
Script is simular to c++ , and the script compiler is built into the engine.