Game Development Community

GPGT Chapter 9 - Issues and Questions

by Edward F. Maurina III · in Torque Game Engine · 05/16/2006 (10:42 pm) · 20 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
09/20/2006 (10:37 pm)
Hi, :)
is it possible to directly edit the level file using text editor.
#2
09/21/2006 (7:05 am)
Yes, it's[.mis] basically just another script.
#3
09/21/2006 (7:56 am)
Thanks, but the level files of maze runner?
I opened it and found it to be i am not sure a binary code. I dont know how to edit it.
#4
09/21/2006 (8:17 am)
Hhhhmmm...., I just opened MazeRunnerAdvanced/mazerunner/data/missions/mazerunner.mis and it's a standard textbased file. The .ter file is indeed a non-edit flavour. It's the .mis file that contains all the objects and their locations...etc.

What file and it's path are you attempting to open?

The gameplay level building files are simple text file also?? The ones that 'build' the levels, with block type, etc...
#5
09/21/2006 (9:41 pm)

:)
Level Editor should be used :)
#6
10/27/2006 (12:03 pm)
@All Readers - 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

@Saurabh - Yes. You can edit the mission files (*.mis) with a normal text editor, and you can edit the Maze Runner Level files with a normal text editor (*.txt under the director ~/../LevelMaps/ ).

I do however suggest (in both cases) that you use the built in editors (TGE Mission Editor and MazeRunner Level Editor respectively).

www.hallofworlds.com/how.ico Hall Of Worlds - For Gamers
EdM|GPGT


Edit - Fixed name typo.
#7
11/03/2006 (12:20 pm)
Chapter 9 - page 349

small typo:

under //ts04(e);
in the comment: // Take %s0 our of SimSet 1

// Take %s0 out of SimSet 1
#8
11/17/2006 (10:18 am)
Hello,

First of all, I want to thank you for the excellent work on the book! It has been an incredible help. I bought my license a while back, and had not made a lot of progress digging in and finding my way. I am also quite excited by the little I have seen here about the upcoming Volume 2.

I have run into a few minor things, but I think most of them have been discussed and answered on these threads. However, I have one that I haven't seen yet. I think I may be running into the same issue as @Areal Person in this thread:

http://www.garagegames.com/mg/forums/result.thread.php?qt=44368

My problem is with the level loader code. I have hooked it into my prototype, but when I try to test it like is suggested on page 379 "buildLevel(0);", I get a bunch of console errors. The errors are of two kinds. The first says that FireBallBlock is not a member of GameBaseData (line 343 of levelloader.cs), even though it is derived from ShapeBaseData, which is a child of GameBaseData.

The next errors all appear to failure of registering items. I BELIEVE that both classes of errors are a context issue, as the code appears to be getting an empty string or a zero passed in as the ID. However, I am not really clear what to do about it, or if this error will really go away when the code is run directly from the game code.

My other theory was that the level0.txt file has characters in it that don't correspond to any blocks. For instance, there are a number of "X" characters in the "BLOCKS" layer, which isn't defined as an array index into $BLOCKNAMES[]. However, the blocks seem to form just fine, and "weird" characters should just cause the switch$() to just skip over that iteration, as there is no "default:" case defined. The blocks, teleporters, fade blocks, and coins all get created, but the player never moves to the spawn point (I'm not sure whether it is created or not).

I apologize for the length of this post, but I am trying be diligent in actually understanding what is going on in the wonderful scripts you have provided to us.

Thanks again,

Jim
#9
11/18/2006 (1:14 pm)
@Edward,

Even a great book cannot completely negate the power of a misspelling. I just sat down at my computer and in 5 minutes realized that the fireballs.cs file was not getting loaded (no .dso file). I checked game.cs and it was looking for "fireball.cs". Doh!

Thanks,

Jim
#10
01/03/2007 (2:18 am)
Page 379 of the book mentions "...type buildLevel(0);. your player should be moved to the extra block..."

This does not happen, and "unable to find object" errors occur in the console.

Page 13 of the downloadable Appendix E states:

Quote:Still in the file "MazeRunner/prototype/server/game.cs", locate the createPlayer() method and
modify the player creation code to look like this (BOLD lines are new or modified):
function GameConnection::createPlayer(%this, %spawnPoint)
{
//...
// Create the player object
%player = new Player()
{
dataBlock = MazeRunner;
client = %this;
};
//...

It is missing a line. After the part I just quoted, there is a line that reads

Quote:MissionCleanup.add(%player);

Directly after this line should be another line that reads

Quote:$Game::Player = %player;

This line was missing from game.cs (at least my version). I do not see where I missed any steps that would have caused this line to be omitted. In fact, after reviewing the original game.cs in the prototype folder (prior to any modifications), this line is missing. This was a real pain to track down (blame it on my noobness). :)
#11
01/07/2007 (2:36 am)
Ignore my last. This is mentioned in chapter 14, page 580. :)
#12
12/24/2007 (3:25 am)
Lol... yea a mere 200 pages after we are sposed to test it and read about what it "should" do.

Cmon man ... this book falls apart the more I read it. The content is for the most part quite valuable, but this thing needs another book just to document its errors. Author: I really think its a good try but please god before you let out volume 2 try getting someone to read thru it once or a zillion times cuz this one is to say the least 'quirky'.

anyway.. thanks joe for pointing that out before I went crazy and started killing puppies.

Harumph,
Neurosys
#13
12/26/2007 (1:26 pm)
Neurosys,

I understand what you're saying in your complaint above. The lessons can be confusing since, in some cases, you modify the code more than once as you read through the guide.

Please note, Volume 2 has a different method of testing your knowledge. This testing comes in the form of individual exercises (w/ answers given in a separate location). I hope that folks will find this easier to follow.

Meanwhile, I hope you are aware of the support page on my site.

http://gamers.hallofworlds.com/documents/44.html

Note: When time allows, I will be trashing the site and rebuilding it. At that time, this particular link will go dead. Notice that it is a direct link to a 'generated' page. So, in the future, you may want to go through the front page and then find help under my support page.

www.hallofworlds.com/how.ico Hall Of Worlds - For Gamers
EdM|GPGT
#14
12/27/2007 (7:14 am)
I, for one, am glad to see that Ed is back in action and that Volume 2 may yet become a reality. I like the idea of a book with a more "workbook" style so that we can see if we really understood the points being made. However, are you at all worried, Ed, about the relevancy of a volume 2 in light of Torque2?
#15
12/27/2007 (8:34 am)
I for one can't wait to read the new book. I loved the first book. I used it to learn torque scripting and it worked great for me. Any problems I had Ed was there to help me.

I think even with torque 2 coming out in the future the books will still be relevent as a lot of people have spent a lot of time and money on the other torque engines and likely will continue to use them for some time.

:D
#16
01/02/2008 (1:33 pm)
@Steve - That says a lot about my presence here. I must have seemed absent. :)

You ask about relevance and Torque 2.

I don't think the relevance of my books is related to Torque 2 and its release date, but rather to Torque and its life. That said, IMHO Torque still has some years of life left in it, especially since you have the source and can modify it at will. My second book will help you with that.

So, in short, I think the books are both relevant and will be for some time yet.

@mb - Thanks! BTW, I have NOT forgotten the feedback/contribution I got from folks on my first book. I've just been very slow to reward that feedback.

@all
As anyone reading this probably knows, I've been working on my second book (title still TBD). There should be an announcement about this soon, so I'll stop short of saying anything new here.

I also have been working on some other products which I think will be useful to the community. Again, specific announcements to come later.

Lastly, I've finally purchased an XBox 360 and am just now getting into XBox dev work. I also got a PS2 so I could take advantage of the large number of games available on that platform for cheap.

It is worth noting, even with these purchases, I'm still a PC gamer at heart, especially for FPS games, where I'm just not coordinated enough to use two joysticks and mash four buttons while occasionally tapping the d-pad for some extra feature. Give me WASD and the mouse any day.

www.hallofworlds.com/how.ico Hall Of Worlds - For Gamers
EdM|GPGT



Changes - I took out the word volume. GG, AKP, and I are still working out a good title for my second book.
#17
01/02/2008 (3:57 pm)
Very cool. I have already run into things I would like to change in the source code, and although i know some C++ I have been at a bit of a loss as to where to start digging into it. Volume 2 sounds like just what the doctor ordered.
#18
07/28/2008 (4:14 am)
Hey,

When i try to load the level loader using the console ( Buildlevel( 0 ); ) i get a whole bunch of error telling me that the getEntry command is unknown. Here is a sample of the error:

prototype/server/scripts/mazerunner/levelloader.cs (447) : Unknown command getEntry.
Object arrayobject(1802) arrayobject --> scriptobject --> simobject.

Help pls! :)
#19
07/28/2008 (4:16 am)
Hey,

When i try to load the level loader using the console ( Buildlevel( 0 ); ) i get a whole bunch of error telling me that the getEntry command is unknown. Here is a sample of the error:

prototype/server/scripts/mazerunner/levelloader.cs (447) : Unknown command getEntry.
Object arrayobject(1802) arrayobject --> scriptobject --> simobject.

Help pls! :)
#20
07/28/2008 (4:56 am)
Hey,

When i try to load the level loader using the console ( Buildlevel( 0 ); ) it seems to be unable to find some of the object:

prototype/server/scripts/mazerunner/levelloader.cs (456) unable to find object ' ' attempting to call function 'settransform'


prototype/server/scripts/mazerunner/levelloader.cs (458) unable to find object ' ' attempting to call function 'schedule'


prototype/server/scripts/mazerunner/levelloader.cs (459) unable to find object ' ' attempting to call function 'schedule'