Jump to content

Starting with TorqueScript


Mitovo

Recommended Posts

Hello everyone,


Quick question here.


I've been eager to start learning programming, and would like to start with TorqueScript, as it will allow me to learn while also working on game-related projects.


1. First question, is there a setup folks would recommend to start with?


I have the old 3D Game Programming book, originally for Torque Game Engine (By Ken Finney, I think?), which is of course rather outdated, but I wonder if the language is effectively the same, or has it changed dramatically from TGE to T3D?


Or, would it be better to just learn with T3D?


2. And, would Torsion be recommended as THE go-to IDE to work with, or would something like TorqueDev be sufficient?


3. And finally (if the TGE option from question 1 isn't recommended), what beginner tutorials would you recommend to start with? Preferably something that puts the tutorials in context of a project, and not just "dry memorization".


Thanks for your time and input!

Link to comment
Share on other sites

Hi there,


Thanks for the info!


I think I'd seen some of those resources in my searching around, but I wasn't sure if everything was "complete", or relevant to the current version as I'd seen a lot of things in the past with either links to unfinished/uncreated wiki pages, or things referring to the old, non-open source T3D.


So those resources are all current, then. Cool, thanks!


So, I'm completely confused about the Torsion thing. You say it's open source, and I see it on GitHub, but the only binary download version they have requires a registration code, or otherwise you're just unlocking a trial.... That seems like they're still selling it. I've never seen a MIT licensed, open source project that still requires a purchase to use, and I can't find any kind of "universal registration" code or anything to unlock it. Am I looking in the wrong place?

Edited by Mitovo
Link to comment
Share on other sites

Hi @MiToVo

 

So, I'm completely confused about the Torsion thing. You say it's open source, and I see it on GitHub, but

Download Torsion from here: http://ghc-games.com/SC/Torsion.zip *1

 

I think I'd seen some of those resources in my searching around, but I wasn't sure if everything was "complete", or relevant to the current version

 

A lot of tutorials still relevant even from TGA or TGEA or T3D 1.2 of course you need to change a few thing if the tutorial use a very old version of the engine, either way you can use the book you have for learn TS, just remember use the same version of Torque that was provided in the book, and then you can use the new T3D version.


BTW :roll: Not sure if you saw this http://forums.torque3d.org/viewtopic.php?f=8&t=835 but you have plenty of tutorials and more stuff in the list, even you can learn from TS resources. Please give a peek... if you think you need something that is not on that list, send me a PM and I will updated or you can do a PR.


Some what related, I'm doing a few video tutorials here right now I don't have for TS, but I have in my roadmap add video tutorials for TorqueScript, so if you want to superscribe.


regards,

J


source:

*1

Link to comment
Share on other sites

First..


Apologies for the "cranky" tone of my previous post lol. I have to learn to not post before I'm fully awake and caffeinated. I'm still talking in my "need coffee pronto" voice at that point, and tend to sound irritated when I say things lol. Anyway!

 

Download Torsion from here: http://ghc-games.com/SC/Torsion.zip *1

 

Ah! So I was in the wrong place, then. That makes more sense.

 

A lot of tutorials still relevant even from TGA or TGEA or T3D 1.2 of course you need to change a few thing if the tutorial use a very old version of the engine, either way you can use the book you have for learn TS, just remember use the same version of Torque that was provided in the book, and then you can use the new T3D version.


BTW :roll: Not sure if you saw this http://forums.torque3d.org/viewtopic.php?f=8&t=835 but you have plenty of tutorials and more stuff in the list, even you can learn from TS resources. Please give a peek... if you think you need something that is not on that list, send me a PM and I will updated or you can do a PR.


Some what related, I'm doing a few video tutorials here right now I don't have for TS, but I have in my roadmap add video tutorials for TorqueScript, so if you want to superscribe.

 

I see! So, really, very very little has changed between versions, then. That's good!


I have looked around for tutorials, and found a lot, but again, since they referred to older versions of the engine, I figured they wouldn't be applicable/compatible with the current one. Glad that isn't the case.


I actually did install the 3DGPAI1 package and started to work with that. Right off the bat, though, I ran into trouble with the "hello world" tutorial. They have you typing (along with a bunch of comments):

 

function main()
{
   print("Hello World");
}

 

... which didn't work. I couldn't even get it to launch from command prompt (per the instructions) by typing that tge -ch2 HelloWorld.cs (maybe not exactly what's typed but I'm remembering off the top of my head here; don't have the book atm). Torque kept saying it couldn't find the file.


I tried running the code from inside the console, and it said that there's no function called Print. When I looked that up, I learned that there's no 'print' function in Torque Script. Then, that it was something unique to the version of TGE that installs with 3DGPAI1, which is what I was using, but it still didn't work, and I couldn't find anything else about it. Echo worked, but not Print, which is what the tutorial wanted me to use. So I just gave up and figured I'd wait to find out what I could about just going with T3D lol.


Not sure why Ken would be using commands that aren't normally included with TorqueScript, but I'm sure they had their reasons.


I wouldn't *mind* starting with an older version of TGE, as I assume it's a bit more "stripped down" without all the additional features of T3D. And if TorqueScript is effectively the same, then it should be useful, but... I can go with T3D all the same.


Anyways.. thanks again!

Link to comment
Share on other sites

I recommend to get the .chm files of the script reference that you can get from

http://forums.torque3d.org/viewtopic.php?f=25&t=751

There's a lot of info about classes, too. It's my main help guide for scripting.


For example you can get info about echo() that is the console print for torquescript.

 

Excellent resource! I'll keep that bookmarked. Thanks!

Link to comment
Share on other sites

Hi @MiToVo


Some what related, I'm doing a few video tutorials here right now I don't have for TS, but I have in my roadmap add video tutorials for TorqueScript, so if you want to superscribe.

 

You know, a little bit after I replied to your post, I went on YT to find some good T3D vids to listen to while working,and happened up on your Sketch Tool tutorials. Bummer that there's no voice-over (I can understand why, though, given your comments about editing, etc).


I'm checking them out now while on lunch and noticed something that hadn't 'clicked' with me before. I think every Sketch Tool video I've seen takes place on a flat, regular surface, not on a terrain. I think that might be the answer to something that's kept me from using it more in the past, as a 'mock up' tool.


I would use it on a terrain, and would find that the blocks were never aligned orthogonally on all axis. It would always be rotated or skewed on at least one, if not multiple, even if drawing from an orthognal view,like Top, etc. I'm going to guess that the way they're drawn out is determined by the slope of the surface they're initially created on and that's why that was happening?


If that's the case, then I'm a very happy camper, because I'd been wanting to use that tool more, but it always felt wonky to me.

Link to comment
Share on other sites

I'm checking them out now while on lunch and noticed something that hadn't 'clicked' with me before. I think every Sketch Tool video I've seen takes place on a flat, regular surface, not on a terrain. I think that might be the answer to something that's kept me from using it more in the past, as a 'mock up' tool.

 

Not sure what you mean, you can use in a terrain, see

. I have a basic level, all was made with some meshes and the sketch tool. Even you can use a texture for your sketches props. See this
and this blog


Some what related (sorry) with the latest merged PR this and this you can export to a collada all you sketches, all the extrudes for your object will "join" into one mesh

and then import into Torque3D or any 3D graphics tool like Blender3D, Maya or 3ds Max, etc.. so you have a very useful rapid prototype function, you can replace all your sketched objects into TSStatic object, this mean start using quickly for your gameplay (scripting or props).

 

Bummer that there's no voice-over (I can understand why, though......

Yeah I know :oops: pls any feedback are welcome, to try to overcome this I started using subtitles

( :lol: :lol: I know) this will not break my work flow (this means cover a lot of topic in a little time) and try to reach more people, so they can collaborate in their languages editing the subs.


EDIT: for the TorqueScript tutorial well yeah I'll be speaking explaining thing :lol: just to clarify this

Link to comment
Share on other sites

Not sure what you mean, you can use in a terrain, see

. I have a basic level, all was made with some meshes and the sketch tool. Even you can use a texture for your sketches props. See this
and this blog

 


Well, like I said in that post, any time I try to draw out a shape on a terrain with the sketch tool, it comes out wonky, crooked, etc. It just didn't want to maintain a flat, orthogonal orientation, even if drawing from one of the orthogonal views. I'm just noticing how if I start on a purely flat surface, that's never a problem. It comes out exactly as I would expect it to.


Here's an example...


Here, I've dragged out a brush on uneven terrain... - It comes out lopsided, sloping to match the angle of the terrain at that point.


Here, I've dragged it out on a flat plane, and so the brush itself is flat.


And just to be thorough, I flattened out an area on the terrain, next to the other one, and the brush comes out flat and straight again.

Link to comment
Share on other sites

Yeah, the sketch tool uses the normal of the surface clicked to orient the brush when creating it.

If you don't want that, currently, you can click the little cube icon in the top bar, and it'll make a 1m cube, 0 rotation. That would likely be useful.


For improvements, I could see a option/setting for conforming to the surface normal or not when creating new brushes.

Link to comment
Share on other sites

Yeah, the sketch tool uses the normal of the surface clicked to orient the brush when creating it.

If you don't want that, currently, you can click the little cube icon in the top bar, and it'll make a 1m cube, 0 rotation. That would likely be useful.


For improvements, I could see a option/setting for conforming to the surface normal or not when creating new brushes.

 

That could be useful, indeed. I have some other thoughts, having worked with it more, but I'll start a new thread for that, as I don't want to derail my own thread :p

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...