Master Server Take 2
by Terry Barlow · in Torque 3D Professional · 08/19/2013 (9:26 pm) · 20 replies
I think we r getting close, we have been working on our own Master Server, and so far this is where we r if I drop to a Command Prompt and run mygame -dedicated -mission "levels/mymission.mis" the server starts and finds the new master server and all is good, then still in a Command Prompt I run mygame -connect 0.0.0.0 and it logs right into the mission and the master server sees that there is a player and all is good, now here is the prob I start the server with mygame -dedicated -mission "levels/mymission.mis" and run the game from windows the client comes up and I click on Join and the box comes up and I hit Query Master, and nothing found but the server is still running and so is the master server so anyone have any clue Y the master server is not showing up in the Join screen.
Thanks
Terry
Thanks
Terry
About the author
Send all correction E-Mails to: h0td0g4@yahoo.com Unskilled, having fun, playing around, and helping out!
#2
game/core/scripts/server/defaults.cs
01.$pref::Master[0] = "2:master.garagegames.com:28002";
game/scripts/client/prefs.cs at line 20:
01.$pref::Master0 = "2:master.garagegames.com:28002";
so there r more places then this ? thanks for the reply
Terry
08/19/2013 (11:01 pm)
Ok well here r the 2 places I have added the new mastserver so fargame/core/scripts/server/defaults.cs
01.$pref::Master[0] = "2:master.garagegames.com:28002";
game/scripts/client/prefs.cs at line 20:
01.$pref::Master0 = "2:master.garagegames.com:28002";
so there r more places then this ? thanks for the reply
Terry
#3
Edit: It's early so now that I think about it some more that might be false, but its worth a try. See if you see the game with a LAN ping when it wont show up on master server. Also check the torque console to make sure that the dedicated is actually communicating with the master server. There are other factors too that can keep a game from showing up like search criteria being wrong but if you're using default settings that should be ok.
08/20/2013 (5:40 am)
Is your hosted game on the same machine as the client? Torque wont let you use the master server if so, you have to do a LAN ping. The host needs to be on a separate machine and you need to make sure you have your router setup to allow it to host.Edit: It's early so now that I think about it some more that might be false, but its worth a try. See if you see the game with a LAN ping when it wont show up on master server. Also check the torque console to make sure that the dedicated is actually communicating with the master server. There are other factors too that can keep a game from showing up like search criteria being wrong but if you're using default settings that should be ok.
#4
And, like Tim said, you need to host the master server on a separate machine from your game server (and probably the client, too).
08/20/2013 (6:28 am)
Those should do it - did you add a Master[1]? Or did you replace GG's master server address with your own?And, like Tim said, you need to host the master server on a separate machine from your game server (and probably the client, too).
#5
Ok Ill try all of that and let U know what Happens thanks for the reply
@Richard
I replaced GG's master server with my Own and I will let U know what happens with the other thanks for the reply as well
Terry
08/20/2013 (11:57 am)
@TimOk Ill try all of that and let U know what Happens thanks for the reply
@Richard
I replaced GG's master server with my Own and I will let U know what happens with the other thanks for the reply as well
Terry
#6
I was having the same exact problem. If your running this on the same machine, this is whats going to happen. Its very confusing unless you separate the processes onto different machines. You wont see the master server unless you click LAN, but someone on another computer will. I tested this. My friend was able to see the server while I was not, unless I clicked LAN, while she clicked the other button, but we both managed to connect, and get into game. For some reason in torque when its all on the same machine it doesnt register correctly on the querry for server type LAN vs Master. If I remember right it has something to do with how home ISP service, and routers handle communications where it shows up as LAN on Your end, and without tweaking its not gonna happen. I figured a solid work around for this is futile since I plan on moving everything to a separate machines someday, and have moved onto databases.
Note: It is possible to have a master server, client, and game server all on one machine with Torque 3D, cuz Ive done it with some tweaking using a DNS, and port forwarding. Not advisable beyond educating tho due to process, memory, and security issues if You ever go live. Just best to use 3 or 4 computers for a very basic setup honestly if You can wing the budget.
08/20/2013 (11:24 pm)
@Tim:I was having the same exact problem. If your running this on the same machine, this is whats going to happen. Its very confusing unless you separate the processes onto different machines. You wont see the master server unless you click LAN, but someone on another computer will. I tested this. My friend was able to see the server while I was not, unless I clicked LAN, while she clicked the other button, but we both managed to connect, and get into game. For some reason in torque when its all on the same machine it doesnt register correctly on the querry for server type LAN vs Master. If I remember right it has something to do with how home ISP service, and routers handle communications where it shows up as LAN on Your end, and without tweaking its not gonna happen. I figured a solid work around for this is futile since I plan on moving everything to a separate machines someday, and have moved onto databases.
Note: It is possible to have a master server, client, and game server all on one machine with Torque 3D, cuz Ive done it with some tweaking using a DNS, and port forwarding. Not advisable beyond educating tho due to process, memory, and security issues if You ever go live. Just best to use 3 or 4 computers for a very basic setup honestly if You can wing the budget.
#7
game/core/scripts/server/defaults.cs
01.$pref::Master[0] = "2:master.garagegames.com:28002";
and here
game/scripts/client/prefs.cs at line 20:
01.$pref::Master0 = "2:master.garagegames.com:28002";
but the prob is when I went to
game/scripts/client/prefs.cs at line 20:
01.$pref::Master0 = "2:master.garagegames.com:28002";
that file prefs.cs is not there for me to change the address to the master server am I missing something?
UPDATE
it looks like when I ran the server the first it created the file I was missiong so its there now but for some reson it is still not showing the master server in the qurey and I have all 3 sepert the master server is on its own computer the gameserver is on its own system and the client it loaded on a diff computer anyone have any clue?
Terry
08/20/2013 (11:36 pm)
ok here is something really weird I have setup a new project in T3D to see if maybe there was something worng with the build and I went in to setup the master ser in the new projecj heregame/core/scripts/server/defaults.cs
01.$pref::Master[0] = "2:master.garagegames.com:28002";
and here
game/scripts/client/prefs.cs at line 20:
01.$pref::Master0 = "2:master.garagegames.com:28002";
but the prob is when I went to
game/scripts/client/prefs.cs at line 20:
01.$pref::Master0 = "2:master.garagegames.com:28002";
that file prefs.cs is not there for me to change the address to the master server am I missing something?
UPDATE
it looks like when I ran the server the first it created the file I was missiong so its there now but for some reson it is still not showing the master server in the qurey and I have all 3 sepert the master server is on its own computer the gameserver is on its own system and the client it loaded on a diff computer anyone have any clue?
Terry
#8
08/21/2013 (3:48 am)
Check console logs on dedicated and client and see if they are pinging the master server correctly. you may just have ports closed on your router preventing it. Do you have port 28002 forwarding to the machine that the dedicated host is on?
#9
*** Mission loaded
Engine initialized...
Sending heartbeat to master server [IP:70.58.175.122:28002]
Error, a DecalManager (35d67d8) isn't properly out of the bins!
Error, a TerrainBlock (5d895b0) isn't properly out of the bins!
Error, a TSStatic (7cecc18) isn't properly out of the bins!
Error, a TSStatic (667c320) isn't properly out of the bins!
Error, a TSStatic (54480a0) isn't properly out of the bins!
Error, a TSStatic (5484f90) isn't properly out of the bins!
Error, a TSStatic (8645ed8) isn't properly out of the bins!
Error, a TSStatic (5d85b28) isn't properly out of the bins!
Error, a TSStatic (7b4bb20) isn't properly out of the bins!
Error, a TSStatic (64e3248) isn't properly out of the bins!
Error, a TSStatic (63f92e0) isn't properly out of the bins!
Error, a TSStatic (663d428) isn't properly out of the bins!
Error, a TSStatic (829e920) isn't properly out of the bins!
Error, a TSStatic (829e920) isn't properly out of the bins!
Error, a TSStatic (829ec48) isn't properly out of the bins!
Error, a TSStatic (829ec48) isn't properly out of the bins!
Error, a TSStatic (829ef70) isn't properly out of the bins!
Error, a TSStatic (829ef70) isn't properly out of the bins!
Error, a TSStatic (829f298) isn't properly out of the bins!
Error, a TSStatic (829f5c0) isn't properly out of the bins!
Error, a TSStatic (829f8e8) isn't properly out of the bins!
Error, a TSStatic (829fc10) isn't properly out of the bins!
Error, a TSStatic (829ff38) isn't properly out of the bins!
Error, a TSStatic (82a0260) isn't properly out of the bins!
Error, a TSStatic (82a0588) isn't properly out of the bins!
Error, a TSStatic (82a08b0) isn't properly out of the bins!
it says that a few more times but I figure that got the point accrossed so what does this mean?
Thanks
Terry
08/21/2013 (12:57 pm)
ok well I am not sure what this means but here is the part of the logs on the server that trys to access the master server *** Mission loaded
Engine initialized...
Sending heartbeat to master server [IP:70.58.175.122:28002]
Error, a DecalManager (35d67d8) isn't properly out of the bins!
Error, a TerrainBlock (5d895b0) isn't properly out of the bins!
Error, a TSStatic (7cecc18) isn't properly out of the bins!
Error, a TSStatic (667c320) isn't properly out of the bins!
Error, a TSStatic (54480a0) isn't properly out of the bins!
Error, a TSStatic (5484f90) isn't properly out of the bins!
Error, a TSStatic (8645ed8) isn't properly out of the bins!
Error, a TSStatic (5d85b28) isn't properly out of the bins!
Error, a TSStatic (7b4bb20) isn't properly out of the bins!
Error, a TSStatic (64e3248) isn't properly out of the bins!
Error, a TSStatic (63f92e0) isn't properly out of the bins!
Error, a TSStatic (663d428) isn't properly out of the bins!
Error, a TSStatic (829e920) isn't properly out of the bins!
Error, a TSStatic (829e920) isn't properly out of the bins!
Error, a TSStatic (829ec48) isn't properly out of the bins!
Error, a TSStatic (829ec48) isn't properly out of the bins!
Error, a TSStatic (829ef70) isn't properly out of the bins!
Error, a TSStatic (829ef70) isn't properly out of the bins!
Error, a TSStatic (829f298) isn't properly out of the bins!
Error, a TSStatic (829f5c0) isn't properly out of the bins!
Error, a TSStatic (829f8e8) isn't properly out of the bins!
Error, a TSStatic (829fc10) isn't properly out of the bins!
Error, a TSStatic (829ff38) isn't properly out of the bins!
Error, a TSStatic (82a0260) isn't properly out of the bins!
Error, a TSStatic (82a0588) isn't properly out of the bins!
Error, a TSStatic (82a08b0) isn't properly out of the bins!
it says that a few more times but I figure that got the point accrossed so what does this mean?
Thanks
Terry
#10
Sending heartbeat to master server [IP:xx.xx.xxx.xx:28002]
Received info request from a master server [IP:xx.xx.xxx.xx:28002].
Got Connect challenge Request from IP:xx.xx.xx.xx:xxxx
I only see the first line, but I do not know off hand if the second line is after the client queries or not. I know the third one is for connecting.
The first line is the dedicated letting the master server know about it. The second line is the master server asking for information about the dedicated server. Third line is saying that a client is trying to connect to the dedicated server I believe.
Those TSStatic errors I think are something wrong with your models. I'm not positive on that though.
08/22/2013 (8:36 am)
if you query the master from the client, you should get something like this on dedicated server:Sending heartbeat to master server [IP:xx.xx.xxx.xx:28002]
Received info request from a master server [IP:xx.xx.xxx.xx:28002].
Got Connect challenge Request from IP:xx.xx.xx.xx:xxxx
I only see the first line, but I do not know off hand if the second line is after the client queries or not. I know the third one is for connecting.
The first line is the dedicated letting the master server know about it. The second line is the master server asking for information about the dedicated server. Third line is saying that a client is trying to connect to the dedicated server I believe.
Those TSStatic errors I think are something wrong with your models. I'm not positive on that though.
#11
Thanks
Terry
09/08/2013 (5:20 pm)
I was just sitting here thinking about all of this and wondering Y the Client can't see the master server, eventho the master sercer is up but shouldn't the client have the IP address or host to the game server put into some file so that it can even see the game? just wondering if that could be a prob ?Thanks
Terry
#12
I've been working with Terry on this and here is my take, I can setup a dedicated server, it sends and receives a heart beat just as Tim demonstrated, I can open my client, see the game IN lan, but do NOT see it when querying the master server, or the one Tim Had.
My Questions:
1) If I setup a dedicated server on my machine, and try to search for it in the master listing will I see it?
2) If Terry sets up a dedicated server from his machine, lets say 1 on another computer within his lan, and another on the same machine as the master will it show to me?
3) If 1 and 2 bite the bullet should a third person host a dedicated server?
4) Is the Torque Client screwed up?
09/12/2013 (5:26 pm)
Hey guys,I've been working with Terry on this and here is my take, I can setup a dedicated server, it sends and receives a heart beat just as Tim demonstrated, I can open my client, see the game IN lan, but do NOT see it when querying the master server, or the one Tim Had.
My Questions:
1) If I setup a dedicated server on my machine, and try to search for it in the master listing will I see it?
2) If Terry sets up a dedicated server from his machine, lets say 1 on another computer within his lan, and another on the same machine as the master will it show to me?
3) If 1 and 2 bite the bullet should a third person host a dedicated server?
4) Is the Torque Client screwed up?
#13
EDIT: Whoops, sorry, when you wrote 'dedicated server' I read 'master server'. Different thing. Ignore me.
09/13/2013 (5:20 am)
As for question 3), depending on what you're writing your server in you could easily host it somewhere like Heroku. They're free for basic usage. Costs do scale up a little steeply though, it seems.EDIT: Whoops, sorry, when you wrote 'dedicated server' I read 'master server'. Different thing. Ignore me.
#14
It dawned on me to ask this morning: How do we know if the server listing is being filtered? I see no option to filter it out.
I even generated a fresh game and changed the master servers to ours and nothing, tried GG and nothing.
09/13/2013 (5:42 pm)
Well Daniel, we can host a master from Heroku?It dawned on me to ask this morning: How do we know if the server listing is being filtered? I see no option to filter it out.
I even generated a fresh game and changed the master servers to ours and nothing, tried GG and nothing.
#15
09/14/2013 (3:59 pm)
Yep, for sure. It's a long-term goal of mine to do just that. I'll certainly be adding an example of simple network communication to a server using t3d-bones, which will use some sort of simple Heroku app.
#16
As far as problems with the prefs.cs file. Best to delete them after Youve made any changes to Masterserver or any IP address anywhere in the code. They will get remade with updated information from the last game prefs made called under defaults.cs under if isfile prefs.cs"
Another thing I can think of from memory I had an issue with is... That might give you problems on seeing the game in the master server listing is the game name which must both match in the client and server code in game.cs.
for example:
$Server::GameType = $appName; <-- If the appNames do not match they will show up as two diff versions, and fail to communicate with the master server.
$Server::MissionType = "Deathmatch"; <-- you can make your own But if this does not match it wont show up in master server listing since the client and server code are looking for two diff types of game/server names.
Make sure they both match exactly the same in both client and server game.cs. Might also want to check under gamecore.cs
$Server::MissionType = "Deathmatch"; //Default gametype, just in case.
Make sure Your not using the FPS Tutorial. I had problems with this, and the master server, and while running dedicated lots of errors... Use one the other default templates. The FPS Tutorial is fine to learn from, I can be wrong on this - but I dont think it was intended to be used as a base template for a dedicated server MMO type.
09/16/2013 (7:40 am)
I actually want to do a full tutorial on server set up MMO wise, Username password login, Masterserver, and including a simple database architecture. I dont want to separate the two into two tutorials. Would just be easier to make one solid tutorial together Once I fully understand the process from A-Z. I just cant get T3D to communicate to a MSQL webs server for some reason which is holding me back.As far as problems with the prefs.cs file. Best to delete them after Youve made any changes to Masterserver or any IP address anywhere in the code. They will get remade with updated information from the last game prefs made called under defaults.cs under if isfile prefs.cs"
Another thing I can think of from memory I had an issue with is... That might give you problems on seeing the game in the master server listing is the game name which must both match in the client and server code in game.cs.
for example:
$Server::GameType = $appName; <-- If the appNames do not match they will show up as two diff versions, and fail to communicate with the master server.
$Server::MissionType = "Deathmatch"; <-- you can make your own But if this does not match it wont show up in master server listing since the client and server code are looking for two diff types of game/server names.
Make sure they both match exactly the same in both client and server game.cs. Might also want to check under gamecore.cs
$Server::MissionType = "Deathmatch"; //Default gametype, just in case.
Make sure Your not using the FPS Tutorial. I had problems with this, and the master server, and while running dedicated lots of errors... Use one the other default templates. The FPS Tutorial is fine to learn from, I can be wrong on this - but I dont think it was intended to be used as a base template for a dedicated server MMO type.
#17
Thanks Zeph that really help I will check all that out and go from there now I know what to look for thanks agian and about the Master server did U ever get anywhere at all with that tutorial let me know thanks.
Terry
09/16/2013 (2:40 pm)
@ZephThanks Zeph that really help I will check all that out and go from there now I know what to look for thanks agian and about the Master server did U ever get anywhere at all with that tutorial let me know thanks.
Terry
#18
I never got a Master Server tutorial going yet. I want to keep everything in one tutorial since I feel it would be easier, and less confusing to a new person. Previously I had a really hard time grasping (imagination) how the structure of a client server works in conjunction with a masterserver, game server, and database. Took me a long time in figuring this out. Just easier to include it a all in one stop tutorial source, less confusing for people like myself with lack of experience.
So My basic tutorial would look something like.
MMO Networking, and Server Structures:
a)Dedicated game server
b)Client/server connections
c)Master Server
d)Security/hashing algorithm/authentication codes theory's (explained)
e)Web Registration/PHP
f)Database architecture design theory's (explanation)
g)Database/web security structure theory's (explanation)
h)Database creation
i)Client Log in
I think once there's a very basic resource all in one stop. People can expand on that, and contribute more solid resources to be used with T3D networking or even with T3D game design. T3D is a fantastic engine, and Ive tried many out there. I dont even think anyone has put T3D to its full potential yet, its a hidden gem.
09/16/2013 (8:15 pm)
No problem Terry. I never got a Master Server tutorial going yet. I want to keep everything in one tutorial since I feel it would be easier, and less confusing to a new person. Previously I had a really hard time grasping (imagination) how the structure of a client server works in conjunction with a masterserver, game server, and database. Took me a long time in figuring this out. Just easier to include it a all in one stop tutorial source, less confusing for people like myself with lack of experience.
So My basic tutorial would look something like.
MMO Networking, and Server Structures:
a)Dedicated game server
b)Client/server connections
c)Master Server
d)Security/hashing algorithm/authentication codes theory's (explained)
e)Web Registration/PHP
f)Database architecture design theory's (explanation)
g)Database/web security structure theory's (explanation)
h)Database creation
i)Client Log in
I think once there's a very basic resource all in one stop. People can expand on that, and contribute more solid resources to be used with T3D networking or even with T3D game design. T3D is a fantastic engine, and Ive tried many out there. I dont even think anyone has put T3D to its full potential yet, its a hidden gem.
#19
Cool sounds great U happen to have any hints U can give me on a Master server I look forward to seeing your tutorial if U have anything to share now U can E-Mail it to me at tbarlow550@gmail.com I agree I think it is a Hidden Gem :) it just needs to Shine :) Thanks
Terry
09/17/2013 (8:13 pm)
@ZephCool sounds great U happen to have any hints U can give me on a Master server I look forward to seeing your tutorial if U have anything to share now U can E-Mail it to me at tbarlow550@gmail.com I agree I think it is a Hidden Gem :) it just needs to Shine :) Thanks
Terry
#20
PHP MasterServer for Torque by:Thomas Huehn located here:
http://www.garagegames.com/community/resources/view/14857
All You have to do is change The IP, and PORT in the MasterServer.php file. Would be best to make a .bat file to launch it from an icon from Your desktop, and a .bat file to Your T3D Dedicated Game Server file.
09/18/2013 (3:21 am)
@Terry BarlowPHP MasterServer for Torque by:Thomas Huehn located here:
http://www.garagegames.com/community/resources/view/14857
All You have to do is change The IP, and PORT in the MasterServer.php file. Would be best to make a .bat file to launch it from an icon from Your desktop, and a .bat file to Your T3D Dedicated Game Server file.
Torque Owner Richard Ranft
Roostertail Games
Have you ensured that all instances of the master server's address and port are correct in the scripts? It is set in a few places - in Torsion you can search the project for "masterserver"