Game Development Community

dev|Pro Game Development Curriculum

Torsion Updated!

by Tom Spilman · 03/21/2006 (12:48 pm) · 35 comments

www.sickheadgames.com/images/shbug_03.pngFirst off I'm at the GDC this week. If anyone wants to meet up just drop me a name and phone number to tom AT sickheadgames DOT com and I'll give you a call back. I hope to spend some time with the GG guys talking Torsion and checking out all the cool new stuff they're about to unleash upon us. =)









www.sickheadgames.com/images/torsion_r_logo500.jpg

So aside from contract work Torsion has been my primary focus of late. Today I released a new version that has a significant amount of improvements. I think this will be the final alpha release. The next release will be a beta and be 100% feature complete.

www.sickheadgames.com/stuff/garagegamesimages/projectconfig_t.png

A few notable changes:
  • New project setting allows ignoring of select mod folders in both the project tree and for code completion.
  • Enabled code completion for fields within object and datablock declarations.
  • Script compiler errors are highlighted in the output window and they are double clickable.
  • New error display within output window for spotting errors quickly.
  • Added visibility toggle of left and bottom panes in view menu.
  • Added preferences dialog exposing all customizable IDE settings.
  • New optional pre-compile dumps the syntax errors of modified scripts into output window before execution.
PrecompilerIMO the coolest thing in the new release is the script precompiler.

www.sickheadgames.com/stuff/garagegamesimages/precompile.png

When enabled it will compile any changed scripts before you launch your game. If you have any syntax errors they will be caught and reported in the output window. It works by calling your game executable with a special script file which just compiles a list of scripts. Since it uses your Torque executable it's always accurate and never misses or reports false errors. Say goodbye to alot of wasted time with this one feature.

The down side is that it assumes your Torque executable will run the script passed to it. If you have disabled this feature in your executable it won't work. I've added the ability to toggle it off per config to deal with that case.


www.sickheadgames.com/stuff/garagegamesimages/codebrowser_t.pngCode Browser
The code browser has started to get a face lift, but it's not finished for this release. I've started to add filtering for different classes of identifier, but the mix isn't final yet. It now also shows the base class/datablock when you expand an object which is pretty handy. When you double click on an item it will take you to the script and line that identifier is declared in or will show you a list of locations to choose from.

I could use some feedback on this area of Torsion. There is a ton of data to display here and it's been challenging finding a way to display it all. I'm starting to think i need to do something different that what is normally seen in most IDEs.




www.sickheadgames.com/stuff/garagegamesimages/completion_t.pngCode Completion
This release has my third and final refactor of the code completion scanner engine. It took me a couple of tries before i got the design right as when i started the Torsion project i was pretty much a TorqueScript neophyte. Aside from the internal changes and performance improvements i added dot completion for the special %this local. I didn't get time on this pass, but it's all ready now to finish off all the other typical code completion features. I'll be on this right after GDC.





Preferences
Finally i've begun the process of exposing the preferences stored in the xml file to the IDE. All the coloring stuff is there as well as a few other toggles including tab size and type, disabling code folding, and code completion. There will be more options added now that the framework is in place to easily edit them. If you have a pet option go ahead and log it into our bug tracker.

Well... gotta get some lunch and rub elbows with industry folk. =)


Download Torsion
v1.0.544 Alpha

About the author

Tom is a programmer and co-owner of Sickhead Games, LLC.

Page «Previous 1 2
#1
03/21/2006 (1:26 pm)
in the words of a great leader and inspirational speaker, Cartman from SouthPark, "keeeeeeeick assss"
#2
03/21/2006 (1:33 pm)
The best decision I have made since purchasing the Torque license has been using Torsion.
#3
03/21/2006 (2:06 pm)
Nice work, Tom.

Can't wait for a mac version, which would be helpful as i am planning on getting one of those new intel macs soon :)
#4
03/21/2006 (2:13 pm)
Great Stuff Tom, Torsion rocks!
#5
03/21/2006 (2:17 pm)
Thanks for the update Tom, Torsion is great.

Can't get this new version to run under WinXP though, loader error message is: "The procedure entry point GetProcessId could not be located in the dynamic link library KERNEL32.dll"

Oh well, back to the old alpha for the time being.
#6
03/21/2006 (2:29 pm)
Just started using Torsion last week after using Textpad for the last year. Excellent IDE for TS :)
#7
03/21/2006 (3:41 pm)
Outstanding work as always! External window concept sounds useful, downloading now..
#8
03/21/2006 (4:03 pm)
torsion just rocks!
#9
03/21/2006 (4:36 pm)
Torsion has made torque script so much easier, thanks.
#10
03/21/2006 (5:00 pm)
I've been using Codeweaver but I'll give this a spin, the precompiling feature sounds useful. As it is I'm still using Dev-Cpp for my scripting IDE :o I know, I have to move on...
#11
03/21/2006 (5:01 pm)
"Since it uses your Torque executable it's always accurate and never misses or reports false errors."

I don't know if this statement is intended how I read it, but as I see it, it's not exactly true. I've been using a similar script-based method of precompiling scripts and checking for syntax errors through UltraEdit 32 for about three years now and one thing I've noticed is that once you actually get into the nitty gritty of things, you'll eventually get "false" syntax errors occurring due to script dependencies.

For example, if I have a datablock that inherits/derives/copies its values from another and I haven't loaded it, it'll pop up an error. Similarly if I define a global variable in another script (say a filename or a setting) and attempt to use it without first calling that script, it could error -- or not report an error at all.

Even executing a list of scripts isn't really an answer to the problem since there's no easy way to define which scripts require which others. Executing them all can be painful -- especially if you're doing anything even remotely tricky with execution order (like say, only having the scripts that are necessary for the engine to host a server execute just prior to launching the server itself).

Still... If you've thought of any way around these issues, I'd like to hear it. I'm always up for improving the coding pipeline (it's like an art pipeline but geekier). Because of the limitations of command-line compiling, I only use it once in a while now. It's generally been easier and required less fiddling just to get the game running and to re-execute the scripts mid-play.
#12
03/21/2006 (5:09 pm)
@Joe -Any particular issue that keeps you using Dev-Cpp instead of a TorqueScript targeted IDE?

@Daniel - The trick is that i'm not using exec(). exec() executes the scripts and as you say it would cause tons of false errors because of script dependencies. What i do is call compile() on the scripts... this only generates a DSO or produces syntax errors. It does not load or execute the script.

So it's doing exactly what it says... compiles the scripts. It does not attempt to spot runtime errors.

And thanks for all the praise guys!
#13
03/21/2006 (7:34 pm)
Awesome! Torsion is excellent for Torquescript and it keeps getting better and better!
#14
03/21/2006 (10:02 pm)
@Tom, I'm really happy Torsion! You have done a great job with it and like what "Master Treb" said, Torsion makes torque script so much easier. Thankyou so much!
#15
03/21/2006 (11:16 pm)
@Tom, the main reason is external tools support. I currently run .bat files that call GCC over my script(s) before running them, because I use the GCC preprocessor for macros and to strip comments from the final code. The only other reason is familiarity, I've used it for years :)
#16
03/22/2006 (2:29 am)
This looks really great! Keep going.
#17
03/22/2006 (4:55 am)
Looking good! Even better is the mention of a Linux version down the road. I look forward to trying it out!
#18
03/22/2006 (7:36 am)
@Tom, Just so you know, the new Torsion is awesome. I like that I can change my background color and fonts with a lot of flexibility. I was using Vim to editor TorqueScript files before this release, but now I think you have me sold.
#19
03/22/2006 (7:51 am)
@Joe - Humm... so what you need is a preprocesss step that occurs before the precompile and execution of the script. Anyone see other uses for this if i would add it?
#20
03/22/2006 (9:11 am)
@Tom: All the usual stuff you can do with a precompiler:
#define setXY( vector, x, y ) ...
#ifdef _DEBUG
//dump all kinds of stuff to the console, draw collision boxes, whatever
#endif
#include

Macros might be useful because I don't think TorqueScript does any "compiler inlining" or other spiffy optimizations of a heavy duty compiler like GCC or its ilk.

#define PLAYER_HEALTH 100
REAL CONSTANTS!

"#if FOO" could be useful in a wide variety of settings (debug vs demo vs release scripts).

If you add a true precompiler (gcc's for example), you can make use of some of the Crazy Stuff going on in boost.org's precompiler library.

http://www.boost.org/libs/preprocessor/doc/index.html

A fair amount of the preprocessor library is C++ specific, but enough of it isn't to be worth a second look. Preprocessor arrays, supporting insert/delete/push/pop. And it's all done by the preprocessor, so looking up elements of the array costs ZERO at run time. Sure, it's only good for arrays of constants, but still quite handy.

They also have facilities for code generation (creating many nigh-identical versions of a function), among other things.
Page «Previous 1 2