Game Development Community

Section 14.4.4 Modify main.cs

by Ron Hiler · in Torque Game Engine · 12/30/2008 (5:51 am) · 4 replies

Okay, my first issue.

I'm using TGEA, for which I have an Indy license. So I did not install the Torque Demo as per 14.4.1, so perhaps that is messing up my format somehow. I'm using Windows Vista.

But anyway, I've run through the steps through 14.4.3, and have come to where the book wants me to modify main.cs. Unfortunately, it doesn't specifiy what directory it is talking about, and I gather there may be more than one main.cs!

At this piont, my MazeRunner directory only has a single main.cs in it, which is in the MazeRunner/prototype directory. The book instructs me to change line 6 from $defaultGame = "demo"; to $defaultGame = "prototype";

Yeah, there is no such line in main.cs at line 6 of the file, or for that matter anywhere in the file.

Is there some *other* main.cs I'm supposed to have, and if so, where is it, and why is it not where it is supposed to be?

Thanks for any pointers.

#1
12/30/2008 (7:23 am)
Okay, so I ran the NewProject executable in the Torque SDK directory, and thiat seems to have set things up the way TGEA likes them, I have the correct main.cs file now.

This was my first snafu with getting this book to work with the TGEA, but I'm sure it won't be my last (no fault to the author, since he wrote the book for a different version of the program). Is there a place to go that might ease the translation between the book and the TGEA? Has anyone set up anything?
#2
12/30/2008 (8:01 pm)
I have the same problem. Where can I find this executable?
#3
12/31/2008 (3:29 am)
Quote:I ran the NewProject executable in the Torque SDK directory

look in : (if you are on windows and install to the default destination) c:\Torque\TGEA_1_8_0\ "bottom of the screen". setupNewProject.exe
#4
12/31/2008 (7:24 am)
Keegan, it works using the NewProject executable, but I ran into problems with it (in that when I tried to make adjustments to the game as described in chapter 3 of the book, they didn't work). I think that is because the program is using data from the Template project as well as the data you are putting in, and they don't play together well. I don't know why that should be the case, but it definitlely did not work right.

You can go ahead and try it, but when you hit lesson 1 on page 72, don't be surprised if it doesn't work. What I got when I tried to load the png was a flat terrain with a bit of garbage instead of the nice cauldron. Then my player began to permanently fall (the spawn point was underneath the flat plane). Let me know if you get the same or if yours works okay.

In order to attempt to fix this, I started over and created a bare-bones Torque setup without any script. Basically, I took all the files from the directory

TGEA_1_8_0/Projects/Template/game

and moved them into a new empty directory I put at C:/MazeRunner. This included the subdirectories common, profile, scriptsAndAssets, shaders, and tools, as well as a number of files (including main.cs and Template.exe, among a few others). This is now the working directory. You can test it by runnning Template.exe and you should get the Template program (the guy with the shotgun facing the two towers).

I then deleted the scriptsAndAssets folder (this holds all the project specific data). I also renamed the executable to MazeRunner.exe. Then, I copied from the CD the directory MazeRunner/A_SettingUp/prototype into C:/MazeRunner, so now I have C:/MazeRunner/prototype and all the files and subdirectories that are in there.

You can now make the changes as discussed in the text in section 14.4.2 (you only need to add the DELML.bat file, the other one should already exist). Skip 14.4.3 (we already did that), and continue with 14.4.4 through 14.4.8.

You can then test it again by running MazeRunner.exe and you should get the MazeRunner prototype screen.

Now, in my case, I still have an issue. The large font is fine (the one that says "Maze Runner Prototype" across the top). but the fonts on the buttons to the left are all fubared. Pusing on them produces more screens with messed up fonts. So I have no idea what it it saying. Haven't figured that out yet.

The advantage of this is you then have exactly what the author expects and no extraneous stuff coming from the Template project. Now, will that fix the Lesson 1 issue? I have no idea. I'm hoping so. But until I get that font issue fixed, I can't continue.

Maybe between the two of us we can figure out how to get this working right :)