Chapter 6 and Chapter 20
by rwings8 · in Torque Game Engine · 11/15/2005 (9:55 am) · 7 replies
I've been having 2 problems with this chapter
My first being when I click on the connect to server I can't get anything to show up in the table.
The second is what is the thing that the book talks about on page 233. It says after you get it working to send it to friends. Send what the whole folder or just the exe
My first being when I click on the connect to server I can't get anything to show up in the table.
The second is what is the thing that the book talks about on page 233. It says after you get it working to send it to friends. Send what the whole folder or just the exe
#2
11/17/2005 (10:25 pm)
I can't get this to go either. I even tried the Alternate Chapter 6 to get the internet multiplayer server going to no avail. Been posting about it and no response, searched and can't find an answer. I don't think it works.
#3
---------------------------------------------------------------------------------------------------
In chapter 6 on page 226:
function MasterScreen::update(%this)
should be:
function ServerScreen::Update(%this)
and page 228:
Screen.Update();
should be:
ServerScreen.Update();
the way it's printed in the book it doesn't work because screen.update(); is calling screen::update(%this) which doesn't exist.
---------------------------------------------------------------------------------------------------------------
Next you need to make a button in menuscreen.gui that calls serverscreen. Basically I just copied and pasted one of the other buttons and changed it's position, command, and text. The one I used is:
new GuiButtonCtrl()
{
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "29 250";
extent = "110 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.setContent(serverscreen);";
helpTag = "0";
text = "Connect to Server";
groupNum = "-1";
buttonType = "PushButton";
};
Now for my own typo:
The one that killed me was in serverscreen.cs in the function:
function ServerScreen::queryLan(%this)
The first argument in
queryLANServers(
I had put 2800 instead of 28000. Of course it would never see it because it was always looking for the wrong thing! That extra zero was so hard to locate since my eyes just kept skimming over it. I did a lot of comparing of my own typed files and the files that are on the CD. They are different in some areas (I did not change anything to match the CD files). For some reason my own typed client version cannot see a dedicated server started from the CD. Also, the client version on the CD cannot see the typed dedicated server. I was trying to use them for troubleshooting to verify if I had at least one working properly but could not. They seem to be matched to eachother.
Also, the command I used to start my dedicated server was:
C:\Emaga6\tge.exe -dedicated -map control/data/maps/book_ch5.mis
The book is a little flakey on that line. On page 231 it says to use -map and on page 232 it says to use -mission. The -map delimiter is the one that works with the typed version. The -mission delimiter works with the CD version. So confusing. And umm, there's no book_ch6.mis file because all the files were copied straight over from the chapter 5 directory.
So anyway, I just wanted to let everyone know that yes, it is possible to get chapter 6 to work. I read a lot of posts addressing problems on ch6 but I never read one that said someone got it working using the book only.
11/17/2005 (11:15 pm)
OK I GOT IT TO WORK!! Wow was that ever frustrating. It stemmed from errors in the book and typos on my part. The error corrections I found in a forum post by Jesse Motes. I am still very new to forums and I don't know how to make a nice formal quote from people or put links so I'll just copy and paste.---------------------------------------------------------------------------------------------------
In chapter 6 on page 226:
function MasterScreen::update(%this)
should be:
function ServerScreen::Update(%this)
and page 228:
Screen.Update();
should be:
ServerScreen.Update();
the way it's printed in the book it doesn't work because screen.update(); is calling screen::update(%this) which doesn't exist.
---------------------------------------------------------------------------------------------------------------
Next you need to make a button in menuscreen.gui that calls serverscreen. Basically I just copied and pasted one of the other buttons and changed it's position, command, and text. The one I used is:
new GuiButtonCtrl()
{
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "29 250";
extent = "110 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.setContent(serverscreen);";
helpTag = "0";
text = "Connect to Server";
groupNum = "-1";
buttonType = "PushButton";
};
Now for my own typo:
The one that killed me was in serverscreen.cs in the function:
function ServerScreen::queryLan(%this)
The first argument in
queryLANServers(
I had put 2800 instead of 28000. Of course it would never see it because it was always looking for the wrong thing! That extra zero was so hard to locate since my eyes just kept skimming over it. I did a lot of comparing of my own typed files and the files that are on the CD. They are different in some areas (I did not change anything to match the CD files). For some reason my own typed client version cannot see a dedicated server started from the CD. Also, the client version on the CD cannot see the typed dedicated server. I was trying to use them for troubleshooting to verify if I had at least one working properly but could not. They seem to be matched to eachother.
Also, the command I used to start my dedicated server was:
C:\Emaga6\tge.exe -dedicated -map control/data/maps/book_ch5.mis
The book is a little flakey on that line. On page 231 it says to use -map and on page 232 it says to use -mission. The -map delimiter is the one that works with the typed version. The -mission delimiter works with the CD version. So confusing. And umm, there's no book_ch6.mis file because all the files were copied straight over from the chapter 5 directory.
So anyway, I just wanted to let everyone know that yes, it is possible to get chapter 6 to work. I read a lot of posts addressing problems on ch6 but I never read one that said someone got it working using the book only.
#4
When I start up a master server on my computer, it does not query at all.
Are you actually able to get an online game going with this code?
11/18/2005 (12:44 am)
I have gotten my version to query a master server on garage games. It comes back with a message that there are 0 servers.When I start up a master server on my computer, it does not query at all.
Are you actually able to get an online game going with this code?
#5
Binding server port to default IP
UDP initialized on port 0
LAN server ping: IP:Broadcast:28000...
LAN server ping: IPX:FFFFFFFF:FFFFFFFFFFFF:28000...
LAN server ping: IP:Broadcast:28000...
However, the dedicated server has this code in control/server/initialize.cs:
$pref::Master0 = "2:master.garagegames.com:28002";
Why would it need to know about the garage games master server? It's almost like the dedicated server is set up to do internet games but the client part will only search for games on a LAN. Anyone have any thoughts on this?
11/18/2005 (7:34 am)
I am definitely no expert on this but I think I remember reading a little about master servers in chapter 6. He briefly describes them and says that they are very "easy" to create but then decides it would be overkill for this example. I think this is a LAN only example but I have not confirmed it. When I start the client version and then click "connect to server" I get these messages in the console:Binding server port to default IP
UDP initialized on port 0
LAN server ping: IP:Broadcast:28000...
LAN server ping: IPX:FFFFFFFF:FFFFFFFFFFFF:28000...
LAN server ping: IP:Broadcast:28000...
However, the dedicated server has this code in control/server/initialize.cs:
$pref::Master0 = "2:master.garagegames.com:28002";
Why would it need to know about the garage games master server? It's almost like the dedicated server is set up to do internet games but the client part will only search for games on a LAN. Anyone have any thoughts on this?
#6
Player Name then a box. Then it shows the headings like Private? and screen name then a big white box
****************************************************************************
Also I'm still having troubles with how to send it to people and for it to work. I keep sending what I think it is and it doesn't work. I feel like I'm missing something very obvious. Should I send the whole folder?
Also last question in chapter 20 after I write the code for the tommygun and when I try to play it I keep getting the message:
DebrisData::load: Couldn't load shape "control/data/shapes/weapon/TommyGun/shell.dts"
Did any one else get this problem and if so how did you fix it and if not any ideas why I'm getting this message?
11/21/2005 (10:10 am)
I have all that but I still can't get anything to show up when I click the connect to server button. All it shows isPlayer Name then a box. Then it shows the headings like Private? and screen name then a big white box
****************************************************************************
Also I'm still having troubles with how to send it to people and for it to work. I keep sending what I think it is and it doesn't work. I feel like I'm missing something very obvious. Should I send the whole folder?
Also last question in chapter 20 after I write the code for the tommygun and when I try to play it I keep getting the message:
DebrisData::load: Couldn't load shape "control/data/shapes/weapon/TommyGun/shell.dts"
Did any one else get this problem and if so how did you fix it and if not any ideas why I'm getting this message?
#7
Correct the path to
~/control/data/models/weapons/NAME_OF_OBJECT.dts
01/13/2006 (7:34 pm)
This problem shows up in multiple pointsw in this file.Correct the path to
~/control/data/models/weapons/NAME_OF_OBJECT.dts
Torque Owner Michael Errico
So, let the search continue!