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
#22
The following steps are:
Those above results are got from copy and paste from "ALT_CH6.pdf" and
reference from the thread Topic: Solution: Alternate Chapter 6 and TGE 1.4 by
Darrel Cusey.
And now I changed in c:\Emaga6\control\server\initialize.cs like this:
function InitializeDedicatedServer()
{
EnableWinConsole(true);
Echo("\n--------- Starting Dedicated Server ---------");
$Server::Dedicated = true;
// if ($mapArgument !$= "") {
CreateServer("MultiPlayer", "control/data/maps/book_ch6.mis");
// }
// else
// Echo("No mission specified (use -mission a)");
}
And in c:\Emaga6\main.cs, I changed like this:
case "-mission":
$argumentFlag[%i]++;
if (%nextArgExists)
{
$missionArg = %nextArgument;
$argumentFlag[%i+1]++;
%i++;
}
else
Error("Error: Missing argument. Usage: -mission");
Then run the dedicated server by behind c:\Emaga6> typing in this command:
tge.exe -dedicated -mission control/data/maps/book_ch6.mis
Next, double-click tge.exe icon to start up the client. After click , it will go
directly into the Query Master screen. Then close it . It will go back to Menus screen,
Then click the "Connect To Server" button. Look for the 3DGAPi1 server name as Book
"All in One" says. Select that server entry, and then click "Connect" button.
Then the game launches.
10/02/2006 (2:41 am)
Now I only succeeded in Lan Server: IP:Broadcast:28000.The following steps are:
Those above results are got from copy and paste from "ALT_CH6.pdf" and
reference from the thread Topic: Solution: Alternate Chapter 6 and TGE 1.4 by
Darrel Cusey.
And now I changed in c:\Emaga6\control\server\initialize.cs like this:
function InitializeDedicatedServer()
{
EnableWinConsole(true);
Echo("\n--------- Starting Dedicated Server ---------");
$Server::Dedicated = true;
// if ($mapArgument !$= "") {
CreateServer("MultiPlayer", "control/data/maps/book_ch6.mis");
// }
// else
// Echo("No mission specified (use -mission a
}
And in c:\Emaga6\main.cs, I changed like this:
case "-mission":
$argumentFlag[%i]++;
if (%nextArgExists)
{
$missionArg = %nextArgument;
$argumentFlag[%i+1]++;
%i++;
}
else
Error("Error: Missing argument. Usage: -mission
Then run the dedicated server by behind c:\Emaga6> typing in this command:
tge.exe -dedicated -mission control/data/maps/book_ch6.mis
Next, double-click tge.exe icon to start up the client. After click , it will go
directly into the Query Master screen. Then close it . It will go back to Menus screen,
Then click the "Connect To Server" button. Look for the 3DGAPi1 server name as Book
"All in One" says. Select that server entry, and then click "Connect" button.
Then the game launches.
#23
but it is on top of the Start Game button (i can of course just move it), but upon clicking on it nothing happens, apart from an error msg in the console: "SetContent(): Invalid Control: ServerScreen"
Please, what is the problem here?
05/01/2007 (1:31 pm)
Sorry for Thread Digging a long dead thread, but I am having the same problem as Tim, so I tried Jeff Ward's Solution to the problem, however, now the dedicated server DOES run and I do have a Connect to Server button (albeit the fact that I pasted the code in MenuScreen.gui instead of MasterScreen.gui, since there was no latter file).but it is on top of the Start Game button (i can of course just move it), but upon clicking on it nothing happens, apart from an error msg in the console: "SetContent(): Invalid Control: ServerScreen"
Please, what is the problem here?
#24
That error means that the GuiCanvas (the main drawing area of Torque) is trying to set the content on the canvas (what you see as the main screen content) and it's not finding the content named 'ServerScreen'.
This could be for many reasons, for example, having the proper server screen .gui file and not executing it so it doesn't exist in Torque simulation, or having a similar gui that is executed but is called something different, like GuiServerScreen or some such.
I'd suggest you hit F10 and open the GuiEditor then in the middle drop-down on the toolbar that lists the current 'Content' click it and see if you have a gui in the list called ServerScreen.
Sorry this isn't more informed, but i'm merely guessing at your issue.
Cheers,
-Justin
05/03/2007 (9:10 am)
Mark,That error means that the GuiCanvas (the main drawing area of Torque) is trying to set the content on the canvas (what you see as the main screen content) and it's not finding the content named 'ServerScreen'.
This could be for many reasons, for example, having the proper server screen .gui file and not executing it so it doesn't exist in Torque simulation, or having a similar gui that is executed but is called something different, like GuiServerScreen or some such.
I'd suggest you hit F10 and open the GuiEditor then in the middle drop-down on the toolbar that lists the current 'Content' click it and see if you have a gui in the list called ServerScreen.
Sorry this isn't more informed, but i'm merely guessing at your issue.
Cheers,
-Justin
#25
05/03/2007 (9:18 am)
Will try it out :)
Torque Owner Kon Fun Sandy Lee
I tried to run the dedicated server, but it says:
Error: Unknown command line argument: -dedicated
Error: Unknown command line argument: -mission
Error: Unknown command line argument: control/data/maps/book_ch6.mis
Loading compiled script common/main.cs.
Missing file: common/defaults.cs!
Loading compiled script control/main.cs.
Loading compiled script control/client/presets.cs.
Loading compiled script control/server/presets.cs.
++++++++++++ Loading Add-ons ++++++++++++
Engine initialization complete.
%
--------- Initializing MOD: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.
%
++++++++++++ Initializing control module ++++++++++++
Loading compiled script control/client/initialize.cs.
Loading compiled script control/server/initialize.cs.
%
++++++++++++ Initializing module: emaga6 server ++++++++++++
Loading compiled script common/server/audio.cs.
Loading compiled script common/server/server.cs.
Loading compiled script common/server/message.cs.
Loading compiled script common/server/commands.cs.
Loading compiled script common/server/missionInfo.cs.
Loading compiled script common/server/missionLoad.cs.
Loading compiled script common/server/missionDownload.cs.
Loading compiled script common/server/clientConnection.cs.
Missing file: common/server/kickban.cs!
Loading compiled script common/server/game.cs.
Loading compiled script control/server/server.cs.
% %
--------- Starting Dedicated Server ---------
No mission specified (use -mission
%
And double-click tge.exe icon, there runs the command prompt says:
Loading compiled script common/main.cs.
Missing file: common/defaults.cs!
Loading compiled script control/main.cs.
Loading compiled script control/client/presets.cs.
Loading compiled script control/server/presets.cs.
++++++++++++ Loading Add-ons ++++++++++++
Engine initialization complete.
%
--------- Initializing MOD: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.
%
++++++++++++ Initializing control module ++++++++++++
Loading compiled script control/client/initialize.cs.
Loading compiled script control/server/initialize.cs.
%
++++++++++++ Initializing module: emaga6 server ++++++++++++
Loading compiled script common/server/audio.cs.
Loading compiled script common/server/server.cs.
Loading compiled script common/server/message.cs.
Loading compiled script common/server/commands.cs.
Loading compiled script common/server/missionInfo.cs.
Loading compiled script common/server/missionLoad.cs.
Loading compiled script common/server/missionDownload.cs.
Loading compiled script common/server/clientConnection.cs.
Missing file: common/server/kickban.cs!
Loading compiled script common/server/game.cs.
Loading compiled script control/server/server.cs.
%
++++++++++++ Initializing module: emaga6 client ++++++++++++
Loading compiled script common/client/message.cs.
Loading compiled script common/client/mission.cs.
Loading compiled script common/client/missionDownload.cs.
Loading compiled script common/client/actionMap.cs.
Loading compiled script common/editor/editor.cs.
Missing file: common/client/scriptDoc.cs!
Video Init:
Accelerated OpenGL display device detected.
Accelerated D3D device detected.
Voodoo 2 display device not detected.
%
Activating the OpenGL display device...
Activating the OpenGL display device...
Setting screen mode to 800x600x32 (w)...
Creating a new window...
Acquiring a new device context...
Pixel format set:
32 color bits, 24 depth bits, 8 stencil bits
Creating a new rendering context...
Making the new rendering context current...
OpenGL driver information:
Vendor: SiS
Renderer: 661 VGA
Version: 1.4.0
OpenGL Init: Enabled Extensions
ARB_multitexture (Max Texture Units: 2)
EXT_blend_color
EXT_blend_minmax
EXT_compiled_vertex_array
EXT_texture_env_combine
EXT_packed_pixels
EXT_fog_coord
ARB_texture_compression
(ARB|EXT)_texture_env_add
WGL_EXT_swap_control
OpenGL Init: Disabled Extensions
EXT_paletted_texture
NV_vertex_array_range
EXT_texture_compression_s3tc
3DFX_texture_compression_FXT1
EXT_texture_filter_anisotropic
%
Loading compiled script common/ui/defaultProfiles.cs.
Loading compiled script common/ui/GuiEditorGui.gui.
Loading compiled script common/ui/ConsoleDlg.gui.
Loading compiled script common/ui/InspectDlg.gui.
Loading compiled script common/ui/InspectAddFieldDlg.gui.
Loading compiled script common/ui/LoadFileDlg.gui.
Loading compiled script common/ui/SaveFileDlg.gui.
Loading compiled script common/ui/MessageBoxOkDlg.gui.
Loading compiled script common/ui/MessageBoxYesNoDlg.gui.
Loading compiled script common/ui/MessageBoxOKCancelDlg.gui.
Loading compiled script common/ui/MessagePopupDlg.gui.
Loading compiled script common/ui/HelpDlg.gui.
Loading compiled script common/ui/RecordingsDlg.gui.
Loading compiled script common/client/metrics.cs.
Loading compiled script common/ui/FrameOverlayGui.gui.
Loading compiled script common/client/messageBox.cs.
Loading compiled script common/client/screenshot.cs.
Loading compiled script common/client/cursor.cs.
Loading compiled script common/client/help.cs.
Loading compiled script common/client/recordings.cs.
%
OpenAL Driver Init:
%
Loading compiled script control/client/profiles.cs.
Loading compiled script control/client/default_profiles.cs.
Loading compiled script control/client/interfaces/splashscreen.gui.
Loading compiled script control/client/interfaces/menuScreen.gui.
Loading compiled script control/client/interfaces/loadscreen.gui.
Loading compiled script control/client/interfaces/playerinterface.gui.
Loading compiled script control/client/interfaces/masterscreen.gui.
Loading compiled script control/client/interfaces/serverscreen.gui.
Loading compiled script control/client/misc/screens.cs.
Loading compiled script control/client/misc/masterscreen.cs.
Loading compiled script control/client/misc/serverscreen.cs.
Loading compiled script control/client/misc/presetkeys.cs.
Loading compiled script control/client/client.cs.
Loading compiled script control/client/misc/transfer.cs.
Loading compiled script control/client/misc/connection.cs.
Binding server port to default IP
UDP initialized on port 0
No master servers found in this region, trying IP:69.64.50.217:28002.
Requesting the server list from master server IP:69.64.50.217:28002 (2 tries lef
t)...
Received server list packet 1 of 1 from the master server (0 servers).
Server query canceled.
keyboard0 input device created.
mouse0 input device created.
LAN server ping: IP:Broadcast:28000...
%
And "join server" not work!
Pls tell me how to solve these!
Thanks!