Demo internet game
by Very Interactive Person · in General Discussion · 11/19/2003 (9:14 am) · 35 replies
Anyone else having problems hosting or connecting to a Torque demo internet game? Lan seems to work... but I can't seem to run an internet game. The thing is I know someone is running a server, but he doesn't show up in the list. Same when I run a server, I don't pop up in the other persons server list. Why is this? Is internet play even working for the Torque demo? Does the fact that I'm in Europe has anything to do with it? Shouldn't, but you never know... looks like the only games I find are american (I assume, becuase of the high pings).
#2
11/19/2003 (9:37 am)
I noticed region mask is set to 2. What should it be? I can't seem to find that thread.
#3
Are you sure that the guy running the server isn't firewalled? Can you connect to him by IP?
Internet play is just like LAN play, except... slower. So there's no reason it shouldn't work unless the 'net is feeling inimical.
11/19/2003 (1:22 pm)
It's arbitrary. There's only one Torque master at the moment that I know of, so it really shouldn't matter...Are you sure that the guy running the server isn't firewalled? Can you connect to him by IP?
Internet play is just like LAN play, except... slower. So there's no reason it shouldn't work unless the 'net is feeling inimical.
#4
11/19/2003 (5:47 pm)
IT is definatly a REGIONMASK issue. Change it to 0. All will be fine.
#5
11/20/2003 (11:42 am)
But what does 0 stand for? And what does the 2 stand for? I can't seem to find any info on that anywhere.
#6
Oh, and LAN works fine, no problems there.
Here's what the console log says when querying the master:
Now am I right when I think it finds 2 servers, and they time out when pinged? The thing is I'm only running 1 server, and its basically next to me... (when I connect via lan the ping is 0 (dedicated server, otherwise it has a ping of +- 15).
If this is true, would there be a way to echo the name of the server being pinged in the console so I can at least see if its my server that is being pinged? Is it possible to skip the ping and just try to connect?
Please help...
05/27/2004 (6:31 am)
I know this is an old thread, but I was never able to find a solution to this problem. Shortly after I asked this question I gave up on it. But now I'm working on a school project using Torque, and I'm running in to the same problem Whatever I try, I cannot get an internet game working. Not at my place, not at school, not at friends places,... so no, its not just my internet setup. I tried regular server, dedicated servers... nothing! The thing is I have 2 weeks left to get this going (!!!)Oh, and LAN works fine, no problems there.
Here's what the console log says when querying the master:
ServerQuery: start Querying master server 0 No master servers found in this region, trying IP:216.116.32.49:28002. Requesting the server list from master server IP:216.116.32.49:28002 (2 tries left)... Received server list packet 1 of 1 from the master server (2 servers). Pinging Server IP:80.200.243.189:3025 (3)... Pinging Server IP:80.200.243.189:2780 (3)... Pinging Server IP:80.200.243.189:3025 (2)... Pinging Server IP:80.200.243.189:2780 (2)... Pinging Server IP:80.200.243.189:3025 (1)... Pinging Server IP:80.200.243.189:2780 (1)... Pinging Server IP:80.200.243.189:3025 (0)... Pinging Server IP:80.200.243.189:2780 (0)... Ping to server IP:80.200.243.189:3025 timed out. ServerQuery: ping Pinging servers: 1 left... 0.25 Ping to server IP:80.200.243.189:2780 timed out. ServerQuery: query Querying servers: 0 left... 0.5 ServerQuery: done No servers found. 1
Now am I right when I think it finds 2 servers, and they time out when pinged? The thing is I'm only running 1 server, and its basically next to me... (when I connect via lan the ping is 0 (dedicated server, otherwise it has a ping of +- 15).
If this is true, would there be a way to echo the name of the server being pinged in the console so I can at least see if its my server that is being pinged? Is it possible to skip the ping and just try to connect?
Please help...
#7
The master server query is working, however the ping is not.
Are your machines sitting behind a gateway or router (I'm assuming the router ip is 80.200.243.189)?
If so the packets are hitting the router's external ip address and the router has no way of knowing where to route them, so they're being dropped. What you're trying to do will only work with a machine that's directly connected to the net or with forwarding setup to route the packets from a port on the router to a specific machine.
Hope this helps!
-John
05/27/2004 (8:58 am)
Hi Ward,The master server query is working, however the ping is not.
Are your machines sitting behind a gateway or router (I'm assuming the router ip is 80.200.243.189)?
If so the packets are hitting the router's external ip address and the router has no way of knowing where to route them, so they're being dropped. What you're trying to do will only work with a machine that's directly connected to the net or with forwarding setup to route the packets from a port on the router to a specific machine.
Hope this helps!
-John
#8
Would there be a way to skip the pinging, and just show the servers that are provided by the master server?
05/27/2004 (10:52 am)
In a way this is a relief... but its also scary, becuase 80% of the people I know are behind a router. Its quit common to have a router these days.Would there be a way to skip the pinging, and just show the servers that are provided by the master server?
#9
1. You host a server on a pc connected through a router to the internet.
2. The host server contacts the master server and says "Hey, im hosting this game. List me!"
So now the external I.P. address of the host server's router is listed on the master server.
3. Your client pc contacts the master server and sees the server listed, then pings it.
The problem is, as BobTheCBuilder has said, the ping goes to the router but by default the router has no way to know which computer to send the ping to. The host server can directly connect to the master server but no computer can directly connect to the host server.
The only way round this, that I know of, is to configure the router (through its web setup) to do one of two things:
1. Forward the ports that the client connects to the server host through on the router to the "internal" I.P. address of the server host.
2. Setup dmz on the router to forward all ports to the "internal" I.P. address of the server host.
There are newer routers that let you use something called Universal Plug and Play (UPNP), these will temporary setup forwarding to the host computer while it hosts for select ports. However that requires a router that supports UPNP and "I think" code in the server to support it.
So in short, the only way to host a game through a router is have the user fiddle with router settings.
If anyone knows a way round this please god tell me :)
Russell Tracey
05/27/2004 (11:22 am)
Unfortunately this is probably THE big problem with online gaming today. What is happening is this:1. You host a server on a pc connected through a router to the internet.
2. The host server contacts the master server and says "Hey, im hosting this game. List me!"
So now the external I.P. address of the host server's router is listed on the master server.
3. Your client pc contacts the master server and sees the server listed, then pings it.
The problem is, as BobTheCBuilder has said, the ping goes to the router but by default the router has no way to know which computer to send the ping to. The host server can directly connect to the master server but no computer can directly connect to the host server.
The only way round this, that I know of, is to configure the router (through its web setup) to do one of two things:
1. Forward the ports that the client connects to the server host through on the router to the "internal" I.P. address of the server host.
2. Setup dmz on the router to forward all ports to the "internal" I.P. address of the server host.
There are newer routers that let you use something called Universal Plug and Play (UPNP), these will temporary setup forwarding to the host computer while it hosts for select ports. However that requires a router that supports UPNP and "I think" code in the server to support it.
So in short, the only way to host a game through a router is have the user fiddle with router settings.
If anyone knows a way round this please god tell me :)
Russell Tracey
#10
05/27/2004 (11:41 am)
I've had this same problem, I just disabled the router, or opened the ports.
#11
- Mark
05/27/2004 (2:33 pm)
Actually there is a non-hardware solution to this problem, and it is implemented and working in the Torque Network Library (TNL). Basically you have the master server "arrange" a connection between the client and the game host, where the client and the host begin sending packets to each others' public addresses. This creates a "hole" in the router/firewall that allows the incoming packets from each host through. TNL Licensees can use this functionality in their Torque games, although it will take a bit of work to make the two live together nicely.- Mark
#12
I have a semi good notion from the TNL docs how it works but im a tad confused. It appears that the master server gets ip addresses from the client and the game server and then:
the client connects to the server
the server connects to the client
Because they are trying to connect at the same time its like they both think they are connected via an outgoing connection?
Is there a overview of how this works?
05/27/2004 (3:07 pm)
Does this method work if both the server and the client are behind a router? I have a semi good notion from the TNL docs how it works but im a tad confused. It appears that the master server gets ip addresses from the client and the game server and then:
the client connects to the server
the server connects to the client
Because they are trying to connect at the same time its like they both think they are connected via an outgoing connection?
Is there a overview of how this works?
#13
Let me ask this a different way, because I know GG doesnt like promising to do specific things with the code, and for good reasons. Is there a possibility that this feature will show up in the Torque Head sometime in the near future? (ie, the next year or so)
05/27/2004 (6:05 pm)
This would be incredibly useful in torque... will the functionality be transfered from the TNL to standard torque?Let me ask this a different way, because I know GG doesnt like promising to do specific things with the code, and for good reasons. Is there a possibility that this feature will show up in the Torque Head sometime in the near future? (ie, the next year or so)
#14
-Jeff Tunnell GG
05/27/2004 (8:51 pm)
There are no plans to add the complete functionality of TNlL to Torque. We feel that the value proposition ofTorque is excellent.-Jeff Tunnell GG
#15
The reason this works is that most firewalls and routers have a "UDP packet reply" mechanism - so that packets sent from a host behind a firewall to a remote server ip/port creates a record on the firewall to allow packets from that remote ip/port to be allowed in. The TNL network interface/master server take advantage of this to allow a 3rd party to negotiate a connection between two firewalled/NAT'd hosts.
- Mark
05/28/2004 (2:02 pm)
Russell, yes this works even if both client and server are behind routers. If you look at netInterface.cpp/.h in TNL, you can see how it issues "Punch" packets to punch holes in firewalls/routers so that arranged connections can be accepted.The reason this works is that most firewalls and routers have a "UDP packet reply" mechanism - so that packets sent from a host behind a firewall to a remote server ip/port creates a record on the firewall to allow packets from that remote ip/port to be allowed in. The TNL network interface/master server take advantage of this to allow a 3rd party to negotiate a connection between two firewalled/NAT'd hosts.
- Mark
#16
05/28/2004 (2:21 pm)
I haven't followed the technical aspects of this discussion closely, but it seems obvious from skimming that if the server has a proxy at the firewall/router, the problem (should) go away...the firewall/router is just doing it's expected job here, keeping out "unexpected" connections, but if you host a server behind a firewall, or with an internal network address, just setup a proxy server to have the relay automated.
#17
I'm thinking more of the situation where you have a torque game where users can host games for people to join, and most DSL users would be behind a router. In this situation you wouldn't have the proxy option, and wouldn't want *all* traffic going through a third party.
Unless i'm mis-understanding where the proxy is in your solution?
05/28/2004 (3:41 pm)
Stephen, i think that your solution is the solution in some situations. I'm thinking more of the situation where you have a torque game where users can host games for people to join, and most DSL users would be behind a router. In this situation you wouldn't have the proxy option, and wouldn't want *all* traffic going through a third party.
Unless i'm mis-understanding where the proxy is in your solution?
#18
Thats how I have my router setup when I want to host a game.
05/28/2004 (3:46 pm)
I think Stephen ment by "proxy" is that your router would be the proxy. Setup your router to take every request for X at the router and hand it off to Y (your PC). Your router acts as the proxy and is the "third party" between you and those wishing to connect to your machine. Thats how I have my router setup when I want to host a game.
#19
As I said, I haven't paid a lot of attention to the technical specifics of this discussion, so I'm not sure why a server is showing as "available", but not ping-able, but if you are working behind a router/firewall, and you want to make a generic server application available, you will need a proxy configured at the firewall/router to do so, most especially if you are on an internal (10. or 192.168.) network.
EDIT: For those not familiar with the concept of a proxy server, it is basically "pretend you are me, tell everyone you provide xxx_service, and when you get a request for xxx_service, pass it to me".
05/28/2004 (3:51 pm)
Dan hit the nail on the head. In general, a firewall is set up to DIS-allow traffic you do not expect/want. Again in general, routers provide basic firewall services, and normally will not "expose" an internal application/server unless you specifically tell it to (via setting up a proxy).As I said, I haven't paid a lot of attention to the technical specifics of this discussion, so I'm not sure why a server is showing as "available", but not ping-able, but if you are working behind a router/firewall, and you want to make a generic server application available, you will need a proxy configured at the firewall/router to do so, most especially if you are on an internal (10. or 192.168.) network.
EDIT: For those not familiar with the concept of a proxy server, it is basically "pretend you are me, tell everyone you provide xxx_service, and when you get a request for xxx_service, pass it to me".
#20
The current solutions are to have the *user* setup the router to forward the ports or all ports to the the server. However this requires user action.
The TNL solution is great because it requires no end user action, so you would not have to support the hundreds of router setups that are out there. I now have a grasp on how this works (Great job, whoever did it in TNL), it takes a weight off my shoulders knowing that a potential support timebomb is defused.
05/28/2004 (4:03 pm)
It is being shown as "available" because the server (that is started behind a router) can contact the master server, however the client, that gets the server address (external ip of router) from the master server, is trying to ping that one machine behind that router and the router is doing its job of blocking it, causing the client to not being able to ping it.The current solutions are to have the *user* setup the router to forward the ports or all ports to the the server. However this requires user action.
The TNL solution is great because it requires no end user action, so you would not have to support the hundreds of router setups that are out there. I now have a grasp on how this works (Great job, whoever did it in TNL), it takes a weight off my shoulders knowing that a potential support timebomb is defused.
Alex "IkoTikashi" Zappe