Game Development Community

TorqueBASIC: A Scripting Language

by TechLord · in General Discussion · 07/13/2004 (11:48 am) · 143 replies

I love C++ (Torque) and TorqueScript. However, I'm very fond of the BASIC syntax as it was my very first programming language.

I've used other game development 'languages' which used a BASIC syntax and found them relative easy to get started. BASIC Game Dev Languages also have a large customer base. I can see TorqueScript with a BASIC syntax beneficial for Torque in this regard.

Sometime in the unknown future, I'm going to write a TorqueBASIC to TorqueScript Converter or TorqueBASIC Compiler for Torque.

Thoughts wanted.
#121
10/22/2004 (10:16 am)
Jeremy,

I agree that what Torque needs most is interactive scripting. I've purchased Torque, but haven't yet used it for projects. Other tools support a faster (instant) code-test cycle. The two important results of interactive coding are: better games through faster development iterations and more fun while developing.

To me, the goal should be to run Torque in one window and a script editor in another. Changes made to script should instantly (or very quickly) result in world/gameplay changes. Any parameter can easily be tuned while in-game. Any function can be tested as it's being written. Typos are flagged without stopping play or requiring an engine restart.

My vote for language used during interactive coding is Torque Script simply because there's so much existing work written in it. Also, language choice would be much less of an issue for new coders with interactive coding. Syntax errors would be much less punishing (not have to run through another code-compile-test) and proper solutions could be discovered quickly through trial and error. The environment would encourage users to try their own ideas.

Anyway, I'm just cheerleading and would like to hear more about your project. The screenshot above from Harold "LabRat" Brown looks very promising...
#122
10/26/2004 (4:08 pm)
My Categories and Keywords for TorqueBASIC are heavily inspired by Blitz3D's Categories.

TorqueBASIC Categories:

Shape
Interior
Terrain
Camera
Material (TSE)
Shader (TSE)
Music/Sound
File
String
Network
-TCP
-HTTP
-Message
GUI

TorqueBASIC Game Objects:

Emitter
Fragment
Projectile
Explosion
Trigger
Player
Vehicle
-Wheel
-Spring
Waterblock
Skyblock
#123
10/30/2004 (2:01 am)
Priority Shift. Guys TorqueBASIC goes to the back burner to make room for Torque Games.
#124
10/30/2004 (7:36 am)
The Basic language is an obomination and should be erased from history.
#125
10/30/2004 (8:15 am)
Don't say such a word about basic!
#126
10/30/2004 (10:17 pm)
You'll be pleasantly surprised by 1.4, then, I think... :)
#127
10/31/2004 (5:24 am)
Never again shall thou speaketh a foul word about the God that is BASIC!

QBASIC was my first language and then Blitz Basic which yes is VERY easy to use and yet VERy goood for making 2d games.

One more thing. It seemas like a lot of people dont like BASIC because it "teaches bad habits" the only really BAD habit is using goto. But It wont teach people to use tat if they just... dont use it. It really all comes down to the teacher
#128
10/31/2004 (5:33 am)
QBASIC Forever!!!!!!!!!!!!!!!!!!!!!!!!









Bob
#129
10/31/2004 (11:08 am)
Is it my imagination, or did someone delete a post of mine!!!!

Didn't know that Eric, seems a bit petty since I was just approving of some of the ideas commented on before, oh well..
#130
10/31/2004 (11:18 am)
.......?

Yes posts can be deleted without notification
#131
11/02/2004 (7:18 am)
I would love to see this.
#132
11/16/2005 (8:44 am)
Any word on v1.4 and TorqueBASIC? An entire market of BASIC using Indies are waiting, hehe...
#133
11/16/2005 (8:57 am)
Oh please dear god no.
I'm still trying to unlearn that language, here's a list of where I've used it.
Commodore 64
Atari
Apple IIe
GwBasic
QBasic
QuickBasic
Visual Basic
DarkBasic

About the time I moved to Visual Basic (Windows 3.1 days), I also learned Pascal, which is NOT, I repeat NOT a good idea, the code you produce moving from the one to the other is an abomination.
About the time Windows 95 launched, I started learning C/C++ it's been 10+ years or more since I wrote my first line of C.
Has anyone here ever actually tried to follow my coding style?
Exactly, you still can't after 10 years of me writing C and C++ code, I still have difficulty getting BASIC out of my system. PHP didn't make things a whole lot better in that department either.
I can read C and most other languages, but writing it is a whole different story, BASIC messed up the way I thought about programming for years and years.
#134
11/16/2005 (9:03 am)
Something more like blitz which is almost a basic/c hybrid including its entity system would be great. oldschool basic is pretty awful but when you get rif of the reliance on line numbers, and add functions, types/classes etc and proper debug tools you can do a lot with a well thought out basic.

Blitz3D is the only basic that seems any good for making games so far, the others like Darkbasic are pretty awful and not helped by an abundance of bugs and incompatibility issues :)
#135
11/16/2005 (9:32 am)
---
#136
11/16/2005 (9:42 am)
I love Blitz3D. In fact, its what I'm using now because I continue to struggle with Torque's Scripting and Art pipeline. TorqueBASIC will not replace TorqueScript but, compliment it.
#137
11/16/2005 (9:59 am)
So then are you going to be doing the TorqueBASIC?
#138
11/16/2005 (9:59 am)
Unfortunately, Not. Per Ben Garney - Employee Posted: Oct 30, 2004 23:17: You'll be pleasantly surprised by 1.4, then, I think... :)
#139
11/16/2005 (10:19 am)
I started writing games in Basic on a Spectrum... years ago. Even though it was slow, it taught me a few things.
From Basic, I went to Z80 Assembler, very hard to get my head around but eventually I got a simple game written
I went to C, wrote a game in that, was harder, but much faster than the interpreted spectrum basic.
Did some business languages... Foxpro, DBase stuff... no games..
Picked up Visual Basic, easy to use, Nice IDE but too slow for decent games.
Learned Object Pascal, Nice Language, Decent OO style.. ideally suited to Games.. but no industry support.
Picked up VB.net, mixed feelings about the .net thing.. but nice language.. not sure about games suitability.
Picked up C++, Nice and fast, lots of support, lots of examples, very complicated, very powerful, ideal for games.
Now we're thinking about TorqueBasic?... how things come around..

I want TorqueASM :-)
(kidding)


What I'm saying is, programming is a skill you develop by solving problems. You get to solve some problems easier using certain languages and some problems can only be solved using others. I think that to become a good all-round coder, you need to use lots of languages. Each of them has something to offer.

Off the top of my head...

My first language was Basic.. Spectrum basic. Interpreted, No functions, All Line numbers, Goto, Gosub evilness... single letter public scope variables... I loved it.

Going from Basic to ASM was a decision I made because I needed more performance from my old Speccy but I had to sacrifice ease of use, coding speed and readability and it taught me a lot which would help me later on in my career... like patience..

Going from ASM to C was a shock, I was used to controlling everything but then I had to allow C to do things.. but taught me about pointers, functions and procedural programming.. and introduced libraries.

C to Foxpro was a breeze... all the old Basic stuff with a direct connection to a database using SQL... similar to Torque engine and Torquescript

VB refined my coding and debugging skills and introduced classes

Object Pascal really nailed the Object Orientation lessons home, lessons I took to VB.net

After those, C++ became a good choice, I was mature enough not to make some of the easier mistakes and have been able to get into Torque fairly well.

Languages like Javascript and VBScript were a piece of cake, nothing new there.

Torque script is very similar C and Javascript, only new things are the interfaces to the engine.


So if TorqueBasic can help newer programmers to get into games by hiding some of the more complicated parts of game development and letting them solve the problems they need to, I'm all for it.

Then, when they're ready, they can learn TorqueScript and get more power from the engine, after that C++ and make engine mods themselves.

If they can do this all from within the Torque engine family, porting and enhancing their games as they mature, then we should see some very nice torque powered games coming out in a few years time.

My 2p
#140
11/16/2005 (11:15 am)
If basic is what you want, and you dont mind being stuck on Windows-only (for now), then give t2d.net a try. you can then write a game in whatever .NET language you desire (including VB)

OR, if you really want to wrote a torquebasic to torquescript converter... an easy way to do that would be via IL. check out .NET Reflector.