Game Development Community

Master Server and Server Ports

by Seth Willits · in Torque Game Builder · 05/04/2008 (12:52 pm) · 8 replies

So I'm in a game programming contest and am writing a multiplayer tetris game ( http://www.sethwillits.com/temp/TGBMultiplayerTetris.jpg ). I have two questions:

1) Can I register with the master server so I don't have to join another game by IP?
2) How do you specify the port when you're connecting by IP? The standard "host game" GUI has a field for changing the server's port number, but there isn't a port field in the join game GUI.

Thanks!

#1
05/04/2008 (2:03 pm)
Ok, this was a stupid question. I didn't realize the master server actually worked automatically. When you open the join gui it doesn't automatically query like every other game on the planet ;) so I thought it wasn't listing there. I assume this also how it deals with the ports since that'd make perfect sense.

I'll leave my newb post here for posterity :)
#2
05/04/2008 (10:33 pm)
Alright now I see it's more of a legitimate question since I just saw someone else's game popup in the master server list in my game. So it seems that's either not limited to my game (however it would work), or it seems that if it is, it isn't perfect. So I guess the question stands: How does my game interface with the master server? Does it really figure out which servers are for my game or is it just a general dump that everyone who's running a Torque game will show up on until you switch the master server's address to your own master server?
#3
05/05/2008 (9:22 pm)
I host my own Master Server on a Linux Server.

I have a resource here
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10702

it is my hacked version of a better resource referenced in the resource.

The other resource may be better for your project, as mine uses some fairly custom perl stuff.

---HTH
#4
05/05/2008 (9:43 pm)
So in other words, the GG master server should only be used temporarily? I somewhat see references to the the GameType and such which set how to filter by, but I don't see how to filter those.
#5
05/05/2008 (10:59 pm)
After playing with it in the debugger, searching through the forums, and some fiddling, I figured it out.

You identify your server to the master by setting the following vars:
$Server::GameType = "Your Game";
$Server::MissionType = "Some Mission";


For the querying to join a game, you need to set:
$Client::GameTypeQuery = "Your Game";
$Client::MissionTypeQuery = "Any";


While I'm sure that you can specify the client var values as lists of some sort to actually define the query, the above will get you all mission types of your game. It's also important that you at least specify "Any" for your $Client::MissionTypeQuery. Without it (if you don't set the var at all), the server list will be empty.

So I just slapped those vars in main.css and baddabing baddaboom. I'm not sure if there's a better place to put it. (As of TGB 1.7.3)
#6
05/06/2008 (1:53 am)
I'm not saying to not use their master server, I'm not even sure if they care. I just choose to control my own fate ... by hosting my own.

Those settings used to be set in the preferences files.. but I haven't looked for them in the recent versions.
#7
05/06/2008 (9:23 am)
The GG "master server" is there for people to experiment against, and use for very small scale (3-5 player) testing. It should not be relied upon for commercial or large scale use.
#8
05/06/2008 (11:41 am)
Thanks Stephen.