Chapter 6
by Ken Finney · in Torque Game Engine · 06/30/2004 (12:50 pm) · 25 replies
I've verified that there is a problem getting client connection to the dedicated server working
with the code supplied on the CD. I'm looking at the book copy now. After I've confirmed *where* the problems are, I'll try to figure out what is going on, and post an update in this thread.
NOTE: for Macintosh & Linus readers: EmagaCh6KitInstall.exe has been repackaged in a zip file for you to download. Get it HERE
If any changes surface after debugging the current problem with the dedicated server, the revised code will be put into the above download.
with the code supplied on the CD. I'm looking at the book copy now. After I've confirmed *where* the problems are, I'll try to figure out what is going on, and post an update in this thread.
NOTE: for Macintosh & Linus readers: EmagaCh6KitInstall.exe has been repackaged in a zip file for you to download. Get it HERE
If any changes surface after debugging the current problem with the dedicated server, the revised code will be put into the above download.
About the author
#2
07/16/2004 (4:59 am)
Also, that same code block lists -map as a command line switch... yet the CD code lists -mission
#3
I got this to work using the same fixes used for chapter 5.
page 226: control/client/misc/serverscreen.cs
Change:
"function MasterScreen::Update(%this)"
to
"function ServerScreen::Update(%this)"
page 228 change the last line from:
"Screen.Update();"
to
"ServerScreen.Update();"
Last: add this to your MasterScreen.gui inside the bitmap control:
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "29 250";
extent = "120 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.setContent(ServerScreen);";
helpTag = "0";
text = "Connect To Server";
groupNum = "-1";
buttonType = "PushButton";
};
Tim: make sure that your script is compiling correctly. The line "breaks" in the book are not actually line breaks.
07/18/2004 (7:12 pm)
Fixes for you guys.I got this to work using the same fixes used for chapter 5.
page 226: control/client/misc/serverscreen.cs
Change:
"function MasterScreen::Update(%this)"
to
"function ServerScreen::Update(%this)"
page 228 change the last line from:
"Screen.Update();"
to
"ServerScreen.Update();"
Last: add this to your MasterScreen.gui inside the bitmap control:
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "29 250";
extent = "120 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.setContent(ServerScreen);";
helpTag = "0";
text = "Connect To Server";
groupNum = "-1";
buttonType = "PushButton";
};
Tim: make sure that your script is compiling correctly. The line "breaks" in the book are not actually line breaks.
#5
07/18/2004 (7:27 pm)
Also... remove the master server line from the first line of control/server/initialize.cs. It doesn't affect things, but it won't register your dedicated server with the garagegames master server. I have a feeling this was left in as part of the internet connection process.
#6
The CD has the file MasterScreen.gui but the book references it by the name serverscreen.gui (as does the header rem statements in the MasterScreen.gui file).
Also on page 199 (in Chapter 5 actually) 10th line down, the line is broken in two and the variable should be "%this.pickupName" and not "%this.pickUp-Name" no biggy but fer newbies they might get confused :)
07/19/2004 (4:40 pm)
A few notes The CD has the file MasterScreen.gui but the book references it by the name serverscreen.gui (as does the header rem statements in the MasterScreen.gui file).
Also on page 199 (in Chapter 5 actually) 10th line down, the line is broken in two and the variable should be "%this.pickupName" and not "%this.pickUp-Name" no biggy but fer newbies they might get confused :)
#7
That's where I'm stuck currently....
-Zach
07/29/2004 (5:19 pm)
I just wanted to be clear. Is the issue people are having related to being able to get the dedicated server to show up in the query window in the client?That's where I'm stuck currently....
-Zach
#8
I have been able to eliminate all the errors that cropped up including all the errors posted on the forum. I have tried every conceivable method including all the permutations of the following: running the install kit first, copying the CH 6 resources, copying the CH 5 resources, copying the files from disk, typing the files by hand, and every correction I have seen on the forum as well as some of my own.
My current version: No errors exept for 1 or 2 warnings in the console log that say something about not having any textures - I don't remember what they were, but they were the same warnings as for Chapter 5, which ran successfully. The dedicated server runs fine and says something about adding about 10 beasts and gives their object numbers. Then, when I run the client, I can play the game if I want to in single player mode, but I am not able to see a server called "Chapter 6 server..." or whatever it should be called when I select the option "Join Server" in the main menu. Consequently, I cannot select the server and cannot play with my compluter in client/dedicated server mode.
07/29/2004 (5:53 pm)
To be clear:I have been able to eliminate all the errors that cropped up including all the errors posted on the forum. I have tried every conceivable method including all the permutations of the following: running the install kit first, copying the CH 6 resources, copying the CH 5 resources, copying the files from disk, typing the files by hand, and every correction I have seen on the forum as well as some of my own.
My current version: No errors exept for 1 or 2 warnings in the console log that say something about not having any textures - I don't remember what they were, but they were the same warnings as for Chapter 5, which ran successfully. The dedicated server runs fine and says something about adding about 10 beasts and gives their object numbers. Then, when I run the client, I can play the game if I want to in single player mode, but I am not able to see a server called "Chapter 6 server..." or whatever it should be called when I select the option "Join Server" in the main menu. Consequently, I cannot select the server and cannot play with my compluter in client/dedicated server mode.
#9
07/29/2004 (5:54 pm)
Same here - ok, I feel better....sorta.
#10
1) Over the past few hours (it's 3 a.m. :rubseyes: ) I've verified that the CD copyable code for chapter 6 DOES work without modifications, for all three play modes, dedicated server, single player, and player hosted. I also tested this with the dedicated server running on a different computer on my LAN, and still no problems.
This is contrary to my first post in this thread. That test was done on my laptop, and that laptop has died a horrible death shortly after I posted that first test (where the CD copyable code in dedicated mode did NOT work).
Observations: My tests tonight were run on Windows XP Home Edition and Windows 2000. The earlier tests (my laptop) were done with Windows ME and Windows 2000. In both cases, the Windows 2000 computer only hosted in dedicated mode. So, there may be some issue there with WinME. But note that in the Windows ME laptop tests, the client did not find the server even if the dedicated server was run locally on the laptop.
2) Using the chapter 6 installer (EmagaCh6KitInstall.exe), I got the same results as in point 1 above. (except that I had NOT done the installer version test on the laptop).
The laptop is not currently in a functioning state, so I cannot replicate or expand on the Windows ME tests at the moment. I know that there are many people out there who are not having problems, so if you could chime in and tell me what OS you are using, so I can see if I can narrow this problem down. I have a couple of Win98 computers that I will also try to test on. If someone has WinME, a test and report from there would very helpful too (just use the chapter 6 CD copyable code or the ch 6 installer - don't bother typing in from the book)
3) Next step is to do the chapter 5 -> chapter 6 transmogrification and then re-test that on the XP system. Hopefully, that will take place tomorrow.
Thanks to everyone for their efforts to resolve this issue.
07/29/2004 (11:09 pm)
Hi guys. OK, a few things to report. 1) Over the past few hours (it's 3 a.m. :rubseyes: ) I've verified that the CD copyable code for chapter 6 DOES work without modifications, for all three play modes, dedicated server, single player, and player hosted. I also tested this with the dedicated server running on a different computer on my LAN, and still no problems.
This is contrary to my first post in this thread. That test was done on my laptop, and that laptop has died a horrible death shortly after I posted that first test (where the CD copyable code in dedicated mode did NOT work).
Observations: My tests tonight were run on Windows XP Home Edition and Windows 2000. The earlier tests (my laptop) were done with Windows ME and Windows 2000. In both cases, the Windows 2000 computer only hosted in dedicated mode. So, there may be some issue there with WinME. But note that in the Windows ME laptop tests, the client did not find the server even if the dedicated server was run locally on the laptop.
2) Using the chapter 6 installer (EmagaCh6KitInstall.exe), I got the same results as in point 1 above. (except that I had NOT done the installer version test on the laptop).
The laptop is not currently in a functioning state, so I cannot replicate or expand on the Windows ME tests at the moment. I know that there are many people out there who are not having problems, so if you could chime in and tell me what OS you are using, so I can see if I can narrow this problem down. I have a couple of Win98 computers that I will also try to test on. If someone has WinME, a test and report from there would very helpful too (just use the chapter 6 CD copyable code or the ch 6 installer - don't bother typing in from the book)
3) Next step is to do the chapter 5 -> chapter 6 transmogrification and then re-test that on the XP system. Hopefully, that will take place tomorrow.
Thanks to everyone for their efforts to resolve this issue.
#11
My *embarassing* revelation was that I had BlackICE enabled which was denying the query. I only post it thinking that it perhaps would assist others that have a similiar issue.
-Zach
07/30/2004 (1:46 pm)
Ok, mine works fine. Outside of the corrections that were listed above, I was able to connect without deviating from the book code. My *embarassing* revelation was that I had BlackICE enabled which was denying the query. I only post it thinking that it perhaps would assist others that have a similiar issue.
-Zach
#12
08/09/2004 (10:54 am)
Yeah, it was the firewall. Wow, that IS embarassing. Thanks, Ken and Zach.
#13
The issue I'm seeing with following these directions is that I don't get the masterserver screen when I simply double-click on tge.exe -- instead it starts (and plays) exactly like it did in chapter 5. I've deleted all the "*.dso" files under "c:\emaga6" and all subfolders, forcing everything to re-compile, but it still plays like the single player game (the dedicated server seems to be running just fine as it is sending hearbeats back to the gg master server).
In other words, I'm not getting the screen with the "Connect to Server" button -- I'm just getting the same "Start Game," "Setup," and "Quit" buttons like I did in chapter 5.
I've repeated this procedure 4 times now, but get the same results. Does anyone know why I'm not getting the multiplayer version for the client?
Thanks!
12/25/2005 (3:00 pm)
I chose the route desribed in both the book and in the "ALT_CH6.pdf" -- namely I copied over "c:\emaga5" to "c:\emaga6" and then made all the modifications as instructed in "ALT_CH6.pdf."The issue I'm seeing with following these directions is that I don't get the masterserver screen when I simply double-click on tge.exe -- instead it starts (and plays) exactly like it did in chapter 5. I've deleted all the "*.dso" files under "c:\emaga6" and all subfolders, forcing everything to re-compile, but it still plays like the single player game (the dedicated server seems to be running just fine as it is sending hearbeats back to the gg master server).
In other words, I'm not getting the screen with the "Connect to Server" button -- I'm just getting the same "Start Game," "Setup," and "Quit" buttons like I did in chapter 5.
I've repeated this procedure 4 times now, but get the same results. Does anyone know why I'm not getting the multiplayer version for the client?
Thanks!
#14
1) copied over c:\emaga5 to c:\emaga6
2) downloaded the ALT_CH6.pdf
3) copied the code changes/adds directly from the pdf
4) copied the book_ch6.mis from the cd to the same location as book_ch5.mis under c:\emaga6 area
5) made the following additional changes to control/client/client.cs:
Change this under LaunchGame():
createServer("SinglePlayer", "control/data/maps/book_ch5.mis");
...to this...
createServer("MultiPlayer", "control/data/maps/book_ch6.mis");
Change this under ShowMenuScreen():
Canvas.setContent( MenuScreen );
...to this...
Canvas.setContent( masterscreen );
6. At this point, I was able to start the dedicated server using the -mission syntax and it was sending heartbeats back to the GG Master Server. Also, double-clicking on the tge.exe now started up the server master screen after the splash screen as expected. However, I wasn't getting anything from the master server when I clicked "Query Master" I got this in my console log:
control/client/misc/masterscreen.cs (15): (null)::queryMasterServer - wrong number of arguments.
control/client/misc/masterscreen.cs (15): usage: queryMasterServer(...);
OK, so looking up the serverQuery doco, this is what I see:
void queryMasterServer ( U8 flags,
const char * gameType,
const char * missionType,
U8 minPlayers,
U8 maxPlayers,
U8 maxBots,
U32 regionMask,
U32 maxPing,
U16 minCPU,
U8 filterFlags,
U8 buddyCount,
U32 * buddyList
)
12 arguments... the code that we are given in the pdf looks like this:
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0,0,0);
12 arguments (and they seem to match up)
...so, now I'm stuck. I'm executing QueryMasterServer with the number of arguments that the documentation says I should be using -- but it's not working. I'm guessing this is something new in 1.4 that hasn't been updated in the doco or Ken's PDF yet...?
so, I'm still searching through the forums, but haven't found an answer yet (it looks like a LOT of people are stuck here).
12/25/2005 (3:46 pm)
This is how I got as far as I have in chapter 6...1) copied over c:\emaga5 to c:\emaga6
2) downloaded the ALT_CH6.pdf
3) copied the code changes/adds directly from the pdf
4) copied the book_ch6.mis from the cd to the same location as book_ch5.mis under c:\emaga6 area
5) made the following additional changes to control/client/client.cs:
Change this under LaunchGame():
createServer("SinglePlayer", "control/data/maps/book_ch5.mis");
...to this...
createServer("MultiPlayer", "control/data/maps/book_ch6.mis");
Change this under ShowMenuScreen():
Canvas.setContent( MenuScreen );
...to this...
Canvas.setContent( masterscreen );
6. At this point, I was able to start the dedicated server using the -mission syntax and it was sending heartbeats back to the GG Master Server. Also, double-clicking on the tge.exe now started up the server master screen after the splash screen as expected. However, I wasn't getting anything from the master server when I clicked "Query Master" I got this in my console log:
control/client/misc/masterscreen.cs (15): (null)::queryMasterServer - wrong number of arguments.
control/client/misc/masterscreen.cs (15): usage: queryMasterServer(...);
OK, so looking up the serverQuery doco, this is what I see:
void queryMasterServer ( U8 flags,
const char * gameType,
const char * missionType,
U8 minPlayers,
U8 maxPlayers,
U8 maxBots,
U32 regionMask,
U32 maxPing,
U16 minCPU,
U8 filterFlags,
U8 buddyCount,
U32 * buddyList
)
12 arguments... the code that we are given in the pdf looks like this:
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0,0,0);
12 arguments (and they seem to match up)
...so, now I'm stuck. I'm executing QueryMasterServer with the number of arguments that the documentation says I should be using -- but it's not working. I'm guessing this is something new in 1.4 that hasn't been updated in the doco or Ken's PDF yet...?
so, I'm still searching through the forums, but haven't found an answer yet (it looks like a LOT of people are stuck here).
#15
Here's the correct syntax:
// WRONG (this version is _everywhere_ )
// QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0,0,0);
// CORRECT
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0);
Now I can at least see the list of servers when I click "Query Master".
So now I can connect to the Master Server, Query Master server, and get a list of servers (including the dedicated one I have running)...
but it's not over yet. Now when I click "Join Server" it loads and lights the mission, but then gets a GPF:
Unhandled exception at 0x004f99b4 in tge.exe: 0xC0000005: Access violation reading location 0x00000078.
...looks like I'll have to re-compile the tge.exe that came with the CD :-D
12/25/2005 (5:05 pm)
Aha! The QueryMasterServer under 1.4 apparently uses 10 arguments instead of 12. Here's the correct syntax:
// WRONG (this version is _everywhere_ )
// QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0,0,0);
// CORRECT
QueryMasterServer(0,$Client::GameTypeQuery,$Client::MissionTypeQuery,0,100,0,2,0,100,0);
Now I can at least see the list of servers when I click "Query Master".
So now I can connect to the Master Server, Query Master server, and get a list of servers (including the dedicated one I have running)...
but it's not over yet. Now when I click "Join Server" it loads and lights the mission, but then gets a GPF:
Unhandled exception at 0x004f99b4 in tge.exe: 0xC0000005: Access violation reading location 0x00000078.
...looks like I'll have to re-compile the tge.exe that came with the CD :-D
#16
They're not the same :/
Chapter 5 TGE on cd: 2,928 KB, compiled 7/23/2003
Chapter 6 TGE on cd: 3,248 KB, compiled 2/23/2004
OK, so I overwrite the c:\emaga6\tge.exe with the one from the CD...
I'm getting a little further now, I can Query the GG Master Server (and see my own dedicated server), and I can click "Join Server" but my client session crashes with the same Unhandled Exception -- but now the dedicated server is actually doing something (it wasn't getting this far before). Here's the dedicated server log:
// Dedicated Server Log
Received info request from a master server [IP:216.116.32.49:28002].
Got Connect challenge Request from IP:199.199.230.217:1225
Got Connect Request
Connect request from: IP:199.199.230.217:1225
CADD: 1130 IP:199.199.230.217:1225
*** Sending mission load to client: control/data/maps/book_ch6.mis
<>
Mapping string: MissionStartPhase2Ack to index: 1
Ghost Always objects received.
Mapping string: MissionStartPhase3Ack to index: 2
Received info request from a master server [IP:216.116.32.49:28002].
<>
12/25/2005 (7:31 pm)
Aha Again! You would think that the TGE.EXE on the CD for chapter 5 and chapter 6 are the same, so when you follow the directions of "copy Emaga5 to Emaga6" then you should be running the same version of TGE.EXE.They're not the same :/
Chapter 5 TGE on cd: 2,928 KB, compiled 7/23/2003
Chapter 6 TGE on cd: 3,248 KB, compiled 2/23/2004
OK, so I overwrite the c:\emaga6\tge.exe with the one from the CD...
I'm getting a little further now, I can Query the GG Master Server (and see my own dedicated server), and I can click "Join Server" but my client session crashes with the same Unhandled Exception -- but now the dedicated server is actually doing something (it wasn't getting this far before). Here's the dedicated server log:
// Dedicated Server Log
Received info request from a master server [IP:216.116.32.49:28002].
Got Connect challenge Request from IP:199.199.230.217:1225
Got Connect Request
Connect request from: IP:199.199.230.217:1225
CADD: 1130 IP:199.199.230.217:1225
*** Sending mission load to client: control/data/maps/book_ch6.mis
<
Mapping string: MissionStartPhase2Ack to index: 1
Ghost Always objects received.
Mapping string: MissionStartPhase3Ack to index: 2
Received info request from a master server [IP:216.116.32.49:28002].
<
#17
12/26/2005 (12:47 pm)
Ok, I fiddeled around with my own version of emaga6 to no avail, so both my friend and I installed emaga6 to try to play each other online. I ran the dedicated server and played the game after connecting to that server, my friend's computer could not detect my dedicated server. How would we go about playing each other online?
#18
01/04/2006 (4:41 pm)
I cannot get my dedicated server to connect to the GG master server. It says "No master servers found." I'm using the shortcut provided by the CD. I've changed many things to make the rest of the alternative chapter 6 work. The masterserver window comes up when I click Connect to server now and I believe it does successfully connect to the GG master server, though no games show up. I just cannot get the dedicated server to do so also. I have no idea what to do...please help.
#19
Could not see server....
I have been using code directly from the CD. Studied the code but get all the scripts from CD to make sure modules were consistents with each other...
anyway I then used the EmagaCh6KitInstall.exe and all works fine.
I can start a dedicated server and connect to it with tge.exe
I probably should compare files between this install-files and my old-files
Now i want to try to connect to a GG server if one is up
Actually, not sure how to do that...
03/11/2006 (2:59 am)
Everything worked up to when trying to run tge.exe to connect to my previousely started serverCould not see server....
I have been using code directly from the CD. Studied the code but get all the scripts from CD to make sure modules were consistents with each other...
anyway I then used the EmagaCh6KitInstall.exe and all works fine.
I can start a dedicated server and connect to it with tge.exe
I probably should compare files between this install-files and my old-files
Now i want to try to connect to a GG server if one is up
Actually, not sure how to do that...
#20
07/26/2006 (1:15 am)
My tge cant seem to see my dedicated server ... anyone found out what needs to be changed if you copied over emaga5 or do i need to install emaga 6 and retest?
Torque 3D Owner Tim Muenstermann
Also, the book code and the CD code differ in variable scope:
The entry into the root main module (page 230) has a few different variable scopes than the CD.
I'm using WinXP O/S