Huge map multiplayer problems

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Huge map multiplayer problems

Post by chrissicom »

I have created a dedicated server with a 2048x2048 map. One big problem I have is that no one seems to be able to connect except myself. The server is a dedicated server with Dual 3.6 GHz Xeon, 8 GB Ram (just ugraded from 4 GB) and 100 MBit unshared bandwidth. There are a few websites on the server as well but they don't even nearly use up the resources so there should be plenty of space for a OpenTTD Server.

I connect with a 6 MBit ADSL 2+ connection by Arcor in Berlin. The server is located in Frankfurt. I have no problems playing on the server and the 5 MB map is downloaded really quickly. All other users who ever tried to join either disconnected because they took too long to download the map or they immediately got disconnected after they were in the game. Why is that? Is it a problem with the netcode? Is everyone joining having a really bad internet connection? I really doubt the server itself is the problem because the dedicated server with 1024x1024 and 512x512 map works fine with 8 players on it.

P.S. It's a Windows Server and OpenTTD is not blocked by Windows Firewall.
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

Maybe it is a problem caused by the time that goes by while downloading the map. A 6 Mbit ADSL (no is is not ADSL 2+, i got the same one) connection needs about 10 seconds to get the 5 MB. But if you connect with a 1 Mbit connection you need ~45 seconds (120 KB/sec), this is really slow .... too slow may be.

I don't know how the changes are send to a client while he is downloading the map. But i think the client is downloading the map and only gets informations about changes after he has downloaded the map completely, and changes while he is downloading the map get lost.

You may post the address of the server to check out :)
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

#sandra-bullock.co.uk *no-aircarft* is the server but the game is paused right now :) ...the other two #sandra-bullock.co.uk servers are running right now though.
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

OK the map has only ~6700 KB. Downloaded the map within 10-15 seconds ....

Someone with a 1 or 2 or 1,5 Mbit connection should try it. I'm ingame ... but game is pause mode ... it's nice to build something :)
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

See if pause_on_join is enabled...
He's like, some kind of OpenTTD developer.
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

chrissicom wrote:#sandra-bullock.co.uk *no-aircarft* is the server but the game is paused right now :) ...the other two #sandra-bullock.co.uk servers are running right now though.
he said that pause is on, but thats not the point ... someone with a slower connection should try connect, and one who coded the network stuff could answer may question about submit the changes, made during a client download the map, to the client. :)
User avatar
CharlyHRO
Traffic Manager
Traffic Manager
Posts: 186
Joined: 13 Mar 2006 11:03
Location: ::1

Post by CharlyHRO »

Maybe in the openttd.cfg you can raise the value for max_join_time AND enable the setting for pause on join. But I'm not absolutely sure what max_join_time does...

EDIT: /me had a look at the WIKI...

max_join_time
Set the maximum amount of time (ticks) a client is allowed to join. Default value: 500

This means (74 ticks are 1 day in the game and about 2 secs in real) a client has 13.5 secs to join. with such a big map it's impossible so you should raise that value...
moe moe pipebomb
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

max_join_time is in ticks
74 ticks are 1 day = 1,998 sec
default max_join_time = 500;

so a client has 13,5 sec time to join the server .... that is not enough on such a huge map. You need more then 500KB/sec download speed to join the server with max_join_time set to default :)


crap ICQ :D this is that what i said :)
KING
Traffic Manager
Traffic Manager
Posts: 180
Joined: 12 Dec 2005 08:03

Post by KING »

the server also needs a good UPLOAD speed.
Image
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

The server has a 100 MBit dedicated line as I said, so there should be plenty enough upload. But the max_join_time might really be an issue :) I will try increasing that value since it seems that you need around 4-5 MBit to download the map fast enough.

Did anyone of you having problems joining the game while it was on pause or did that work?
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

did work, but with my 6 Mbit connection i downloaded the map within these 13,5 sec :/
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Ok I increased it to 5000 now but I'll unpause the game tomorrow because I wanna continue to play too and I go to bed now *g* ...is there any high value which would be too high?

I think a problem is that two clients can't join and download the map at the same time so someone with a slow connection would block the line for max 5000 ticks is that correct? Why is this limitation anyway? The server has more than enough bandwidth to handle up to 8 and more concurrent downloads of the game.
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

To your question: yes, it is blocked for 5000 ticks which are ~70 seconds.

i think its not coded so far beauce some coders are fed up with the code if they had implemented something new or fixed something and need a break (code something other or relax otherways). And until yet no one other had the wish to correct this little thing, so it's undone :)
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

I have a 1.5Mbit connection and I managed to join while the game was paused. It took about 4 minutes for the map to download though :x (I guess due to the lack of spare bandwidth available between Australia and Europe).

When I try to join big maps, downloading the map isn't the problem - it's the catching up with everything that's happened while the map has been loading.
chrissicom
Route Supervisor
Route Supervisor
Posts: 415
Joined: 07 Oct 2004 10:05

Post by chrissicom »

Yeah I have noticed it too that when I download something from a "fast" Australian server the connection is still very slow to Europe.

In your case pause_on_join might be an option but then on the other hand what if 7 people are on the game and one person joins and keeps everyone else waiting for a few mins.... hmmm well maybe like a TV break to go pee or get something to drink lol :D well I'll think about it.
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Post by TrueBrain »

chrissicom wrote:Ok I increased it to 5000 now but I'll unpause the game tomorrow because I wanna continue to play too and I go to bed now *g* ...is there any high value which would be too high?

I think a problem is that two clients can't join and download the map at the same time so someone with a slow connection would block the line for max 5000 ticks is that correct? Why is this limitation anyway? The server has more than enough bandwidth to handle up to 8 and more concurrent downloads of the game.
Silly thing to do that won't help (increasing it to 5000).

Anyway, to solve the problem, enable pause_on_join. This gives clients enough time to catch up with the server. What goes wrong is this:

A client joins, and it takes, say, 45 seconds to download the map. It means it has 45 seconds of game-time to catch up. Now, because of the big map, in fast forward, the speed goes 10:11 (so normal time is 10 ticks per something, in fast forward it is 11 ticks per something). Say, in the 45 seconds, it missed 2000 ticks. So, to catch up with the server, it needs to run 2000 something. This can be a huge amount of time, sometimes taking up to 20 minutes before a client is finally in sync. Therefor, the max_join_time is there. It protects endless users against this, because for the client point of view, his client 'hangs', while in fact it is just catching up.

To avoid all this we made pause_on_join. After the users downloaded the map, 45 seconds, the game pauses. Now the client only has to catch up with those 45 seconds, going on 11 ticks per something, not 1. So that is 11 times faster, and mostly, users do make it in.

Of course, to prevent users keeping the server on pause for 5 minutes, because they have a 100 MHz, the max_join_time kicks in here too. Just preventing the active players from being in paused mode all the time.

The reason multiple joins can't be done is very simple: nobody ever implemented it. It has some side-issues I don't want to go in here.

I hope this clears it up a bit for you. It has nothing to do with the server connection or hardware, it has all to do with the client connection and hardware. A 2kx2k map is very slow and hard to handle even for state-of-the-art machines.

So, short: enable pause_on_join, and you will be happy.
agentw4b
Traffic Manager
Traffic Manager
Posts: 216
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re:

Post by agentw4b »

TrueBrain wrote:
chrissicom wrote:Ok I increased it to 5000 now but I'll unpause the game tomorrow because I wanna continue to play too and I go to bed now *g* ...is there any high value which would be too high?

I think a problem is that two clients can't join and download the map at the same time so someone with a slow connection would block the line for max 5000 ticks is that correct? Why is this limitation anyway? The server has more than enough bandwidth to handle up to 8 and more concurrent downloads of the game.
Silly thing to do that won't help (increasing it to 5000).

Anyway, to solve the problem, enable pause_on_join. This gives clients enough time to catch up with the server. What goes wrong is this:

A client joins, and it takes, say, 45 seconds to download the map. It means it has 45 seconds of game-time to catch up. Now, because of the big map, in fast forward, the speed goes 10:11 (so normal time is 10 ticks per something, in fast forward it is 11 ticks per something). Say, in the 45 seconds, it missed 2000 ticks. So, to catch up with the server, it needs to run 2000 something. This can be a huge amount of time, sometimes taking up to 20 minutes before a client is finally in sync. Therefor, the max_join_time is there. It protects endless users against this, because for the client point of view, his client 'hangs', while in fact it is just catching up.

To avoid all this we made pause_on_join. After the users downloaded the map, 45 seconds, the game pauses. Now the client only has to catch up with those 45 seconds, going on 11 ticks per something, not 1. So that is 11 times faster, and mostly, users do make it in.

Of course, to prevent users keeping the server on pause for 5 minutes, because they have a 100 MHz, the max_join_time kicks in here too. Just preventing the active players from being in paused mode all the time.

The reason multiple joins can't be done is very simple: nobody ever implemented it. It has some side-issues I don't want to go in here.

I hope this clears it up a bit for you. It has nothing to do with the server connection or hardware, it has all to do with the client connection and hardware. A 2kx2k map is very slow and hard to handle even for state-of-the-art machines.

So, short: enable pause_on_join, and you will be happy.
Any new network setting for 2017 year and Openttd 1.7.1 ?
for big 4kx2k map ?

max_commands_in_queue
bytes_per_frame
bytes_per_frame_burst
max_init_time
max_join_time
max_download_time
max_password_time
max_lag_time
frame_freq
sync_freq
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: peterloud and 6 guests