Game Development Community

GPGT Chapter 4 - Issues and Questions

by Edward F. Maurina III · in Torque Game Engine · 05/16/2006 (10:41 pm) · 16 replies

Hello All. This thread is dedicated to any questions or issues that you may find in this chapter.

If you have issues and questions for other chapters, please post them in the appropriate thread:
Chapters 1 & 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14

GPGT Support Page
Appendix E. Maze Runner Lessons (Steps Only) - Covers Mac and Windows
OSX Executable - Use for GPGT Lesson Kit and MazeRunner

#1
07/01/2006 (12:17 pm)
Hi! I've got a few things I've noticed...

1.

On Page 133 in 4.4.1 the code says
Quote:
function GameBase::DoIt(%this) {
echo ("Calling StaticShape::DoIt() ==> on object" SPC %this);
}

It should be

Quote:
function StaticShape::DoIt(%this) {
echo ("Calling StaticShape::DoIt() ==> on object" SPC %this);
}

The paragraph below it also references to it being declared in the GameBase namespace, but the rest of the examples reference to it as being in StaticShape

2.

On page 136 in the second code block the book says

Quote:
// 3 - Call on stored datablock ID, must pass Obj ID
// Output: 123 Obj: 456

it should say

Quote:
// 3 - Call on stored datablock ID, must pass Obj ID
// Output: DB: 123 Obj: 456

3.

On page 138, figures 4.4, 4.5, and 4.6 are at the bottom of the page, and happen to sit right in the middle of the datablock code example, making it very confusing when you are reading through the code, because the figures look as if they are part of the text, I think they would work better at the top of the next page...

That's all for now, Thanks!

Ben
#2
07/18/2006 (7:30 pm)
I have a problem on page 118-119.

The part where there is a set of instructions on assigning the name of the player name. I followed it exactly.
but on trying the code called bt16(); I get an error on line 2 of the code:

$player_name = "myGuy";
$player_id = $player_name.getID(); <--- entering this in the console produces the error message:

" Unable to find object 'myGuy' attempting to call function 'getId' "

With that, I double-checked the player guy (the blue guy). It seems it doesn't apply the name I do when using the World Inspector even if I press the Apply button. When I remove the focus from that object and select it again, you'll still see a null name. What's wrong?
#3
07/19/2006 (5:37 pm)
@Ben
#1 - Yes, or vice versa, but the should at least match.

#2 - Good catch, marked for later revisions.

#3 - Noted. I don't have much control of this as it is a layout step (done by publisher), but i'll see what we can do on later revisions. Thanks.

@Andrei - There is a bug in this example. I will decide on a fix, update the errata document which can be found here, and re-post to this forum when the errata document has been uploaded.

www.hallofworlds.com/how.ico Hall Of Worlds - For Gamers
EdM|GPGT
#4
07/19/2006 (6:41 pm)
Thanks for the reply. I thought I am the one doing something wrong. Good thing I skipped it for a while.

I got another errata for you. On page 129, the note on the right side is incomplete. You can see the last two words in that note is "by the"
#5
07/19/2006 (7:21 pm)
@Andrei: You need to download the errata from his support page. The correction for page 129 is in the downloadable zip file as with other corrections.
#6
09/13/2006 (3:05 pm)
On page 132 lesson #2:

On the second part where its says to edit the onServerCreated() in "\MazeRunner\prototype\server\game.cs" as soon as I open the server part I do not see a game.cs script. Am I suppose to open the scripts folder as well which has a game.cs script file or am I over looking something. Thanks.
#7
09/17/2006 (1:42 pm)
I am assuming no one has had this problem but if someone can check really quick at what I am talking about it would be greatly appreciated. Thanks!
#8
09/18/2006 (11:07 am)
Yep, you want the game.cs in the ...server\scripts\ folder.

I saw that same mistake in a few other chapters (I think) or maybe in the PDF on how to setup Mazerunner. There's only the one game.cs that lives in the server subfolder so it makes it easy to find if there are any other mistakes.

-ner
#9
09/18/2006 (11:58 am)
Thanks for the reply I did not want to advance to the next topic doing something wrong confusing me in the future.
#10
10/27/2006 (11:45 am)
@All - I'm starting to answer ALL of my oustanding GPGT questions. It will take me a few days, so please bear with me over the weekend.

- Thanks

@Mark B. - Thanks for answering Andrei.


@Dan N - Thanks for answering Dwayne.

@Dan and Dwayne - You can get updated instructions for setting up the Maze Runner game here:

Appendix E. Maze Runner Lessons (Steps Only) - Covers Mac and Windows


www.hallofworlds.com/how.ico Hall Of Worlds - For Gamers
EdM|GPGT
#11
02/06/2007 (9:43 am)
In regards to the example in section 4.3.6, shouldn't I be able to access the value of junkvar from the console once I call createDB() by using the format: "echo(1656.junkVar);"


// create a StaticShape using a datablock
datablock StaticShapeData( MyFirstDataBlock ) {
shapeFile = "~/data/shapes/3dtorquelogo/torque_logo.dts";
junkVar = "helloworld";
};

// create object that uses the above datablock
function createDB()
{
new StaticShape() {
dataBlock = "MyFirstDataBlock";
position = "0.0 0.0 0.0";
rotation = "1 0 0 0";
scale = "1 1 1";
};
}
#12
02/14/2007 (9:48 pm)
Is there an update on the bug on page 119, as posted by Andrei above?

When I attempted to give the character a name as instructed (I followed all the steps above), it gives the following error in the console:
(0): Unknown command apply.
Object inspector(2318) inspector -> GuiInspector -> GuiStackControl -> GuiControl -> SimGroup -> SimSet -> SimObject

The errata is still dated from May of last year and offers no new information on this but to follow the instructions.
#13
05/08/2007 (11:48 am)
I get the exact same thing as Dianna Xu above me and I don't see any fix for this in the errata doc I downloaded.

Edit: I just wanted to add I'm having an issue with syntax errors in the GPGT Lesson kit. Let me start off by saying that I'm used to C++ and using VS 2005 Pro. The specific problems I'm having is on actually how to type the code in.

An example of this is(from page 123 in section 4.3.8):

package DemoPackage1 {
function demo() {
echo("Demo definition 1");
}
};

Obviously I can not type this into the command console exactly like this. If I try to type it in complete on one line, as is, I get syntax errors. Am I missing something?

Thanks in advance for any help provided.

Second edit: One other thing I'm finding a problem with is the continued use of the "~" key. As far as I can see it is not possible to use in either Torque or the GPGT Lesson kit, except for in the Sample Script Console.
Or am I wrong and you are able to use this symbol in Torque Script? It just seems to me that not knowing in which actual program you are using these aexamples gets a bit confusing and is very counter productive.
#14
07/28/2007 (2:25 pm)
This is happening to me too. I have to skip over everything about datablocks because it's not being clear on exactly where I'm supposed to be typing all this stuff in. On page 121, when you start telling to type in examples, it doesn't say where. In the '~' console? There isn't enough room, because there is only one line. Are you talking about the sample script console? That doesn't actually load any datablocks. Not only this, there isn't any documentation on how to actually *use* the sample script console.

What is the difference between the "execute" and "eval" button. What is the system doing when we press either if them?

Why am getting an error when I push the previous or next button. It's attempting to load something. What is it trying to do?

What does "quieter" suppress?

The tips are odd. On page 122, it has a tip and it starts with "Do you see what happened?" Well, no, I didn't was I supposed to type that in somewhere? I Doing anything gives me an error in the script console. I get what the console is saying. It's telling me it can't find any databocks. Well, yea. There aren't any loaded. Am I supposed to load one? How do I do that. which .cs form is it that I'm supposed to be loading. Why couldn't you have the system do that automatically?

Now I'm skipping packages. That looks useful, but once again doesn't work. Page 123. "Simply start the lesson kit and open the console (~) and follow the instructions.

The forth line down has an open bracket. That bombs in the console. How do you do multi-line commands in the console? Use the example console? How do I load my databocks?

Chicken-egg-chicken-egg

This is so unbelievably frustrating. The whole book was written like you had no idea what was going to be on the CD. It also seems that after you were done, you never re-read the book, following the examples from scratch to make sure everything was correct. I don't mean to gripe, but for the love of Mike, this would be wasting massive amounts of development time if you gave a programmer this book and said, "learn this"

If you switched the whole underlying lesson syllabus halfway through from starter.fps to the example missions, you really should of started over again. It saves your poor readers the headache to figure out what on earth you are talking about.

I'm going to plod on, as I've already made the investment. I'll see what I can come up with.
#15
10/16/2007 (4:57 pm)
Does anyone know if this stuff works with TGE 1.5.2? I am having a few problems. At the moment, specifically, I am having trouble with the console. it comes up in such a fashion that I can not type in it, ie , I cannot see the command line. Can anyone tell me why this is?
#16
10/17/2007 (6:01 am)
Steven I remember having that problem a while back. There is a way you can expand the Windows. I do not recall right now because I am at work but I think it is posted somewhere in the forums.