Game Development Community

dev|Pro Game Development Curriculum

Torsion Update

by Tom Spilman · 05/31/2006 (1:30 am) · 46 comments

www.sickheadgames.com/images/shbug_03.pngNew Torsion out today. As some of you may have noticed this one was up to the wire with the previous release expiring about 5 minutes ago (for those of you in CST).

This release mostly focused on the left side of the window... the project tree. As part of that the following got done:
  • You can now toggle the project tree filter to display ignored mod paths.
  • Fixed text coloring during project tree drag and drop.
  • When you 'explore' a file or folder from the project tree you no longer get the folders explorer bar.
  • Project tree view now supports multiple item selection with open, delete, move, and copy operations.
  • Updated directory watcher so you can always delete a folder in the project tree.
  • Added Explorer context menu in project tree context menu.
  • Fixed bug where you could not delete from the project tree when no script was open.
  • Fixed bug where you could delete the project root.
  • Added 'New File' into project tree context menu.
  • 'New Folder' in project tree context menu now works.
  • We now use the native icons for all files in the project tree view.
  • You can now adjust the files and folders which are always excluded from the project tree view in the Preferences.
There are a lot more changes including more configurability (in particular for script and DSO extensions) and VC++ style menus. You can read the rest of the change log, but i'm gonna highlight a few of my favorite improvements:


www.sickheadgames.com/stuff/nativeicons_t.pngNative Icons

Nothing really glamorous, but it's one that i've been wanted to see for a while. Torsion now queries the OS for the normal icons used for files when it populates the project tree. This has been a pet peeve of mine in VC++ since 2.0... don't assume i want to use the IDE to edit a non-source file, don't change the look of my non-source icons. The more i integrate the project tree with the native functionality of the OS the more useful it seems to become. I hope to extend this native feel to the Mac and Linux ports if it makes sense.








Explorer Menu

This came out really nice. It was inspired by the Explorer menu in the excellent tool BeyondCompare. This basically opens just about any shell extension based tool within Torsion.

www.sickheadgames.com/stuff/explorer_t.png

And as you can see in the screen shot... it gives you some basic access to shell integrated version control systems. It's not ideal by any means, but it's better than waiting till i had time to implement a custom integration with SVN. Now to the big feature.


Edit and Continue

www.sickheadgames.com/stuff/setnextstatement_t.pngThis was something i wasn't planning on adding at this time, but i had a need for it in a contract job and implemented a quick hack over a few hours. I've since spent a week on it and it's pretty damn good... better than VC++ in alot of cases, but of course it can fail badly in odd situations. For those of you not in the know, Edit and Continue is something Microsoft introduced with VC++ 6 that allowed you limited editing of C++ code while your app was running. This would allow you to make some small changes to the code without requiring a stop/compile/restart of the debug session.


For TorqueScript this is a easier than doing it for VC++, but it had it's own challenges. The first naive implementation just used exec() and the 'nocalls' parameter. The problem was that the 'nocalls' param was bugged in TGE 1.4 and would crash on some script files. Also it didn't quite behave as it should... global assignments outside of functions were executed and if you removed a function from the file it would not be removed from memory. A custom solution was needed and i added two new commands to the TelnetDebugger to make it work.



www.sickheadgames.com/stuff/reload_t.pngWhich brings us to the bad news... i haven't updated the TelnetDebugger resource with the changes just yet. So although your teased with the "Set Next Statement" and the script reload prompt dialog, you'll get an evil Bing! from Torsion as the TelnetDebugger denied you your request.


I'll try to get the update for this out very soon. :)







Stability and What's Next

A quick note. I've noticed people commenting on Torsion stability here an there. In general is pretty good, but there have been a few pesky crash bugs out there. The automated crash reports have helped, but the biggest problem is that Torsion is still in an alpha state. I regularly rework large portions of the code when inserting new core features which leads to things being more unstable than i'd like. I try hard to keep this from effecting people because i wanted to get a real IDE out to people back when TorqueScript debugging was a joke. I'm in the final stretch towards beta, so cut me a little slack please. At that point it's all stability, polish, and some crap work (docs and marketing). I won't ship something that is bug ridden. Promise! :)

I have a heavy load of contract work going on, but i'm still pushing hard towards the final. The next release will promise to complete one feature people ask alot about... Find and Replace. I almost never use it myself and it's something difficult to implement well, so it's been back burner'd for a long time now. I can't put it off any longer. I will have full Find and Replace in the next release... count on it.

You can get Torsion at the usual location:


www.sickheadgames.com/images/torsion_r_logo500.jpg

Download Torsion
v1.0.607 Alpha

Please send bug reports and feature requests over here.

- Tom
#21
05/31/2006 (10:47 am)
Woot. I always like checking out new versions of Torsion. Find and Replace would be killer.
#22
05/31/2006 (10:47 am)
@Neo - The current versions of TSE, TGE, and TGB have the TelnetDebugger resource integrated. The only thing you need is to add this bugfix which as proven to be solid.
#23
05/31/2006 (11:03 am)
Ah thanks tom, that should do the trick...

~neo
#24
05/31/2006 (11:13 am)
I remember trying Torsion once way back when and... well... it sucked. I ended up trying it again when I needed something that could install easy on school computers, and now I'm using it myself. Aside from some occasional stability issues and quirky bugs, it's been fantastic so far for my needs.

Any idea what it's going to cost when it's done Tom?
#25
05/31/2006 (11:46 am)
@Paul - I'm not sure what the cost will be, but i do want to keep it very affordable.
#26
05/31/2006 (9:16 pm)
Tom,

I just wanted to say thanks for this program. I use it daily here at GG on a which spans dozens of files and well over 50,000 lines of script.

It has become an invaluable tool which has saved me literally hours of headache working with and debugging
such a large project.
#27
06/01/2006 (3:49 am)
When you start charging for it, I'll buy it in a snap!
It's the most useful tool released since Constructor... wasn't
#28
06/01/2006 (12:34 pm)
@Robert - Thanks! It was great to hear GG is using Torsion. Let me know if there is anything i can add to make working with such a large code base easier for you.

@Mincetro - Thanks.... but give the Constructor guys a break. :) They're working hard on getting that thing released.
#29
06/01/2006 (8:37 pm)
Wow Tom- Been a while since I looked at Torsion. It's looking really good. The new project panel is nice. I can now run Subversion/TortoiseSVN commands right from within Torsion. Awesome :-)
#30
06/01/2006 (10:37 pm)
@Alex - Thanks! We got a bit more to do and the year and a half long process of developing Torsion 1.0 will be over.... then work on 2.0 can begins... damn. =)
#31
06/03/2006 (7:37 pm)
@Tom

Ok i've been using Torision exclusively for a few days now and have some more comments :)

Where's the search and Replace that most editors have? usually Ctrl+H

Also. on searching, it'd be super if you could press up and down to cycle between previous searches like Visual Studios and other editors.
#32
06/04/2006 (12:36 pm)
@Ramen - Ah you didn't read the plan...
Quote:The next release will promise to complete one feature people ask alot about... Find and Replace.
As far as the up/down arrows i assume you mean in the find dialog. Yea i need to fix that as what you see now is the windows default find dialog. I need to design a custom one that includes a drop down list.
#33
06/04/2006 (12:41 pm)
Sorry :) i thought i did read the plan.

I also got another suggestion.

img369.imageshack.us/img369/7917/search8rg.jpg
clicking the [...] button doesn't do anything.
#34
06/05/2006 (1:16 pm)
@Ramen - Duh... thanks... i'll get that fix.
#35
06/06/2006 (6:44 am)
Hi Tom, I have been using Torsion for a while and really it's a great product. Thanks a lot. About stability issues, I had very rare crashes with version 549, but this new version is *very* unstable. Am I the only one who is experiencing that? It crashes randomly without any reason, while just editing the code. It happens at least once every 10/20 minutes of use. Hope this will get fixed soon. Although I'm eager to use the new nice features, I would prefer using the previous version, which was more stable, but, alas, it expired.
#36
06/06/2006 (11:07 am)
@Alberto - There is a really stupid bug in wxWindows which i found and fixed that is causing these code completion crashes. I'll have a bug fix build out by tomorrow that includes this and a few other critical fixes to stabilize what is out there before i move on to the next set of features.

... and no... Search and Replace isn't done yet. ;)
#37
06/06/2006 (1:53 pm)
@Tom - That's so good to hear. Thanks! I can't wait to have this fix. BTW: did I mention how lovely it is that you can access the explorer context menu from inside Torsion? Being a fond user of TortoiseSVN that basically integrates most of my SCM workflow right inside the IDE! That's simply amazing! It even makes me forget about search & replace! :D
#38
06/07/2006 (2:04 am)
FYI.

I got a bugfix release out this morning that addresses some showstoppers people were having as well as a few minor ones.
Quote:
- 1.0.614 Alpha - June 7th, 2006 -

* We now store and restore the selection highlight colors.
* Removed old hardcode which would always replace the Terminal font with Courier New.
* We now store and restore the last selected config when we open a project.
* Save As is working again for scripts and can now be used to save project as well.
* We now display and error message when debug hook code cannot be injected.
* Fixed bug in debug injection which failed to detect errors related to read only files.
* Enter key now works in project tree view to open single or multiple items.
* Fixed major wxWindows bug that was causing crashes during code completion.
* The 'No' button is now the default in the "There were script errors. Continue?" message box.
* Removed conflicting Alt+C accelerator in Find in Files dialog.
The wxWindows bug fix is the biggie... this will solve the stability issues some users were experiencing.

Enjoy!
#39
06/07/2006 (2:41 am)
Hah, just in time... Torsion has been crashing every 2 minutes but I found that just leaving the first exception message box there would allow me to continue as if no bug was present ;p

Great stuff and I think I'll nominate Torsion as the number 1 must have tool.

I love the fact that its so similar to Visual Studio. I usually have VS open on one monitor, torsion on another, and run TGB on the third.

The debugging just plain kicks ass and I'm sure it will silence all those whipcrackers about wanting to
do everything in C++.

Kudos tom.

~neo
#40
06/07/2006 (7:28 am)
Great job Tom! And thanks for the last two changes also, it was me who reported them ;)