Game Development Community

Tutorials - Hello World series

by John Vanderbeck · in Torque Game Builder · 04/07/2005 (1:16 pm) · 36 replies

In a similar vein to the MinApp tutorials I did for TGE, I have begun work on a series of "Hello World" tutorials for T2D. This will be extremely simple basic applications written totally from scratch in TorqueScript. As a result they will teach the basics of writing applications in T2D without the need to be confused or burdened by all the existing script code.

These will give a solid grasp on just what you really need and don't need in order to write T2D applications.

Expect to see Hello World1 later today.
Page «Previous 1 2
#1
04/07/2005 (1:29 pm)
As a recent purchaser (yesterday!) I look forward to these!!

A suggestion I have for your consideration would be to make the files available in a printer-friendly format. I'm building a little binder of T2D info and some of the stuff on this site is not very easily/cleaning printed.

Thanks in advance for the effort!

Mike
#2
04/07/2005 (2:21 pm)
I'd just like to say thanks for helping out here, it really does make a big difference.

Thanks again. :)

- Melv.
#3
04/07/2005 (2:57 pm)
Hello World 1 is finished but i'm gogin to hold off posting it until i've done at least #2 maybe #3 as well. Reason being Hello #1 ended up being even more basic than I thought (The whole thing is 3 lines of code).
#4
04/07/2005 (7:53 pm)
Looking forward to the tutorials :)
#5
04/07/2005 (8:02 pm)
#2 is almost complete.. Codewise.. but I still need to take it all and type it up into a tutorial. Soo it might not make it out tonight. All depends. If not tonight then defintly tomorrow. I want to take whatever time is neccesary to produce a very well written and in depth tutorial.
#6
04/07/2005 (9:24 pm)
Ok I have all the code written and completely documented for Hello World #1 and #2. At this point I haven't written the actual tutorials yet, but the code is very well documented. I'm going to post links to the zip files for #1 and #2 here for those that don't want to wait. The actual tutorials will be finished tomorrow. I just realized how late it was and I need to get to bed :)

Hello World #1 is EXTREMELY simple. Stupidly so. But it shows that you don't need a whole lot of hoopla to actualy work with Torque. The executable and one .cs file (main.cs) is ALL you need. The script is actually 3 lines of code not including comments. So ignore those peopel that tell you how you need this and that and that over there. Strip it all down and you really don't need anythign special to get up and running in Torque.

Hello World #2 takes a good step forward while retaining the simple approach. #2 actually loads up a game window with a basic static UI in it that displays Hello World from a PNG file. While this one actually uses a couple extra files, the "meat" of the game is all in 2 simple script files and like the previous tutorial shows how you don't need a whole lot of crap to get things up and running.

At this point neither tutorial actually uses T2D itself. We're still in base Torque right now, but #2 brings us right to the cusp and #3 will see us drop off into the lovely waters of Torque2D.
#7
04/07/2005 (10:43 pm)
Oh man, thanks tons for this. It's great to go through every basic default function in Torque 2D. I did have a couple of questions while going through Hello World 2, but I'll look them up to see if I can find the answer. Thanks!! this is GORGEOUS!
#8
04/08/2005 (6:49 am)
What were your questions?
#9
04/08/2005 (9:27 am)
Hello World #1 tutorial has now been completely finished. The link will take you to the tutorial text. While the previously released code is well documented, you will find the full tutorial text much more extensive. For a little 3 lines of actual code, the tutorial text ended up being suprisingly long :)

Comments and suggestions are MOST desired and welcome. I am working on the tutorial text for #2 now and it will be out sometime later tonight as it is MUCH more extensive and I do have other things to do on my day off :p
#10
04/08/2005 (2:47 pm)
John,

Thanks so much for taking the time to do this. By looking at HW2, I was able to answer a question I had been pondering (what files are needed to run a game - was not sure if the whole T2D bin/lib/etc. was needed or not. Obviously, thanks to you, I know it's not.) Reading the tutorial text for #1 also explains the main.cs in the executable dir, so I can say for one, that I've learned something very critical due to your efforts!!! :^)

For tut #1, you might want to mention how we can get help on the individual functions (ie. it looks like you cut/pasted the info on the logfile verbosity - where did that come-from?) That way, if you introduce a function, we can go read more about it.

Other than that, it's looking good and I await #2. The code in #2 is commented well and easy to read, so for me, the textual tutorial is just icing on the cake, but it's tasty icing!

Thanks again for taking the time to help us all!

Mike
#11
04/08/2005 (3:09 pm)
Quote:(ie. it looks like you cut/pasted the info on the logfile verbosity - where did that come-from?)

That info didn't come from anywhere cept my head :)
#12
04/08/2005 (3:51 pm)
OK then :^) How about a neural interface or barring that, perhaps a mention on where else someone can look-up the functions and their available options just for completeness?
#13
04/09/2005 (8:08 am)
Hi,

I would like to thank you John about your 2 tutorials. I like how you show us the way to use T2D. It is very very precise.
I hope to read your next tutorials #3, .....

Thanks again for these great tutorials

Michele
#14
04/09/2005 (10:02 am)
@John
Quote:What were your questions?

Ah, well, I found myself (in Hello World 2 in particular) wanting a breakdown of every line, instead of "this section does this". But I'm a special case :). I'm an ABSOLUTE beginner in both programming and scripting. Also, when I learn things, I like to learn the very basic elements.

The difference to me is like saying a sentence in French, then the same sentence in English, instead of saying a sentence in French, and breaking down the definition of each word and the grammar/sentence structure.

BUT, I read your text on Hello World 1. It did exactly what I was looking for. So this is a non-issue. Also, don't get me wrong, what you did put in this was extremely helpful to me. I think this type of tutorial is deeply needed. Just in my personal/perferable learning process, I break things down into the smallest elements so that I can build it back up from scratch.
#15
04/09/2005 (11:03 am)
Thanks. I'll keep that in mind as I write #2's text.
#16
04/29/2005 (8:53 pm)
I finally managed to finish the text on Hello World #2. A whopping 10 pages of tutorial fun. Here is a quick link fo rnow and i'll be submitting it as a proper resource in the morning. I'm just too tired to do it right now :)

Enjoy.
#17
04/30/2005 (6:57 am)
Ok the resources has been posted and is awaiting approval. In the meantime you can access it directly here.
#18
05/01/2005 (6:17 am)
Was this useful to anyone? It takes an awful lot of time and effort to make these so I would really appreciate it if people can let me know if they find them useful.
#19
05/01/2005 (1:54 pm)
Useful? How about indispensable!:) Tutorial #2 gives it like it should - to the point and very well explained - and it's not just for beginners either!:)
The info included will come in very handy, even for the seasoned T2D'er!:)
Although I have'nt really had a chance to read it thoroughly, I'm about to for its technical content - no lack of practical info here John - much appreciated!:)

Can't wait to see "Hello World" #3!:)
#20
05/01/2005 (5:52 pm)
Thanks Gabor. I know it sounds somehwat petty but I really need to know people find them useful to keep me motivated to do them. Like I said it is a lot of work and I don't want to be doing it for nothing :)
Page «Previous 1 2