Game Development Community

Three new getting started articles posted to TDN

by Jason Cahill · in Torque Game Builder · 02/27/2006 (10:43 pm) · 18 replies

Hey everyone,

If you are new here and are looking for a place to start, I've just posted my first three TDN articles in a (hopefully long running series) aimed at helping you get up to speed with Torque Game Builder. You can find these off of both the main T2D page on TDN:

http://tdn.garagegames.com/wiki/Torque2D

Or, more specifically, you can check these out directly at:

http://tdn.garagegames.com/wiki/T2D/TGBTutorials/WindowsSystemSetup
http://tdn.garagegames.com/wiki/T2D/TGBTutorials/BuildingADebugVersion
http://tdn.garagegames.com/wiki/T2D/TGBTutorials/ConsoleHelloWorld

I've got more planned and in production, but for now, please feel free to enjoy these. I'd love comments and feedback. Enjoy!

#1
02/28/2006 (7:38 am)
Thanks a ton Jason!

I'll run through them tonight.
#2
02/28/2006 (8:31 am)
Wow - great startup tutorials!
#3
02/28/2006 (11:02 am)
Very awesome tutorials.
#4
02/28/2006 (5:44 pm)
Great tutorials. The windows setup one is exactly what I needed to know. I'm currently waiting for the windows SDK to install, zzzZZZZzzzz....
#5
03/01/2006 (12:47 pm)
I cant view them. I get a message saying i need to own T2D, which i do.
#6
03/01/2006 (2:32 pm)
@Kev
Make sure that it has loged you in to TDN, sometimes it goes on the blip and doesn't.
#7
03/05/2006 (12:36 pm)
That's awesome Jason (Y)

I'm getting an error on the "hello world" tut though :(

When I try to debug the main.cs script I created earlier I get the following pop up:

==================

Fatal: (d:\t2d\latest\engine\source\gui\core\guitypes.cc @ 351)


GuiControlProfile: Unable to find specified profile (GuiContentProfile) and GuiDefaultProfile does not exist!

==================

I can either Retry or Cancel.. When I retry T2D crashes..

As I'm totally new to the whole programming n coding I don't know what to do now :/
I don't know why I get this error.. I did everyting written in the tuts (I even did a complete reinstall of T2D)..

Please help..

Kevin
#8
03/05/2006 (12:42 pm)
Interesting. Wes is seeing the same problem in this thread: http://www.garagegames.com/mg/forums/result.thread.php?qt=40944

I'm terribly sorry for the trouble. I'll get it fixed as soon as I can get a consistent repro. Unfortunately, I'm not seeing this issue myself. Can you also try the things I've asked Wes to do in this other thread? Thanks for your help!
#9
03/05/2006 (1:55 pm)
Don't be.. You're doing something for the community! :)

Anyway I did what you asked that other guy.. errm Wes.. to do. Here are my results:

I did change the main.cs file in the game folder (I knew that, but checked it anyway..):
Line 77 stated:
case "-notools":

Line 179 said:
// Are they requesting we skip loading any editors?
else if ($Game::argv[%i] $= "-notools")

So then I tried running the "game" through cmd, I think that worked..
Result:

Hello, World!
T2D Engine (v1.1.0 [Beta#1.1]) initialized...

Popped up, in the same kind off box the cmd loads in.

Hope that helps,
Kevin
#10
03/05/2006 (2:42 pm)
Interesting... That was it working properly.

OK, now try this: T2D_DEBUG.exe -nocommon -notools -game sample-001-console_hello_world

I wonder if this blows up. In other words, I wonder if there is something wrong with a debug version that both of you built. That *might* mean that the problem is actually lurking in my "building a debug version" tutorial.

Lastly, please try updating your Torsion project to run T2D.exe instead of T2D_DEBUG.exe. If we could narrow this down to the debug build, that would be great!

Thanks again for your help.
#11
03/05/2006 (4:31 pm)
I have the exact same problem and similar error messages to the solution.

Here are the results:
*Both of these work fine in cmd(helloworld starts fine):
--T2D.exe -nocommon -notools -game sample-001-console_hello_world
--T2D_DEBUG.exe -nocommon -notools -game sample-001-console_hello_world
*Result when running Torsion with T2D-DEBUG.exe:
--Fatal: (d:\t2d\latest\engine\source\gui\core\guitypes.cc @ 351)
--GuiControlProfile: Unable to find specified profile (GuiContentProfile) and
GuiDefaultProfile does not exist!
*Result when running Torsion with T2D.exe:
T2D/gameScripts/initializeT2D.cs (15): Unable to find object: 'Canvas' attempting to call function 'setCursor'
T2D/main.cs (37): Unable to find function toggleLevelEditor
T2D/main.cs (39): Unable to find object: 'Canvas' attempting to call function 'setCursor'
T2D Engine (v1.1.0 [Beta#1.1]) initialized...

Hope I can help to solve this and make these tutorials a nice intro into TGB.
Thanks for your help and your tutorials!
#12
03/05/2006 (4:42 pm)
Hey Jason, I decided to post my reply in this thread to keep the issue a little more contained.

So I did what you said and ran the game through cmd, and like Kevin's it worked perfectly, no errors. Then I went back to torsion and tried again without changing anything... and it worked! (T2D and T2D_DEBUG). It's as if running it through cmd somehow kick-started it in torsion.

I've tried a few more tests in torsion, messing with the main.cs in the sample game folder and creating a workspace for the spacescroller game, and it seems to be running fine now.

I'm glad that it's working now, but I'd feel more comfortable knowing what was wrong to begin with.

Anyway, thanks for your help with this, and I hope this helps you to find the issue.
#13
03/05/2006 (5:50 pm)
Running it through cmd definitely doesn't fix Torsion for me. Tried it a few times now.
I sent a link to my games folder to jason@jecahill.com as you requested in the other thread. Maybe that helps

Finn
#14
03/05/2006 (6:27 pm)
Awesome! Thank you so much Finn! I extracted your files and have a consistent repro case. I'll get to the bottom of it.
#15
03/05/2006 (6:41 pm)
Found it... but, you are not going to believe it!

If you copy and paste the text from the article that has the command line params, it looks like:

-nocommon -notools -game sample-001-console_hello_world

but guess what? Only the first "-" character in front of "-nocommon" is actually a hyphen ascii character 45, the others are not "-"'s they are "em" dashes, ascii character 173. So, you copy, you paste into Torsion, it happily accepts it, and when you run and my code in main.cs parses the command line parameters it never sees the "-notools" parameter.

To fix your issue, simply go into the Torsion project properties and replace the "hyphen-looking" characters with hyphens. Pretty amazing!

I checked the source of the of the page and sure enough, inside the
 tag, totally imperceptible to the human eye was an "em" dash instead of a hyphen. I've fixed up the Wiki page so hopefully this will not afflict other users. This bug came courtesy of my word processor which converts hyphens to "em" dashes. I'm turning that feature off!

Anyway, thanks so much for everyone that took the time to help. And, thanks for your patience!

Jason
#16
03/05/2006 (7:02 pm)
Kudos to figuring that out, it works like a charm now.
Just for the record what texteditor did this or rather has this "feature" natively set on active?

Thanks for your dedication ;)

Finn
#17
03/05/2006 (8:25 pm)
Microsoft Word. It's designed for authoring documents, not code, so you have to be a little careful when including text that people might cut-and-paste. This was a great lesson for next time.
#18
03/06/2006 (3:14 am)
Great, glad i could be of help :)