arunkumarmunusamy / bitfighter

Automatically exported from code.google.com/p/bitfighter
Other
0 stars 0 forks source link

No more "Ping timed out" servers in game lobby #457

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What new feature or enhancement would you like to request?
To be able to get the server's name and description in the game lobby, even if 
it is ping timed out.

How? Well, we could connect to the server momentarily to get the info, like 
when you connect to play on the server, or we can get it from 
http://bitfighter.org/bitfighterStatus.json, since they have this info

Original issue reported on code.google.com by corteocarl on 6 Sep 2014 at 11:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Well, we could probably get it directly from the master server, without using 
http

Original comment by corteocarl on 6 Sep 2014 at 11:37

GoogleCodeExporter commented 9 years ago
Can we also get players and  bot count ?

Original comment by amginea4...@gmail.com on 7 Sep 2014 at 12:26

GoogleCodeExporter commented 9 years ago
We can get player count in bitfgihterStatus.json, but I am pretty sure we can 
get everything via Master Server

Original comment by corteocarl on 7 Sep 2014 at 1:03

GoogleCodeExporter commented 9 years ago
I'll be honest and say I don't fully understand the ping timeout issue; I 
suspect it has to do with the server rejecting packets from unknown clients.  
When you join a server, the master server arranges the connection such that it 
appears to be coming from a known server, and I think the pings the clients 
send in the lobby do not use the arranged connection method.  I suspect making 
them do so would fix the issue, but I'm not really sure.

Also, I'm not sure how to set up a local client for testing that can reproduce 
the problem.  Any ideas on that front would be helpful in diagnosing and fixing 
this highly annoying problem.

Original comment by watusim...@bitfighter.org on 24 Dec 2014 at 5:17

GoogleCodeExporter commented 9 years ago
The process on the UIQueryServers screen is like this:

1. Client connects to master
2. Master sends a list of server addresses
3. Client asks each server for server info

The problem is that if a particular server is behind a firewall or NAT server, 
the client cannot form a direct connection to get the server info.

When you connect to a ping-timed out server, the client, server, and master do 
what's called 'UDP hole punching' to attempt to trick the NAT or firewall to 
allow packets from the specific client (this is an 'arranged connection').  It 
does not do this for the normal server info query because it is expensive (in 
time) to set up.

The easy way to test this is to set up a dedicated server on a server with all 
ports blocked.

A solution could be to get the server names from the master server instead of 
just the addresses to try connections.  I would recommended leaving the '999' 
for ping, though, as that is a clear indicator that the server has its ports 
blocked.

Original comment by buckyballreaction on 24 Dec 2014 at 3:57

GoogleCodeExporter commented 9 years ago
I think it might be worthwhile to do an arranged connection for servers that 
are "ServerTimedOut" because it would be useful for potential clients to know 
if they will ultimately be able to connect or not.  We could possibly try a 
direct connection first, then do an arranged connection if that fails.

Original comment by watusim...@bitfighter.org on 25 Dec 2014 at 8:53