Alternatives to TorqueScript

Please note that the *solutions* here are expert level engine code changes, these alternatives are not simple plugins to replace torquescript

For better or worse, TorqueScript is the language that Torque supports for scripting. Many people find that its performance does not meet their needs, or they are simply unhappy to have to use it as a language. This page attempts to collect the current state of TorqueScript alternatives, and the various discussions that have been had about replacing or improving TS as a scripting language.

Replacing TS

Many are in favour of removing the engine's dependency TS entirely, ideally allowing it as a plugin for those who wish to continue using it, but also providing plugins for more common scripting languages. Here are recent discussions:

The prevailing consensus is best summed up in James' comment:

Now here comes the deal breaker. Are you really going to get people using Lua instead of TorqueScript? Based on my experiences discussing TorqueScript and alternate languages on here…. probably not. For instance I know for a fact I wouldn't be able to get anyone else from mode7 using anything but TorqueScript for torque. Others may think differently however. I know for instance BeamNG really love lua.

I think the core problem is you're attempting to rip out a core part of the engine experience and replace it with something else. Really what you end up with is effectively another engine. In which case… perhaps this would better be suited as a fork?

Migrating away from TS would involve rewriting almost the entirety of the editing suite, which has a lot of logic in scripts. In terms of the source code, the engine relies heavily on the current console/scripting system (for example, global variables used for configuration) and decreasing reliance on that would require significant, deep changes.

Improving TS

If we're stuck with TS, then we can at least make improvements. Version 3.7 introduces long-awaited changes to the scripting engine by James Urquhart to improve its performance, as well as anonymous functions. Discussions on improving TS:

However, I will quote myself and caution that

On the other hand, since TS is not a general-purpose programming language, I don't know how useful these features would be. Especially when you consider the opportunity cost of expending time and effort on them instead of other things.



WinterLeaf Entertainment have created the most complete TorqueScript replacement, which allows users to code games in C#. Its homepage is here. Support status is unknown.


Frank Carney has produced Python bindings for the engine using SWIG. They are described in this blog post. An example of use is available here.

Demolishun - scriptT3D extension


James Urquhart has successfully embedded Lua into Torque 2D, which uses a similar console system to T3D. Anthony Jones also started a similar project.
Peter Simard - add plugins/addons to your game similar to World of Warcraft

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License