Yet Another Hello World Problem
by Damian Hart · in Torque Game Engine · 08/12/2005 (9:09 am) · 19 replies
Howdy all.
I purchased the Indie license to Torque, then went ahead and bought the book in order to have...a book...to use while undertaking this monumental learning process.
However, because I had the fully licensed program (and most likely the most up-to-date version) I installed Torque (and C++ et. al.) as shown here on the GarageGames site, aswell as JEdit (instead of the one in the book) . I run the example programs, such as First-Person-Shooter and Racing, and they seem to work fine.
So I start going through the book. I get to Chapter Two and "Hello World". Now, remembering that I don't have a 3DGPAI1 directory, I saved the HelloWorld.cs file to C:\Temp and gave it a go.
Issue 1: TGE is not a known command. I search the forums and finally see that what *he* is calling TGE is what we need to call "torqueDemo". Ok..fair enough.
Issue 2: I try substituting torqueDemo for tge....and it doesn't work at all. Hm. So I think, "Well maybe because TorqueDemo isn't in the temp folder with HelloWorld.cs. So I move it.
Issue 3: It doesn't work. So I think...well, maybe all those files that are in the examples directory are needed by TorqueDemo. So I move HelloWorld.cs there and try. It still doesn't work (although occassionally, even though I'm indicating HelloWorld.cs, it boots up the FPS demo.
So I do more research and I see someone mention "after you install from the book's CD, you should see a file called CH2". Hmmm.
He's using -ch2 as a switch of some sort (or so it seems to my completely novice eyes) and support for that switch seems to come from the files included with the CD from his book.
So, if I'm learning from the book, but didn't install from the book, how do I get the examples that we create to work with a site-based install? -ch2 doesn't appear to be part of the GarageGames install, so what do I do? Surely something as simple as HelloWorld should...work. What if I were to create something completely and wildly my own...how do I get TorqueDemo to find it, compile it, and run it?
Thanks for the assistance.
----Damian
I purchased the Indie license to Torque, then went ahead and bought the book in order to have...a book...to use while undertaking this monumental learning process.
However, because I had the fully licensed program (and most likely the most up-to-date version) I installed Torque (and C++ et. al.) as shown here on the GarageGames site, aswell as JEdit (instead of the one in the book) . I run the example programs, such as First-Person-Shooter and Racing, and they seem to work fine.
So I start going through the book. I get to Chapter Two and "Hello World". Now, remembering that I don't have a 3DGPAI1 directory, I saved the HelloWorld.cs file to C:\Temp and gave it a go.
Issue 1: TGE is not a known command. I search the forums and finally see that what *he* is calling TGE is what we need to call "torqueDemo". Ok..fair enough.
Issue 2: I try substituting torqueDemo for tge....and it doesn't work at all. Hm. So I think, "Well maybe because TorqueDemo isn't in the temp folder with HelloWorld.cs. So I move it.
Issue 3: It doesn't work. So I think...well, maybe all those files that are in the examples directory are needed by TorqueDemo. So I move HelloWorld.cs there and try. It still doesn't work (although occassionally, even though I'm indicating HelloWorld.cs, it boots up the FPS demo.
So I do more research and I see someone mention "after you install from the book's CD, you should see a file called CH2". Hmmm.
He's using -ch2 as a switch of some sort (or so it seems to my completely novice eyes) and support for that switch seems to come from the files included with the CD from his book.
So, if I'm learning from the book, but didn't install from the book, how do I get the examples that we create to work with a site-based install? -ch2 doesn't appear to be part of the GarageGames install, so what do I do? Surely something as simple as HelloWorld should...work. What if I were to create something completely and wildly my own...how do I get TorqueDemo to find it, compile it, and run it?
Thanks for the assistance.
----Damian
About the author
#2
It did something different, though. It opened a window that looked like a regular Windows-type window with "TorqueDemo.exe" in the title bar. The body of the window was black with a blinking cursor at the top. Can't type in the window, however. Otherwise....nothing.
I await the next inspiriation!
---Damian
08/12/2005 (6:50 pm)
Thanks for the help. Sadly, no go.It did something different, though. It opened a window that looked like a regular Windows-type window with "TorqueDemo.exe" in the title bar. The body of the window was black with a blinking cursor at the top. Can't type in the window, however. Otherwise....nothing.
I await the next inspiriation!
---Damian
#3
You have main.cs and torquedemo.exe in C:\Temp, right? Ok, now create a shortcut in C:\Temp that starts torquedemo.exe, and make it so that the starting directory is C:\Temp, then run Torque using that shortcut.
08/12/2005 (10:08 pm)
In C:\Temp, there should be a console.log. Look for errors in there. If the file is not there then I suspect that something else is wrong.You have main.cs and torquedemo.exe in C:\Temp, right? Ok, now create a shortcut in C:\Temp that starts torquedemo.exe, and make it so that the starting directory is C:\Temp, then run Torque using that shortcut.
#4
However, now I have a couple of other questions, which sort of cross forums, but I've gotta find the answers.
Book Related:
1: When I do Hello World from the book, the Torque-like window with the very, very hideous background graphic. Why is that there? I certainly don't want to create any sort of game or even test-program and have that monstrosity in the background.
Engine Related:
2: When I used the CD, it just created the folders and files and things worked (atrocious background notwithstanding). However, when I tried using the installer from here on the site, I follow the setup instructions and:
a: It installs.
b: I'm then told that I need to set it up for use with C++, either version 6 or 7. So, I "compile" either the vc6 or vc7 folders. This creates another folder called "examples."
c: Inside examples is a file called TorqueDemo (and sometimes TorqueDemo.DEBUG). And, from the replies above, it was suggested to substitute TorqueDemo for where the author uses tge.
d: (item d follows below)
But my question is:
If I've paid for the engine why do I have "demo"? Isn't a demo a......demo? I don't want, need, nor did I pay for a "demo." Where's the real thing? And, finally:
d: If there's more installing work to be done, perhaps the setup needs to be reworked. Of course, I may be totally missing things, but it seems like it says, "Install, Setup vc6 or vc7, compile the demo...Now Let's Play The Demo!" and never returns to setting up the REAL engine.
Am I missing something?
Thanks for the continuing assistance.
---Damian
08/17/2005 (8:49 am)
Nope. I've not had any luck. I finally uninstalled everything and just used the CD and that worked fine. Except of course, I now have a folder called 3DGPAi1 when I'd much rather have one called, say, Torque.However, now I have a couple of other questions, which sort of cross forums, but I've gotta find the answers.
Book Related:
1: When I do Hello World from the book, the Torque-like window with the very, very hideous background graphic. Why is that there? I certainly don't want to create any sort of game or even test-program and have that monstrosity in the background.
Engine Related:
2: When I used the CD, it just created the folders and files and things worked (atrocious background notwithstanding). However, when I tried using the installer from here on the site, I follow the setup instructions and:
a: It installs.
b: I'm then told that I need to set it up for use with C++, either version 6 or 7. So, I "compile" either the vc6 or vc7 folders. This creates another folder called "examples."
c: Inside examples is a file called TorqueDemo (and sometimes TorqueDemo.DEBUG). And, from the replies above, it was suggested to substitute TorqueDemo for where the author uses tge.
d: (item d follows below)
But my question is:
If I've paid for the engine why do I have "demo"? Isn't a demo a......demo? I don't want, need, nor did I pay for a "demo." Where's the real thing? And, finally:
d: If there's more installing work to be done, perhaps the setup needs to be reworked. Of course, I may be totally missing things, but it seems like it says, "Install, Setup vc6 or vc7, compile the demo...Now Let's Play The Demo!" and never returns to setting up the REAL engine.
Am I missing something?
Thanks for the continuing assistance.
---Damian
#5
I think you may have been better holding fire on purchasing the engine and just using the demo to get to grips with scripting. You can do quite a bit by just messing with the scripts.
08/17/2005 (8:59 am)
By paying for the engine, you have access to the source code of the engine so you can make whatever changes to it you want.I think you may have been better holding fire on purchasing the engine and just using the demo to get to grips with scripting. You can do quite a bit by just messing with the scripts.
#6
1: I have both the book and the downloaded engine.
2: When I follow the "Getting Started" steps from this website, I get the directories including a "demo" directory with the demo shooter and racing game. They seem to work fine.
3: When I type in the HelloWorld script, save it as HelloWorld.cs there is no response when I try to run it. I have put HelloWorld.cs in the same folder as TorqueDemo.exe, I have renamed main.cs to OLDMAIN.cs and renamed HelloWorld.cs to main.cs....and it doesn't work in any respect at all.
4: I have moved HelloWorld.cs and TorqueDemo.exe into a Test folder and attempted to run it...nothing.
5: If I wipe all that out and install from the book, then do HelloWorld.cs and run it...it works fine, although it has the trashy ugly screen background.
I'd like to use the downloaded engine and the "Getting Started" set up from here, but there seems to be steps--or at least clarifications--missing that's not letting the downloaded engine work.
My directory structure, leading to torqueDemo.exe is this: C:\Torque\SDK\example\torqueDemo.exe (there's a host of other directories and files, as well, but this is where torqueDemo.exe sits. I put HelloWorld.cs there as well. I noticed in the book that he used a switch-of-sorts in his command line: -ch2 which seemingly corresponds with the concept of "Chapter 2" which is where we are in the book and the name of the directory.
So, thinking that maybe it was needed, I changed-directory to the example directory and typed torqueDemo.exe -example HelloWorld.cs . The Shooter demo ran. So I then typed torqueDemo.exe HelloWorld.cs (without -example) and nothing happened at all.
If HelloWorld.cs is in the same folder as torqueDemo.exe (and we know that works), what do I have to do to get HelloWorld.cs (which is also in this directory) to run?
Thanks for the brain work!
---Damian
08/31/2005 (3:28 pm)
Thanks for the responses. Sorry to be tardy, but I've been away for a bit. But now I'm back, classes are starting up again...including the class for which I'm trying to get Torque up and running. I'm still not having any luck here, and I'm not entirely sure where the disconnect is. Let me rerun the steps again and see if it sparks any ideas.1: I have both the book and the downloaded engine.
2: When I follow the "Getting Started" steps from this website, I get the directories including a "demo" directory with the demo shooter and racing game. They seem to work fine.
3: When I type in the HelloWorld script, save it as HelloWorld.cs there is no response when I try to run it. I have put HelloWorld.cs in the same folder as TorqueDemo.exe, I have renamed main.cs to OLDMAIN.cs and renamed HelloWorld.cs to main.cs....and it doesn't work in any respect at all.
4: I have moved HelloWorld.cs and TorqueDemo.exe into a Test folder and attempted to run it...nothing.
5: If I wipe all that out and install from the book, then do HelloWorld.cs and run it...it works fine, although it has the trashy ugly screen background.
I'd like to use the downloaded engine and the "Getting Started" set up from here, but there seems to be steps--or at least clarifications--missing that's not letting the downloaded engine work.
My directory structure, leading to torqueDemo.exe is this: C:\Torque\SDK\example\torqueDemo.exe (there's a host of other directories and files, as well, but this is where torqueDemo.exe sits. I put HelloWorld.cs there as well. I noticed in the book that he used a switch-of-sorts in his command line: -ch2 which seemingly corresponds with the concept of "Chapter 2" which is where we are in the book and the name of the directory.
So, thinking that maybe it was needed, I changed-directory to the example directory and typed torqueDemo.exe -example HelloWorld.cs . The Shooter demo ran. So I then typed torqueDemo.exe HelloWorld.cs (without -example) and nothing happened at all.
If HelloWorld.cs is in the same folder as torqueDemo.exe (and we know that works), what do I have to do to get HelloWorld.cs (which is also in this directory) to run?
Thanks for the brain work!
---Damian
#7
1: I have both the book and the downloaded engine.
2: When I follow the "Getting Started" steps from this website, I get the directories including a "demo" directory with the demo shooter and racing game. They seem to work fine.
3: When I type in the HelloWorld script, save it as HelloWorld.cs there is no response when I try to run it. I have put HelloWorld.cs in the same folder as TorqueDemo.exe, I have renamed main.cs to OLDMAIN.cs and renamed HelloWorld.cs to main.cs....and it doesn't work in any respect at all.
4: I have moved HelloWorld.cs and TorqueDemo.exe into a Test folder and attempted to run it...nothing.
5: If I wipe all that out and install from the book, then do HelloWorld.cs and run it...it works fine, although it has the trashy ugly screen background.
I'd like to use the downloaded engine and the "Getting Started" set up from here, but there seems to be steps--or at least clarifications--missing that's not letting the downloaded engine work.
My directory structure, leading to torqueDemo.exe is this: C:\Torque\SDK\example\torqueDemo.exe (there's a host of other directories and files, as well, but this is where torqueDemo.exe sits. I put HelloWorld.cs there as well. I noticed in the book that he used a switch-of-sorts in his command line: -ch2 which seemingly corresponds with the concept of "Chapter 2" which is where we are in the book and the name of the directory.
So, thinking that maybe it was needed, I changed-directory to the example directory and typed torqueDemo.exe -example HelloWorld.cs . The Shooter demo ran. So I then typed torqueDemo.exe HelloWorld.cs (without -example) and nothing happened at all.
If HelloWorld.cs is in the same folder as torqueDemo.exe (and we know that works), what do I have to do to get HelloWorld.cs (which is also in this directory) to run?
Thanks for the brain work!
---Damian
08/31/2005 (6:46 pm)
Thanks for the responses. Sorry to be tardy, but I've been away for a bit. But now I'm back, classes are starting up again...including the class for which I'm trying to get Torque up and running. I'm still not having any luck here, and I'm not entirely sure where the disconnect is. Let me rerun the steps again and see if it sparks any ideas.1: I have both the book and the downloaded engine.
2: When I follow the "Getting Started" steps from this website, I get the directories including a "demo" directory with the demo shooter and racing game. They seem to work fine.
3: When I type in the HelloWorld script, save it as HelloWorld.cs there is no response when I try to run it. I have put HelloWorld.cs in the same folder as TorqueDemo.exe, I have renamed main.cs to OLDMAIN.cs and renamed HelloWorld.cs to main.cs....and it doesn't work in any respect at all.
4: I have moved HelloWorld.cs and TorqueDemo.exe into a Test folder and attempted to run it...nothing.
5: If I wipe all that out and install from the book, then do HelloWorld.cs and run it...it works fine, although it has the trashy ugly screen background.
I'd like to use the downloaded engine and the "Getting Started" set up from here, but there seems to be steps--or at least clarifications--missing that's not letting the downloaded engine work.
My directory structure, leading to torqueDemo.exe is this: C:\Torque\SDK\example\torqueDemo.exe (there's a host of other directories and files, as well, but this is where torqueDemo.exe sits. I put HelloWorld.cs there as well. I noticed in the book that he used a switch-of-sorts in his command line: -ch2 which seemingly corresponds with the concept of "Chapter 2" which is where we are in the book and the name of the directory.
So, thinking that maybe it was needed, I changed-directory to the example directory and typed torqueDemo.exe -example HelloWorld.cs . The Shooter demo ran. So I then typed torqueDemo.exe HelloWorld.cs (without -example) and nothing happened at all.
If HelloWorld.cs is in the same folder as torqueDemo.exe (and we know that works), what do I have to do to get HelloWorld.cs (which is also in this directory) to run?
Thanks for the brain work!
---Damian
#8
09/01/2005 (9:54 am)
...double post. Ick. Sorry.
#9
09/12/2005 (8:44 am)
Me to when i try to do it off the book it doesnt work for me. why is this guys?
#10
09/12/2005 (3:11 pm)
The TGE used in the book is version 1.2.2. You would be best to use the book CD and follow the install instructions from the book. There is a difference from TGE version 1.2.2 to version 1.3. When you read "Advanced 3D Programming All in One" it uses version 1.3.
#11
09/13/2005 (7:46 am)
Yah well i figured out how to get it to work. Damian Ill contacted you on how.
#12
I type in console exec("torque/SDK/example/helloword.cs");
09/13/2005 (6:00 pm)
Well i have try it off and it doesnot work for me.. i have the sam book 3d game programming all in one and the advanced 3dI type in console exec("torque/SDK/example/helloword.cs");
#13
I type in console exec("torque/SDK/example/helloword.cs");
09/13/2005 (6:11 pm)
Well i have try it off and it doesnot work for me.. i have the sam book 3d game programming all in one and the advanced 3dI type in console exec("torque/SDK/example/helloword.cs");
#14
09/13/2005 (8:19 pm)
Quote:]I type in console exec("torque/SDK/example/helloword.cs");if you typed that in as you say it won't work because it is HelloWorld... you forgot the "l".
#15
My program name is helloword.cs
it will not work ... if i use ("\\\torque/sdk/example/helloword.cs\\\");
I wll get a error missing file.
09/14/2005 (3:04 am)
Att markMy program name is helloword.cs
it will not work ... if i use ("\\\torque/sdk/example/helloword.cs\\\");
I wll get a error missing file.
#16
and i have try exec(./torque/sdk/example/helloword.cs);
still i get a error missing file.
09/14/2005 (3:09 am)
Sorry I use exec(torque/sdk/example/helloword.cs"); and i have try exec(./torque/sdk/example/helloword.cs);
still i get a error missing file.
#17
09/14/2005 (5:02 pm)
Ok my helloword.cs is working ... the helloword is compile from console
#18
09/26/2005 (7:20 am)
Ok I see some of you have got it working. May you tell me how you was able to get it to work?
#19
09/27/2005 (12:37 pm)
Please.
Torque Owner Unsung Zero
rename HelloWorld.cs to main.cs
Run torquedemo.exe
It should run just the same as if you had used the switch.