Networking with 1.5
by Gabriel Notman · in Torque Game Builder · 07/16/2007 (11:38 am) · 1 replies
Attempting to port a network based TGB game from 1.1.3 to 1.5, I ran into some issues with the basic networking. The common networking scripts found in "./common/gameScripts/server" and ".../client" were not being executed.
Digging a little deeper I found the definition of a global <$Game::UsesNetwork>.
Which is set in "./common/gameScripts/properties.cs" function _defaultGameConfigurationData().
However after that function is executed, the xml configuration ("./common/commonConfig.xml") file is loaded (including that value) and so changing the above function does not have any effect.
I couldn't find a better way than editing the directly. Setting <$Game::UsesNetwork> in a subsequent script is not useful as this value is used during loading, to determine whether to load the networking scripts.
So I guess the point of this thread is:
A: Is there another way of setting this value? Or is this something that needs to be added to the preferences dialog in the builder? (This is where the other values in commonConfig are changed.)
B: Mention that building a networked game in 1.5, you need to edit this value, or load the network scripts yourself.
Gabriel
Digging a little deeper I found the definition of a global <$Game::UsesNetwork>.
Which is set in "./common/gameScripts/properties.cs" function _defaultGameConfigurationData().
However after that function is executed, the xml configuration ("./common/commonConfig.xml") file is loaded (including that value) and so changing the above function does not have any effect.
I couldn't find a better way than editing the
So I guess the point of this thread is:
A: Is there another way of setting this value? Or is this something that needs to be added to the preferences dialog in the builder? (This is where the other values in commonConfig are changed.)
B: Mention that building a networked game in 1.5, you need to edit this value, or load the network scripts yourself.
Gabriel
About the author
Torque 3D Owner Matthew Langley
Torque
Thanks for mentioning this issue, it reminded of me it and I'll double check that in the Checkers Tutorial it instructs you on how to do so.