Game Development Community

Improving TorqueScript

by James Urquhart · in Torque 3D Professional · 11/05/2012 (11:52 am) · 50 replies

Hey everyone. A while ago as a side-project I decided to have a go at improving TorqueScript ( see http://www.garagegames.com/community/forums/viewthread/131792 ).

The previous "Torquescript has suboptimal performance" thread seems to have pretty much died down, so I figured it best to start from a fresher slate. I'm also interested in everyones perspective on this issue: How can TorqueScript be improved?

At the moment I'm not looking to completely replace the scripting engine, rather I'm focussing more on improving it. e.g. reducing its overuse of strings, adding useful features.

In my fork, besides fixing the "all function parameters are strings" issue (which I made a pull request for), I've revamped the type system so native value types can be used to represent the complex types as opposed to just strings (much like how complex types might be represented in something like Lua). I've also added support for value-based arrays so "object.field = {1,2,3};" and "%value = {1,2,3};" now actually works, though they don't work in expressions since it introduces too much ambiguity in the parser syntax which is a PITA to resolve.

Does anyone have any interest in these changes?
Page«First 1 2 3 Next»
#41
11/18/2012 (8:20 am)
Just another update. Fixed the mission loading, the only remaining problem is the foreach loop seems to have decided to screw up, and something strange is happening with the chat window. This sadly seems to be a common occurrence with modifying the interpreter: it's extremely easy to break things, to the point where it can turn into a bigger mess than expected.

For the moment I'm taking a break with these changes since TBH I have no current plans to use T3D in a project. If anyone wants to pick up from where I started, feel free to do so.


#42
11/18/2012 (9:27 am)
IMO Torque Script would need to be redesigned from the ground up,not just hacked on, in order to make it a really super functional scripting language. It has a lot of design flaws and the syntax is not very friendly or easily understandable unless you go out and buy a book on it.
#43
11/18/2012 (10:36 am)
Quote:
For the moment I'm taking a break

Reads as "I'm sobbing into a large glass of scotch" ... ;)
#44
11/18/2012 (11:48 am)
Thanks for what you've done so far, James! I'd love to take up the challenge if I knew anything about the interpreter code... unfortunately, it's all Greek to me at the moment.
#45
11/19/2012 (2:32 pm)
Just to wrap things up for now, I've fixed the iterator issue and also the one with the chat hud (a comparison assignment wasn't working correctly). Apart from the mission editor glitching when adding objects (probably a funky assignment somewhere), basic functionality seems to be working again now.

@steve

www.reactiongifs.com/wp-content/uploads/2011/05/extreme_face.gif
@jimmy

After hacking on it for a while, I'm tempted to agree with you there ;)

@daniel

Thanks
#46
11/19/2012 (2:44 pm)
James, already noticed that pic on Mode7 site ;)
#47
07/04/2014 (7:46 am)
Sorry to resurrect this thread but this is kind of important to me :o)

So did this awesome project die? Or is it still there somewhere?

Also do you have a link to the gitHub project?

Edit:

I just saw this thread:
http://www.garagegames.com/community/forums/viewthread/132794/2#comments

AND

this on GitHUB

https://github.com/GarageGames/Torque3D/pull/81

And that kind of answered my questions :o)
#48
07/05/2014 (7:16 am)
@Dwarf King

Unfortunately this work has pretty much stalled due to little to no interest. Feel free to pick up where I left off if you need a good starting point in any case. ;)
#49
07/05/2014 (8:58 am)
Feel free to take a look at this stuff too, although no work has been done on it since like April.

http://www.garagegames.com/community/forums/viewthread/136351
#50
07/05/2014 (9:50 am)
I plan to get very close and personal with the console when we're working on 3.7 - partly so we can check James's existing PR, and then hopefully so we can roll in even more improvements.
Page«First 1 2 3 Next»