Server and client connection via master server?
by 30harry · in Technical Issues · 10/28/2007 (10:06 am) · 1 replies
Hi so I've written a quick tic-tac-toe game so I can understand how to write a 2 player network turn based game. This works fine locally; I create a server and a client, the client "queries the lan" and I select my server and play my game.
btw - I'm using the default network gui in TGB 1.5
But if I want to play against a friend on another computer I am unable to get the games to connect. I've tried connecting using a specific IP address but that doesn't work.
Now I'm testing using the master server (in this case the garagegames master server - which I'm guessing is for testing purposes). Without any code changes - I don't see my server but I do see other servers. After some trawling through code (I have the pro license) I added the following to my code
$Server::GameType = "tictactoe";
$Server::MissionType = "tictactoe";
$Server::Dedicated = false;
$Server::BotCount = 0;
$Client::GameTypeQuery = "tictactoe";
$Client::MissionTypeQuery = "tictactoe";
Now when the client queries the master server, it gets back the address of my local server, but it doesn't get a response from my server and the ping request timesout? I see this activity by pressing ~ and watching the console window. Looking in the console window of my server I see no activity other than the master server requesting info.
Are there more variables I need to setup. My server opens up on port 28000, and successfully communicates with the master server. But the client seems to be sending ping requests to 63242 and other port addresses. But it is at least pinging the correct IP address
Any thoughts on what is wrong - could this be an issue with my firewall or router?
Btw - when I try and connect directly, I see the client send the "challenge request" but I never see the server receive the "challenge request"
btw - I'm using the default network gui in TGB 1.5
But if I want to play against a friend on another computer I am unable to get the games to connect. I've tried connecting using a specific IP address but that doesn't work.
Now I'm testing using the master server (in this case the garagegames master server - which I'm guessing is for testing purposes). Without any code changes - I don't see my server but I do see other servers. After some trawling through code (I have the pro license) I added the following to my code
$Server::GameType = "tictactoe";
$Server::MissionType = "tictactoe";
$Server::Dedicated = false;
$Server::BotCount = 0;
$Client::GameTypeQuery = "tictactoe";
$Client::MissionTypeQuery = "tictactoe";
Now when the client queries the master server, it gets back the address of my local server, but it doesn't get a response from my server and the ping request timesout? I see this activity by pressing ~ and watching the console window. Looking in the console window of my server I see no activity other than the master server requesting info.
Are there more variables I need to setup. My server opens up on port 28000, and successfully communicates with the master server. But the client seems to be sending ping requests to 63242 and other port addresses. But it is at least pinging the correct IP address
Any thoughts on what is wrong - could this be an issue with my firewall or router?
Btw - when I try and connect directly, I see the client send the "challenge request" but I never see the server receive the "challenge request"
About the author
Torque Owner Lee Latham
Default Studio Name
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5962
It explains how the GG (and their own) work, and also works itself ridiculously easily. Just swell.