Game Development Community

why custom scripting languages?

by Vijay · in Torque Game Engine · 10/10/2002 (12:42 pm) · 6 replies

I never quite understood why most games/engines try to introduce their own scripting languages. Doesn't it make sense to standardize on something like javascript which most people know and understand and which is powerful enough (object-oriented, etc.)?

Would something like that be useful for TGE?

#1
10/10/2002 (12:48 pm)
Nope, because the Torque scripting language is actually pretty damned powerful.
#2
10/10/2002 (1:02 pm)
It is powerful and strange. There is no type safety, you can add variables to C++ objects on the fly, execute strings, and don't have to (can't AFAIK) declare variables.

Adding script variables to C++ classes is nice, but are the rest really features? IMHO they are disadvantages since you are just BEGGING for typos to cause massive problems. If you execute strings, you'd better be very sure that the source is reliable.

So even though I don't know anything about Python I'm interested in TGEPython as an alternative.
#3
10/11/2002 (2:04 am)
These days there are many options in scripting languages... the decision to come up with a custom one better have a lot of ammunition...

Choosing an established language can have significant advantages... in terms of the language itself, userbase, documentation, functionality, libraries, active development, and in many cases execution speed...

Python is my language of choice... also there's LUA(small and FAST)... Ruby looks very similar to Torque's console system/scripting... Java has also been used successfully in production on Vampire Masquerade... I really don't like Java... but hey, they did it...

For my game, I need database and internet connectivity... Python makes it very simple to say embed a ftp client, dynamically generate HTML, connect to databases, etc etc... also it's dynamic nature has many possibilities for game logic

Of note: Quark and Blender both use Python as their script interface... as these are supporting technologies, well... we'll see now won't we :)

All things considered, I am very glad Torque's console system exists... it makes it easy to expand the engine outside of C++... for instance, a LUA binding would be TRIVIAL.. in fact, TGEPython's framework could be used to do this very quickly... I have done LUA binding work in the past.. very simple... very easy...

Just remember... Torque is awesome... and you'll be ok...

-J
#4
10/11/2002 (5:13 am)
TGEScript has the extra advantage of being married to the engine; for its role, this is a big plus. After all, modding aside, TGEScript was never designed to be like VB, where you're protected from yourself... It's really more of a mini-C++ so that bits of the game can be modified by others without giving them full run of the game source. (And do remember that when they wrote T2, Python et al weren't as well known or feature complete as they are now...)

But TGEPython is damn cool, and I'm gonna fold it into my source tree post-haste ;). I'm just saying that TGEScript isn't a bad decision or anything... quite the contrary.
#5
10/11/2002 (6:00 am)
Most standard scripting languages are very heavy and operating system dependant, so I can agree with writing your own. Better, Faster, Stronger is my motto.
#6
10/11/2002 (6:04 am)
There is a resource that implements Python support.