Game Development Community

Torque script

by GAMEHACK3R · in General Discussion · 05/21/2007 (11:20 pm) · 23 replies

Im new to torque , just purchased TGE , and have found it very hard to find any indepth tutorials into torque script, from what i can gather torque script is ,for lack of a better phrase, "very weak". From what i can tell most game customisation ie player speed , has to be done via C++. I have not looked into doing the C++ side as i was hoping that since the TGE's torque script was suppose to be powerful i could do all of my coding in torque script instead of having to use C++ and TS.

I have completed quite a few of the tutorials, and have gone thru hundreds of posts in the last few days and i see over and over the use of C++, to get flexibility in my game am i going to have to rewrite in C++ or am i missing something ?? can Torque script provide a great degree of flexibility "out of the box" ?????

im trying to make the trasition from a C-script based engine which u could do everything with "out of the box" without any engine rewrite which came with great documentation (torques "out of the box" documentation is a little lacking). As many of u know , doing an engine rewrite takes a lot of time , where as using the higher lvl language takes very little time to modify your game to suit your needs.

i guess what i need is a "can and cant" do list of torque script, id prefer not to be spending countless hours trying to find/do things that just simply cant be done in torque script.
Page «Previous 1 2
#1
05/22/2007 (2:09 am)
I don't mean to be blunt, but I think you need to do some more research.

TorqueScript is probably the farthest thing from "very weak" that you can be.

Your first research area should be datablocks, and what (TorqueScript) changes can be made to control and modify the behavior of your objects. For example, you're comment about runspeed is directly controlled by a datablock for the Player class....it's a simple as setting a different value for the maxRunSpeed field.

What you probably need to understand is that TorqueScript is the equivalent of a person driving a car, while c++ is the car itself...the underlying electronics, engine, transmission, etc. You can use TorqueScript to have the "car" do things for you, like start the engine, put the transmission in drive, as well as customize your "car" with different tires, engines, suspension systems, etc.

Now, if you want to put a jet engine into a car, or make your car fly then you may need to look into c++ changes, and basically any major behaviors of a class that haven't been implemented by the class author will need to be written in c++, but if, for example, you are making an FPS game, there aren't many code changes you'll need to make in the long run. You may want to add resources, or modify certain things, but it's not a big deal to get touchy-feely with the code base with a little work.
#2
05/22/2007 (2:32 am)
@stephen it is quite true that i need to do more research , but as i said its very hard to find any indepth tutorials into torque script. And i am very new to the engine.
Are there any online tutorials or even better a manual ????? in regards to the finer points of torque script.
Can someone point me in the right direction

NB sor for double post, still nOOb to this.
#3
05/22/2007 (10:10 am)
Well there is that book that is perfect in your situation, torque from 10000 feet or w/e.

I bought that on Amazon but didn't get the disc *Help plz*
#4
05/22/2007 (10:17 am)
Question, is it possible to script flying SOLEY through script without making modifications in the actual Engine *I think player.cc or w/e*

Also: When will there be an update to TBE so it will compile 1.42 out of the box?
#5
05/22/2007 (10:23 am)
TBE is no longer supported and will not be updated for TGE 1.4.2. I recommend you use Visual C++ Express 2005 instead.
#6
05/22/2007 (10:37 am)
... I cannot. Is there another way? It's not cause I hate microsoft but I don't have SP1 or 2, nor do I have DotNET framework at home... *I use internet at company computer :)*

Stupid question: Why would you make something and then stop supporting it?
#7
05/22/2007 (11:00 am)
I would guess the answer is "because an all around better, free alternative became available". :)
#8
05/22/2007 (12:18 pm)
You could take TBE, 1.4.2, and the newest version of Eclipse and do all of the legwork yourself to get it up and running and compiling happily.

That's really the alternative to using VSExpress. If that's your inclination, then I would suggest hitting that full time for a while rather than making a game, because it's a nestle-ridden field, that.
#9
05/22/2007 (12:22 pm)
Quote:
Question, is it possible to script flying SOLEY through script without making modifications in the actual Engine *I think player.cc or w/e*

Flying what? Your question is so loosely defined that it really can't be answered.
#10
05/22/2007 (12:31 pm)
Ok lemme make it more clarical Steph. Can you implement flying, you know, jetting, you know; going vertical on the map instead of horizontal. I wanna do this using ONLY torque script, I don't want to jack with the engine at all, is this possible?
#11
05/22/2007 (12:50 pm)
You want a flying resource without engine changes. For aircraft/spacecraft, right? Or are you looking at things like hovercrafts or jetpacks? While they all deal in many ways with vertical movement, the implications of doing them are somewhat different.

It's been a while since I played with it, but the Bravetree Warsparrow pack has scripts for flying...and I think they are only scripts...no engine changes whatsoever.
#12
05/22/2007 (1:23 pm)
@James: Use the flying vehicle class.

My answer is as "complete" as your question is!

Do you want "flying", or do you want jetpacks, or do you want the ability to freely move in all 3 axes of motion, with accurate aerodynamics and one of the two main lift theories implemented to NACA accuracy?

You can implement a basic form of jetpacks with probably 2 lines of TorqueScript. Or, you can go whole hog and implement a very accurate flight modelling system in c++. Or, you can use a flying vehicle class and control those directly instead of players.
#13
05/22/2007 (2:20 pm)
Jetpacks bro, what are those 2 lines of torque script? :-P
#14
05/22/2007 (2:29 pm)
Why not use Tim's addition? It's extremely complete and well documented. Even a non-programmer could do it. You could do a number of things with the jump and movement in TorqueScript, but for a nice Tribesy jetpack experience, why not use Tim's resource?
#15
05/22/2007 (3:14 pm)
Doesn't it involve Compiling *something I cannot do at this point and time. I believe I posted that a few threads ago :P*
#16
05/22/2007 (5:29 pm)
Hehe wow ... lol
i see that this has gone a little south from what i originally posted ..

"Are there any online tutorials or even better a manual ????? in regards to the finer points of torque script"
#17
05/22/2007 (6:00 pm)
@GameHacker: there are 3 separate books that all cover scripting in depth.

@James: look at applyImpulse(). It's just one very easy (and very basic) solution.
#18
05/22/2007 (7:00 pm)
@stephen oh ok .. so there is NO manual or online tutorials ..



i dont understand why there isnt a manual for this product ... even a toaster comes with a manual
a 16 page tutorial , an incomplete TDN ... yes i am annoyed honestly
progress was fantastic in the first day of purchasing TGE.. the tutorials were well written and i convered alot of ground with the creation of missions and moding the starters .... but these only take you so far .. so i looked for something a little more indepth .... so here i am ... 4 days later ... with nothing

and by books i assume u are refereing to "games programmers guide to torque" , "3d game programming ALL in one" and "Advanced 3D Game programming"

i have checked for these books here in australia .. and they cost $95rrp , $104.95rrp $81.95rrp.
Thats a total of $281.90 for these books. Thats is more than the engine is worth.

im sorry for the rant but when i purchased TGE i assumed there would be proper documentation provided to use the product and that i would not have to outlay more money to get it.

So for people like myself who can not afford these books what are we suppose to do ???
#19
05/22/2007 (8:53 pm)
http://tdn.garagegames.com/wiki/Torque_Game_Engine#script

http://www.garagegames.com/docs/tge/general/ch05.php (Click next a few times and go over all of the docs here, quite exhaustive)

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5661

Edit: It would be nice if the forums could figure out links without having to enclose them in a url tag
#20
05/23/2007 (3:02 am)
TDN is the way to go, lots of info on there. It's still not complete (i.e. not every solution will be there) but it covers a lot of the stuff you will want.
Page «Previous 1 2