Are people not using script enough?
by Ian Omroth Hardingham · in Torque Game Engine · 03/26/2002 (12:26 pm) · 13 replies
Hi.
I own the Torque license but right now I'm working on a mod for Tribes 2. Having the c code as well as the tribes script code is invaluable and I would advise any T2 modder to shell out the (entirely reasonable) asking price just for the insight it gives to the way the console interfaces with the engine.
Anyway, on to my point. When trying to overcome some obstacles in my mod I've been looking at forum posts and tutes on GG. It seems to me like everyone is getting too caught up in the c and doing things there that they could do in script. Now don't get me wrong, I prefer c to the Torque Scripting Language, but if you are writing little add on features surely it would be best to do it in script wherever possible, as this means other people can use it in their script on their own customised builds of the torque engine.
Anyway, just my 2 cents.
I own the Torque license but right now I'm working on a mod for Tribes 2. Having the c code as well as the tribes script code is invaluable and I would advise any T2 modder to shell out the (entirely reasonable) asking price just for the insight it gives to the way the console interfaces with the engine.
Anyway, on to my point. When trying to overcome some obstacles in my mod I've been looking at forum posts and tutes on GG. It seems to me like everyone is getting too caught up in the c and doing things there that they could do in script. Now don't get me wrong, I prefer c to the Torque Scripting Language, but if you are writing little add on features surely it would be best to do it in script wherever possible, as this means other people can use it in their script on their own customised builds of the torque engine.
Anyway, just my 2 cents.
About the author
Designer and lead programmer on Frozen Synapse, Frozen Endzone, and Determinance. Co-owner of Mode 7 Games.
#2
hehe a function can go in the script .. a defenation of what a function is goes in code.
scripts are good for trying out new things .. a bad script ont compile correctly .. a bad line of code could crash an os.
04/30/2002 (11:26 am)
generaly the more math involved the more you should concider putting it in the code ... also datablocks are nice .. but if your calling a "object" every 30 game ticks for 5 differt versions of it , then creating a true class would serve to be much more functunal ... of course if i want to add a hud or just a few wepon mods than scripting is the way to go.hehe a function can go in the script .. a defenation of what a function is goes in code.
scripts are good for trying out new things .. a bad script ont compile correctly .. a bad line of code could crash an os.
#3
Let me reiterate: It is much easier to add something to an existing project in script than in code.
04/30/2002 (11:52 am)
I still think most people miss-understood what I was saying. In a lot of the little additions people are doing for Torque the relative slowness of script is simply not an issue.Let me reiterate: It is much easier to add something to an existing project in script than in code.
#4
I'll code it if I can, and use script as an alternative. Nothing wrong with that... heck, it's even faster in execution. I don't really mind the slower development times. I'm very patient.
I agree though. Many things released so far can be in script, but then again... what's the problem? Only people who might want to complain are the people who don't have access to the source, or just don't want to use C++.
04/30/2002 (12:11 pm)
Yep, and some people just like using C++ over script, or vice-versa.I'll code it if I can, and use script as an alternative. Nothing wrong with that... heck, it's even faster in execution. I don't really mind the slower development times. I'm very patient.
I agree though. Many things released so far can be in script, but then again... what's the problem? Only people who might want to complain are the people who don't have access to the source, or just don't want to use C++.
#5
I have the SDK and I like c, but I'm a tribes modder at heart and like to be able to try stuff out on that, which requires script and no c.
04/30/2002 (12:17 pm)
not quite ;)I have the SDK and I like c, but I'm a tribes modder at heart and like to be able to try stuff out on that, which requires script and no c.
#6
I haven't worked with script outside of javascript before, so I'm sure you can see why I prefer C++ in most cases.
04/30/2002 (12:43 pm)
Well then, it's just your preference :pI haven't worked with script outside of javascript before, so I'm sure you can see why I prefer C++ in most cases.
#7
04/30/2002 (5:13 pm)
sorry Matt, but that's not a hugely well defined argument.
#8
You like script more than C++, good for you!
I like C++ more than script... good for me!
No arguement there!
04/30/2002 (5:16 pm)
It's not an arguement. An arguement is when I feel I have to defend my practices or ideas against someone else's opposing view.You like script more than C++, good for you!
I like C++ more than script... good for me!
No arguement there!
#9
Generalized comments of "This could have" or "This should have" don't help much.
Specific examples of what you felt should have been done in script so the authors or others can comment on why they felt it should have been done in C++ is the only real way to discuss this.
Otherwise as Matt has said it's just a case of:
"You say Tomatoes.... I say Potatoes"
04/30/2002 (5:28 pm)
Could you give some examples of the things that were done in C++ that you feel should have been done in script?Generalized comments of "This could have" or "This should have" don't help much.
Specific examples of what you felt should have been done in script so the authors or others can comment on why they felt it should have been done in C++ is the only real way to discuss this.
Otherwise as Matt has said it's just a case of:
"You say Tomatoes.... I say Potatoes"
#10
My point is that you could write "c-script" which would be _exactly_ the same language as c but interpreted to some degree.
My main problem with most scripting languages is that you don't have to declare variables. The easy-typing is nice, but the constant trivial bugs caused by typos in variable names is horrible.
Writing a torque function in c requires less researching because you don't have to find out all the con-blahs that Dynamix used, and c is automatically more friendly to programmers.
So: I would write in c if that was the only choice, but it isn't. Script was included for a reason.
04/30/2002 (5:41 pm)
sorry, my point was that saying: "I don't like javascript thus I won't like Torque Script" is silly because "script" is almost as much of a generalisation as "imperative". Torque script is an imperative language, as is Java script, as is C.My point is that you could write "c-script" which would be _exactly_ the same language as c but interpreted to some degree.
My main problem with most scripting languages is that you don't have to declare variables. The easy-typing is nice, but the constant trivial bugs caused by typos in variable names is horrible.
Writing a torque function in c requires less researching because you don't have to find out all the con-blahs that Dynamix used, and c is automatically more friendly to programmers.
So: I would write in c if that was the only choice, but it isn't. Script was included for a reason.
#11
04/30/2002 (7:07 pm)
Script is there to make high level stuff easier. Like game logic, and weapon types.
#12
05/01/2002 (2:28 am)
indeed, and originally it was in there to make Tribes modable.
#13
When T1 was released the VOL file format was compleatly alien to everyone out there... The mission editor wasn't even advertised.
Kaptain Kickass and I both discovered and started posting and sharing information about the mission editor Dec/Jan after T1's release... after that a few people tried some attempts to get the VOL files extracted but there just wasn't enough information. Until the T1 skintools were released. After that pandora's box was open...
It was a stubborn box though LoL... KillerBunny aka Pat Wilson (You'll see him around here on GG) introduced us all to Dynamic HUD's. Me, IX-Savage1 and a couple others started doing weapon MODs and a couple Admin mods... then there was the whole Mephisto/Renegades debacle and most of us retired from server modding.
While that was going on Presto took the Dynamic HUD code that KB showed everyone and PrestoPack was born.. From there you got Zear (another GG member), Writer, CowBoy... VeKtOr and a few others... They pushed the client side scripting beyond it's limits and introduced things to the Tribes community that most people going into T2 took for granted.
There were also a few controversial things, AutoBeacon and Shiva being the 2 big ones.
Even now I don't think there are more than 4 people who know the VOL file format T2 and Starsiege used (they were different) outside of former Dynamix employees... let alone the PBMP and PBA formats.
05/01/2002 (2:57 am)
Umm... actually I don't know if the script in T1 was there to make it "modable". The trouble it took to get to it makes me say no.. T1 was never meant to be mod'ed.When T1 was released the VOL file format was compleatly alien to everyone out there... The mission editor wasn't even advertised.
Kaptain Kickass and I both discovered and started posting and sharing information about the mission editor Dec/Jan after T1's release... after that a few people tried some attempts to get the VOL files extracted but there just wasn't enough information. Until the T1 skintools were released. After that pandora's box was open...
It was a stubborn box though LoL... KillerBunny aka Pat Wilson (You'll see him around here on GG) introduced us all to Dynamic HUD's. Me, IX-Savage1 and a couple others started doing weapon MODs and a couple Admin mods... then there was the whole Mephisto/Renegades debacle and most of us retired from server modding.
While that was going on Presto took the Dynamic HUD code that KB showed everyone and PrestoPack was born.. From there you got Zear (another GG member), Writer, CowBoy... VeKtOr and a few others... They pushed the client side scripting beyond it's limits and introduced things to the Tribes community that most people going into T2 took for granted.
There were also a few controversial things, AutoBeacon and Shiva being the 2 big ones.
Even now I don't think there are more than 4 people who know the VOL file format T2 and Starsiege used (they were different) outside of former Dynamix employees... let alone the PBMP and PBA formats.
Torque Owner David R. Green
"C or Script"
Usage would depend on the impact to the game speed, script development time (ie: how long or complicated to script it), and whether the object was deemed to be a core component.
Scripts will run at a magnitude slower than C.
Scripting is supposed to make final game development (and mods) quicker.
If I have to spend a lot of time creating a script for something (for example a UI element such as a button), that may be best moved into C so that all subsequent usage of that component are easier to script (and benefit from C's faster execution speed).
I see a number of things done in scripts that I feel should be moved into C. :-)
David