Trying to see my server {Resolved..Closed}
by Tarly · in Torque 3D Beginner · 01/03/2013 (6:32 pm) · 13 replies
Back in the day, there used to be a kit called the "MMOKit" by MyDreamRPG. It was for TGE and then TGEA.
I pulled out the old kit and thought I would look over how Mydream set up the server for the kit, thinking I could copy it in T3D.
I found that in examplestarter.rpgserver default.cs had these lines:
// List of master servers to query, each one is tried in order
// until one responds
$Pref::Server::RegionMask = 2;
$pref::Master[0] = "2:localhost:28601";
$Pref::Server::Port = 28000;
and the examplestarter.rpgclient default.cs had:
$pref::Master[0] = "2:localhost:28601";
$Pref::Primary::Server = "2XX.1XX.1XX.232:28000"; <--- real IP removed
adding these lines to:
gamescriptsclientdefault.cs
and
gamescriptsserverdefault.cs
then running my clean up bats for shaders,cachedDTS,DBcaches,dso's and Prefs.. then launching my server... then launching the client I htought I would be able to see the server like I could in the Old MMO kit. Much to my Surprise... it does not work.
the prefs files in each dir reflect the changes after running the server and the client. I have port forwarded the 28601 and 28000 the the internal IP and the firewall is off.
Anyone have ideas they could throw at me?
I pulled out the old kit and thought I would look over how Mydream set up the server for the kit, thinking I could copy it in T3D.
I found that in examplestarter.rpgserver default.cs had these lines:
// List of master servers to query, each one is tried in order
// until one responds
$Pref::Server::RegionMask = 2;
$pref::Master[0] = "2:localhost:28601";
$Pref::Server::Port = 28000;
and the examplestarter.rpgclient default.cs had:
$pref::Master[0] = "2:localhost:28601";
$Pref::Primary::Server = "2XX.1XX.1XX.232:28000"; <--- real IP removed
adding these lines to:
gamescriptsclientdefault.cs
and
gamescriptsserverdefault.cs
then running my clean up bats for shaders,cachedDTS,DBcaches,dso's and Prefs.. then launching my server... then launching the client I htought I would be able to see the server like I could in the Old MMO kit. Much to my Surprise... it does not work.
the prefs files in each dir reflect the changes after running the server and the client. I have port forwarded the 28601 and 28000 the the internal IP and the firewall is off.
Anyone have ideas they could throw at me?
About the author
#2
01/04/2013 (6:11 am)
Thank you Scott. the "MydreamRPG" kit was first done by Dreamer, and then by Dave Young. I am just trying to use something I thought I understood from the kit in T3D.
#3
01/04/2013 (7:27 am)
Does the kit use an apache/sql sort of setup for database integration or something? Because in order for a list of servers to show up at the master server address you need to have a master server at that address. I haven't experimented with it at all so I don't know how its structured, but I'd check your console log - if it's timing out trying to connect then the kit might not be providing one or it might not be set up.
#4
I guess I missed the MyDreamRPG in my extended leave from GG.
Last I time I was here, I thought only PG had an "MMOKit" and I used that with a google search to locate the PG site again.
I appreciate that heads-up. :-)
01/04/2013 (9:52 am)
Thank you Tarly, I guess I missed the MyDreamRPG in my extended leave from GG.
Last I time I was here, I thought only PG had an "MMOKit" and I used that with a google search to locate the PG site again.
I appreciate that heads-up. :-)
#5
I think the master server is handled by theses lines:
rpgserver default.cs had these lines:
// List of master servers to query, each one is tried in order
// until one responds
$Pref::Server::RegionMask = 2;
$pref::Master[0] = "2:localhost:28601";
and that makes the Server the "Master" I think. unless there is somehting compiled into the kits .exe that handles it... but.. when I look at init.cs there is no variable listed for
$pref::Master[0] = "2:localhost:28601";
Since I am not a programmer... and I am tryin to learn a bit... maybe I am off base..
I thought $pref::Master[0] = "2:localhost:28601"; would make the server a "master" server.. and the line in client\default.cs saying:
$pref::Master[0] = "2:localhost:28601"; would query the master server that is defined in the Server\default.cs
I changed client\default.cs to say $pref::Master[0] = "2:"2XX.1XX.1XX.232:28601"; (real ip removed) thinking that would define where the "master serever" was and what port it was on.
Doesn't work though..
Am I WAAAAY out in left field?
and yes... the Mydream kit was set up to use Mysql.
here is the first few lines of the server\default.cs in the MyDreamRpg kit
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
// List of master servers to query, each one is tried in order
// until one responds
$Pref::Server::RegionMask = 2;
$pref::Master[0] = "2:localhost:28601";
// Information about the server
$Pref::Server::Name = "RPG Starter Kit";
$Pref::Server::Info = "This is an rpg starter kit test server.";
I thought I was up to speed how to set this up in t3D. But.. it does not work
01/04/2013 (12:26 pm)
Hi Richard...I think the master server is handled by theses lines:
rpgserver default.cs had these lines:
// List of master servers to query, each one is tried in order
// until one responds
$Pref::Server::RegionMask = 2;
$pref::Master[0] = "2:localhost:28601";
and that makes the Server the "Master" I think. unless there is somehting compiled into the kits .exe that handles it... but.. when I look at init.cs there is no variable listed for
$pref::Master[0] = "2:localhost:28601";
Since I am not a programmer... and I am tryin to learn a bit... maybe I am off base..
I thought $pref::Master[0] = "2:localhost:28601"; would make the server a "master" server.. and the line in client\default.cs saying:
$pref::Master[0] = "2:localhost:28601"; would query the master server that is defined in the Server\default.cs
I changed client\default.cs to say $pref::Master[0] = "2:"2XX.1XX.1XX.232:28601"; (real ip removed) thinking that would define where the "master serever" was and what port it was on.
Doesn't work though..
Am I WAAAAY out in left field?
and yes... the Mydream kit was set up to use Mysql.
here is the first few lines of the server\default.cs in the MyDreamRpg kit
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
// List of master servers to query, each one is tried in order
// until one responds
$Pref::Server::RegionMask = 2;
$pref::Master[0] = "2:localhost:28601";
// Information about the server
$Pref::Server::Name = "RPG Starter Kit";
$Pref::Server::Info = "This is an rpg starter kit test server.";
I thought I was up to speed how to set this up in t3D. But.. it does not work
#6
01/04/2013 (1:06 pm)
Nope. A master server is a separate process that handles keeping track of active servers. Those lines simply tell the T3D server to let the master server at the specified address that it is up and ready to accept connections, along with providing some basic info so that clients can see what they're connecting to. See this thread for a discussion on the separation of function between the game server and the master server, as well as a few different options for handling your own master server.
#7
thank you though for the input.
T.
01/04/2013 (4:25 pm)
NUts... Dave Young must have coded something then in the kit.... RATS!thank you though for the input.
T.
#8
I can just define the port the game server listens on adn then define the port the client goes out on each in their respective Default.cs files and the client should talk to the server?
well... that would take aload off my shoulders... I'll try that now
01/04/2013 (4:32 pm)
OK.. After reading the post you posted to Zeph.. your saying that I don't need a master server at all if I don't havea join "room", "Game" what ever?I can just define the port the game server listens on adn then define the port the client goes out on each in their respective Default.cs files and the client should talk to the server?
well... that would take aload off my shoulders... I'll try that now
#9
Those fields in the script files won't get the client to connect to the server - that script is found in the "join" gui. You could strip the connect functions from there and use them on your client when they click "play" instead of the current setup.
What I'm saying is that if you are going to have multiple servers you need a master server. If you're only going to have one server, you don't (technically, you can directly connect the client via the address). But even World of Warcraft uses master servers to list their servers, as does any other game that uses "realms," "shards," or "worlds." So even starting out it's still wise to have it available, even if you just have the client ask the master server for the address and connect without player intervention. That way you'll be ready in the event you need to expand.
01/04/2013 (4:55 pm)
That's not what I'm saying at all.Those fields in the script files won't get the client to connect to the server - that script is found in the "join" gui. You could strip the connect functions from there and use them on your client when they click "play" instead of the current setup.
What I'm saying is that if you are going to have multiple servers you need a master server. If you're only going to have one server, you don't (technically, you can directly connect the client via the address). But even World of Warcraft uses master servers to list their servers, as does any other game that uses "realms," "shards," or "worlds." So even starting out it's still wise to have it available, even if you just have the client ask the master server for the address and connect without player intervention. That way you'll be ready in the event you need to expand.
#10
if you read the other link you posted... you said look at Core\Server\scripts\default.cs
I then began to wonder why you would say that... then I see at the top of scripts\server\default.cs
exec( "core/scripts/server/defaults.cs" );
HOLY SMOKES!! the default uses stuff from the core... I never saw it... I have been beating my head against a wall for over aq week. and I never saw it
Trying to make the changes to Core server default now... post more in a few
01/05/2013 (5:51 pm)
Richard.... you may be a Genius...if you read the other link you posted... you said look at Core\Server\scripts\default.cs
I then began to wonder why you would say that... then I see at the top of scripts\server\default.cs
exec( "core/scripts/server/defaults.cs" );
HOLY SMOKES!! the default uses stuff from the core... I never saw it... I have been beating my head against a wall for over aq week. and I never saw it
Trying to make the changes to Core server default now... post more in a few
#11
I can see the heartbeat on port 28601 in the cmd window. I can see further up in the windows the server init on port 28000.
// Core Server default.cs
// List of master servers to query, each one is tried in order
$Pref::Server::RegionMask = 2;
$Pref::Master[0] = "2:localhost:28601";
// Information about the server
$Pref::Server::Name = "Tarls 2 T3D";
$Pref::Server::Info = "P & C's 2(T3D).";
// The network port is also defined by the client, this value
// overrides pref::net::port for dedicated servers
$Pref::Server::Port = 28000;
I launch the client... using this settings
// game\scripts\client\default.cs
// First we execute the core default preferences.
exec( "core/scripts/client/defaults.cs" );
// AFX SCRIPT BLOCK <<
exec("./afx/defaults_AFX.cs");
// AFX SCRIPT BLOCK >>
// Now add your own game specific client preferences as
// well as any overloaded core defaults here.
$pref::Master[0] = "2:localhost:28601";
$Pref::Primary::Server = "localhost:28001";
$pref::Net::Port = 28000;
$Pref::Server::Port = 28000;
when I click the "enter" button: button settings are this:
Command: connectToServer();
the client will not connect. It does nothing.
When I click on the button "join server": button settings
Command: Canvas.popDialog(CharSelectGui);Canvas.setContent(JoinServerDlg);
the sERVERDLG.GUI OPENS UP AND i CAN CLICK QUERY LAN and it sees the server. In the old kit.. If I click log in it joins the server.
Now, I built the join server button for the Serverdlg.gui to come up.. I am tryin to get "enter" to just join the server.
Ideas?
01/05/2013 (6:12 pm)
When I launch the server .. after running all bat files to clean up dso and such.I can see the heartbeat on port 28601 in the cmd window. I can see further up in the windows the server init on port 28000.
// Core Server default.cs
// List of master servers to query, each one is tried in order
$Pref::Server::RegionMask = 2;
$Pref::Master[0] = "2:localhost:28601";
// Information about the server
$Pref::Server::Name = "Tarls 2 T3D";
$Pref::Server::Info = "P & C's 2(T3D).";
// The network port is also defined by the client, this value
// overrides pref::net::port for dedicated servers
$Pref::Server::Port = 28000;
I launch the client... using this settings
// game\scripts\client\default.cs
// First we execute the core default preferences.
exec( "core/scripts/client/defaults.cs" );
// AFX SCRIPT BLOCK <<
exec("./afx/defaults_AFX.cs");
// AFX SCRIPT BLOCK >>
// Now add your own game specific client preferences as
// well as any overloaded core defaults here.
$pref::Master[0] = "2:localhost:28601";
$Pref::Primary::Server = "localhost:28001";
$pref::Net::Port = 28000;
$Pref::Server::Port = 28000;
when I click the "enter" button: button settings are this:
Command: connectToServer();
the client will not connect. It does nothing.
When I click on the button "join server": button settings
Command: Canvas.popDialog(CharSelectGui);Canvas.setContent(JoinServerDlg);
the sERVERDLG.GUI OPENS UP AND i CAN CLICK QUERY LAN and it sees the server. In the old kit.. If I click log in it joins the server.
Now, I built the join server button for the Serverdlg.gui to come up.. I am tryin to get "enter" to just join the server.
Ideas?
#12
IF after going into ServerDLG.gui and seeing the server... I can use a button configured with a command of JoinServerDlg.join(); and it logs right in.
But..if I use the same button after closing the client and running all cleanup bats. the button no longer works.
Richard, or anyone else... Can ya help me out? the heartbeat works... I just can't get the client to connect to the server.
I moved the server to a XP machine 32 bit. hoping it was a Win7 security issue...
In \game\scripts\client\default.cs I changed
$Pref::Primary::Server = "localhost:28001";
to
$Pref::Primary::Server = "192.168.1.196:28001";
01/05/2013 (9:02 pm)
OK... If I go to Serverdlg.gui.. and I click query LAN.... I can see the server on the network.IF after going into ServerDLG.gui and seeing the server... I can use a button configured with a command of JoinServerDlg.join(); and it logs right in.
But..if I use the same button after closing the client and running all cleanup bats. the button no longer works.
Richard, or anyone else... Can ya help me out? the heartbeat works... I just can't get the client to connect to the server.
I moved the server to a XP machine 32 bit. hoping it was a Win7 security issue...
In \game\scripts\client\default.cs I changed
$Pref::Primary::Server = "localhost:28001";
to
$Pref::Primary::Server = "192.168.1.196:28001";
#13
Thank you all for all your help in this.
Tarly
01/05/2013 (10:36 pm)
OK... by adding connect("<YourHost> :28000"); It works.!!Thank you all for all your help in this.
Tarly
Torque 3D Owner Scott Warren
They are the company that introduced the kit and they still support a site for that kit as well.
Try this URL because I think they could best help you.
www.prairiegames.com/prod.html and click on the "products" option.