KIND OF crosspost, but
I've acquired a Torquescript package for Sublime Text 2. It's great.
I've dropboxed it here.To install it, open
%appdata%\Sublime Text 2\Installed Packages\ and put it in there. Then you'll have to open up a .cs file and force it to always open .cs with the syntax (due to .cs actually being C#. forgetin' Torque) - View->Syntax->Open all with current extension as... (right at the top) and select Torquescript.
Credit where it is due:
It's from a TextMate bundle by Mystery Coconut. Sublime Text 2 can load TextMate language files, so I just packaged it on its own since most of the rest of the files weren't needed - there is function and datablock snippets in the bundle, though, if that's your thing. I also cut out a heap of stuff not needed for Blockland, like mission/interior/terrain/shapereplicator/foliagereplicator autocompletes, since those don't exist anymore.
As for smalltalk, jesus
christ Torque is slow. Let's do some quick comparisons:
This thing I happen to have open implements some basic bin partitioning to cut down on collision checks. As you can see, it's running almost 5,000 collision checks once completed - per update, meaning probably at least 60 times a second.
By contrast, some code in Torque running about 768 similar checks takes just over a full second to execute. That's just shy of 400x as long, or nearabouts.
So now I need to write another forgetload of code to optimize positional insertion to inventories. I need to get the first position a given object can fit onto the grid. In terms of algorithms I can only optimize the collision test (using bins or a quadtree, but the space is too small to effectively do that), but I need to rewrite the entire method for finding that position to test in the first place because it is where the real issue is and it's taken me in excess of four hours to come up with anything relevant.
BUTTFRUSTRATEDIf I can get this under 100 loop iterations involved I'll be happy, because that should execute in a fairly timely manner. I'm only doing at most 60 collision checks, which isn't a huge amount of overhead, but the nearly thousand iterations of looping that involves when brute-force checking for space is a huge problem.