Starting with TorqueScript

Friendly conversations, and everything that doesn't fit into the other forums.
  • 1
  • 2
12 posts Page 1 of 2
Mitovo
Posts: 65
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Mon Dec 12, 2016 3:34 am
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!
LukasPJ
Site Admin
Posts: 310
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Mon Dec 12, 2016 8:36 am
The Torquescript language itself hasn't changed much.
Torsion is the best IDE, and it went open source so yeah I would recommend that.

Try looking at the wiki http://wiki.torque3d.org/wiki:_scripter-start

If you want to learn in relation to a project, try this tutorial, it is short and easy :
http://wiki.torque3d.org/scripter:coincollection
Mitovo
Posts: 65
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Mon Dec 12, 2016 1:33 pm
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?
Last edited by Mitovo on Mon Dec 12, 2016 3:32 pm, edited 1 time in total.
Johxz
Posts: 390
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Mon Dec 12, 2016 2:50 pm
Hi @
User avatar
Mitovo


MiToVo wrote: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

MiToVo wrote: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 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
Mitovo
Posts: 65
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Mon Dec 12, 2016 3:43 pm
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!

Johnxz wrote: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.

Johnxz wrote: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 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):

Code: Select all

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!
irei1as
Posts: 59
Joined: Fri Feb 27, 2015 5:13 pm
by irei1as » Mon Dec 12, 2016 8:22 pm
I recommend to get the .chm files of the script reference that you can get from
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.
Mitovo
Posts: 65
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Mon Dec 12, 2016 8:45 pm
irei1as wrote:I recommend to get the .chm files of the script reference that you can get from
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!
Mitovo
Posts: 65
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Mon Dec 12, 2016 8:51 pm
Johxz wrote:Hi @
User avatar
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.
Johxz
Posts: 390
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Tue Dec 13, 2016 6:10 am
MiToVo wrote: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 any of these videos. 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 video 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 (video) 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).

MiToVo wrote: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 in some videos ( :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
Mitovo
Posts: 65
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Tue Dec 13, 2016 1:15 pm
Johxz wrote:Not sure what you mean, you can use in a terrain, see any of these videos. 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 video 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.
  • 1
  • 2
12 posts Page 1 of 2

Who is online

Users browsing this forum: No registered users and 1 guest