Torquebasic
by Joe Rossi · in Torque Game Builder · 03/09/2006 (12:07 am) · 8 replies
So I made a comment on a resource thread www.garagegames.com/blogs/60916/9989 by Darrel Cusey, about the idea of a BASIC language for Torque and how neat that would be. Then these jokesters come and post stuff like, well duh.. there is TorqueBASIC in 1.4...!
So I looked it up and it seems to be true! Now why is there nearly nothing about it posted anywhere? Is it slow, inflexible, unfinished or otherwise no good? Does anyone have more info about TorqueBASIC? Any plans to document this or maybe add some information to TDN? It seems strange that something like this would be overlooked.
So I looked it up and it seems to be true! Now why is there nearly nothing about it posted anywhere? Is it slow, inflexible, unfinished or otherwise no good? Does anyone have more info about TorqueBASIC? Any plans to document this or maybe add some information to TDN? It seems strange that something like this would be overlooked.
#2
03/09/2006 (9:32 am)
I've thought about using it, the problem being exactly what Tom noted: he's the man with th info (and maybe no!). Since I'm using TGB and it is included, I thought it might be fun to do a little tutorial for the basics of the shooter prototyping I've done. But I fear that it would take more time for me to extract the information and organize it than it would for me to use TorqueScript to actually work on the game. I have that "I should finally do something positive for the community rather than just blabbering all the time" conflicting with "I really need to actually get this game done since I have next to no "free" time and finally found a prototype I enjoy".
#3
@David, I have that issue too.. contributing to the community or doing work on my projects. I do this part time for now, and last night I spent all my time putting together a resource instead of making progress on my game. I don't mind, because I think maybe it will help someone, and it can be a reference for me in case I forget :) For TGB I think even a conversion of the standard shooter tutorial to TorqueBASIC would suffice.
03/09/2006 (12:04 pm)
@Tom, I haven't digged into the source to look for TorqueBASIC stuff, but do you know how much of it is in there? You say it's not very BASIC-ey, so is the syntax really wacky in certain areas like maybe with the OOP? My experiences with BASIC as a language were that it wasn't so hard to grasp. Think you can do a quick brain dump here on the syntax for us? If not I guess I can start experimenting if it's already in the engine.@David, I have that issue too.. contributing to the community or doing work on my projects. I do this part time for now, and last night I spent all my time putting together a resource instead of making progress on my game. I don't mind, because I think maybe it will help someone, and it can be a reference for me in case I forget :) For TGB I think even a conversion of the standard shooter tutorial to TorqueBASIC would suffice.
#4
03/09/2006 (9:10 pm)
From my glance at the code (and glance is the operative term), the syntax is simple, more of the traditional BASIC-y feel. But the block-style, etc is still TS related. But that is from a cursory glance because I was looking at the multiplayer level-editing prospects of my project (because TGB scripting is obscured and can be released).
#5
It has been over a year since I looked at the code, I dont remember all that much about it offhand. I don't have time to look it up, so you're on your own for the time being.
@David,
Not sure if it's what you meant, but it's been mentioned by GG in another thread (I forget which) that the "no T2D code" thing is irrespective of scripting language.
T.
03/10/2006 (12:39 am)
@Joe,It has been over a year since I looked at the code, I dont remember all that much about it offhand. I don't have time to look it up, so you're on your own for the time being.
@David,
Not sure if it's what you meant, but it's been mentioned by GG in another thread (I forget which) that the "no T2D code" thing is irrespective of scripting language.
T.
#6
03/10/2006 (7:45 am)
True, and come to think of it, the "mod" scripting that would need to be done would be general scripting rather than anything T2D specific anyway. I think I'm on crack.
#7
Thanks guys
03/10/2006 (12:32 pm)
@Tom: OK, I'll look into it if I have time. If I get anywhere I'll toss something on TDN in hopes that others will add to it. Thanks guys
#8
* The parser source is in console\BASscan (and the others with "BAS" in them).
* Code must be in a .bas file and cannot be mixed with regular Torquescript.
* Semicolons are optional! (I found that out in one of Tom's old plans.) Yay!
Edit:
* "new" operator needs a matching "end".
* We can't use the BASIC code on the console, or "eval" command. But exec on a .bas file works.
03/11/2006 (9:29 am)
Some things I found so far* The parser source is in console\BASscan (and the others with "BAS" in them).
* Code must be in a .bas file and cannot be mixed with regular Torquescript.
* Semicolons are optional! (I found that out in one of Tom's old plans.) Yay!
Edit:
* "new" operator needs a matching "end".
* We can't use the BASIC code on the console, or "eval" command. But exec on a .bas file works.
Torque 3D Owner Tom Bampton
There was a long and raging thread about creating BASIC in Torque that was going round in circles and getting somewhat silly and pointless as such threads so often do. So, partly to silence the sillyness and partly as a joke, I hacked up a BASIC like syntax for TorqueScript.
As I understand it, it ended up in 1.4 partly becasue there were some generally useful changes to the console and partly because it might be useful one day.
It's important to note that TorqueBASIC is only TorqueScript with a different syntax. It is exactly identical to TorqueScript in every way other then syntax. This has some side effects that it's not really all that BASIC-ey in the traditional sense.
Because it was quite a while ago that I wrote it, the only "example" scripts are a TorqueBASIC version of tutorial.base from Torque 1.3. Note that 1.3's tutorial.base is quite different from 1.4's tutorial.base and there are no T2D examples. I have no idea if I still have the original code (and therefore, the ported tutorial.base) since I havent even thought about it for a good year or two.
Unless someone else has gone through the grammar and figured out the syntax for themselves, it's quite possible that I'm the only person that knows the syntax. Therefore, there are no docs and no other examples because there's nobody to write them.