Desync Errors: What are the right settings?

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
maartena
Route Supervisor
Route Supervisor
Posts: 470
Joined: 11 Jul 2003 04:53
Location: California, U.S.A.

Desync Errors: What are the right settings?

Post by maartena »

I have been running a server for a while now, and no matter what I try, after a few hours of playing usually a lot of desync errors start occuring. Sometimes I save the server, quit it, and reload it and that will cure the issue for a little while, but eventually desyncs start happening again.

I have made a dedicated.scr and a \scripts folder for it to run from. I have tried a large number of different settings for net_frame_freq and net_sync_freq, but it does not seem to help all that much. Eventually, desyncs start happening again.

Server information:

- Running on 384 kbit/s upload cable modem (5 Mbit/s down).
- Besides from my wife browsing the web from her laptop maybe or getting her e-mail, there is no traffic going on. No p2p, eMule, Torrents, none of that.
- I run Windows XP SP2, P4 @ 2.53 Ghz, 1 Gb memory.
- The server is minimized in the tray with a minimizer program.
- I usually play 1024x512 maps. That keeps the maps at around 1 Mb download.

The Wiki states 1,2 kbyte/s, and for 8 players and 2 spectators that would mean 12 kbyte/s upload to host a server. When I test my speed, it always tests at 40 kbyte/s or more. At any time of day.

I also have a P2 @350 Mhz and 256 Mb in the garage that I want to equip with Linux. Is the Linux server better? Is that hardware good enough to run it?

Either way, I need some insight in the proper settings for desyncs, I have searched the forums high and low but not really found anything more then "play with the net_freme_freq or net_sync_freq settings".

I am done playing, looking for some answers how to combat desyncs. :)

Thanks!
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Post by Celestar »

Background Information:

Desyncs are usually not caused by slow connections or insufficient hardware. "Desync" does not mean that the connection is desynced, but the game states are desynced. In multiplayer openttd, each client simulates the whole game state. As these states must be identical at all times and on all clients, we have to make sure that any random number that is generated (and affects the game state) is identical on each client. If it is not => BOOM. This is what we normally call a desync.

As you can easily find out from the information above, we need some savegame that enables us to reproduce the desync, preferable more savegames, with different times to go to the desync (an actual Random-Number-Generator Desync might not show up for years in game). And then be patient because it takes a long time to debug (The Random Number Debugger spits out a s*** of information).

Best case would be a command (any user initiated action plus some others) that would cause an immidieate desync.

Hope this helps.

Celestar
maartena
Route Supervisor
Route Supervisor
Posts: 470
Joined: 11 Jul 2003 04:53
Location: California, U.S.A.

Post by maartena »

Here's a save from the last server I hosted, I saved this just before I reloaded the server because people started desyncing.
Attachments
server.sav
(997.08 KiB) Downloaded 118 times
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

If you start a new server and load this game, and someone joins, do they desync?
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
maartena
Route Supervisor
Route Supervisor
Posts: 470
Joined: 11 Jul 2003 04:53
Location: California, U.S.A.

Post by maartena »

Darkvater wrote:If you start a new server and load this game, and someone joins, do they desync?
Not for a an hour or 2 or 3, besides the occasional one. Eventually its almost a given that desyncs start happening again.
zypa
Transport Coordinator
Transport Coordinator
Posts: 329
Joined: 30 Mar 2006 12:05
Location: Germany
Contact:

Post by zypa »

I had similar problems, too.

I play with my friends only and this is how we solved this problem.

We do not play via the OTTD Internet Multiplayer, we play via Hamachi.
Hamachi is a tool that creates a local botwork over the internet. If all player are runnung Hamachi you can play a network game in OTTD.

When I read Celestar's message this may not solve the problem. Anyway, since I use Hamachi, our games never "desync"ed again.

You can download hamachi for free: http://www.hamachi.cc
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 7 guests