News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Long delays in network mode

Started by Marc, January 22, 2012, 02:55:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marc

Hello everybody,

as long-time fans of simutrans, we're very excited about the network mode and about the theoretical option of playing together in the same virtual world.  However, we're getting very long delays in command execution that make the game practically unplayable.

We're playing with one MacBook Pro running OS X 10.6 and one MacBook running Linux Debian 6.0.3.  We usually just both use the default player, put introducing multiple players and each taking one of them does not change anything.

With the precompiled binaries, having the (faster) MacBook Pro running one instance as the server and one instance as the client, it takes about 10 to 30 seconds from a command (e.g. to build something) being given on the client to its effect (i.e. the fresh building) being visible there.  On the server instance, the effects of the command are visible immediately.  On the remote client on the Linux machine, command execution usually suffers from the same amount of lag, but is sometimes instantaneous.  If only one person is playing, lag tends to get smaller after some time (e.g. 15 minutes).

We tried compiling a server binary on our own, setting BACKEND=posix, COLOUR_DEPTH=0, OSTYPE={mac,linux}, OPTIMISE=1, and WITH_REVISION=1, and leaving all other variables in config.template untouched.  We have tried with the server both on OS X and on Linux.  Unfortunately, using the dedicated server binary did not reduce lag at all.  (However, the server machine certainly runs cooler with only one graphics display open.)

We also tried running the precompiled binary with the -server switch, having one of us play directly on the server instance of the game, and the other one on a remote client.  This eliminates lag completely for the one playing on the server instance, but does not improve anything for the other one.

Googling for "simutrans network lag" or "simutrans network delay" did not give us any helpful results.  We'd be very grateful for hints on how to improve the situation, or even on how to debug things, as simply using -debug 5 did not elucidate us much.

Thanks in advance!

Regards
Marc

Marc

Oh, and I don't think it's related to a specific version, as we've had this problem ever since we first tried network mode.  It definitely occurs in 111-0 and 110-0-1.  We use pak64, sometimes with addon-food.

prissi

Since none of the current developers has a mac, I am not sure if there is an eay way out. Maybe try a nightly.

A lot of parameters in the very end of the simuconf.tab may have stange values. Make sure, they are something close to the orignal ones. (But honestly I do not think this is the case.)

Try to start the game with -fps 15 or -fps 15 on the server.

Marc

Thank you very much for your time and your reply.

I have now reset all network-related parameters in simuconf.tab to their original values (I used to have pause_server_no_clients=1 and listen=0.0.0.0).  I have also tried with -fps 15 on server, client, or both.  Unfortunately, neither change helped to reduce lag.

The problem is not limited to the use of a Mac.  If I run both server and client on the same Linux machine, with no Mac OS X involved anywhere, I get high delays, too.

You have inspired us to do more systematic tests.  These were helpful as we used a constellation we had not tried before: With the Linux executable as both -server and GUI (i.e. playing in the server instance on Linux), and the OS X executable as a client, we get somewhat acceptable delays (under five seconds).  The drawback is choppy movement of vehicles on the OS X client, but that's easier to live with than half-minute delays.

I'll try a nightly next.

Thanks again,
Marc

Milko

Hello

I do not have much experience in network games.
From what little I have seen, however, I noticed that there is delay between the request for a command and its execution. The delay is greater than the decrease of the computing power of the PC client. The server works with experimental Simutrans but I think the problem is the same even in the standard version.
We're just talking about (including this one) in this http://forum.simutrans.com/index.php?topic=8969.0 thread.

Giuseppe

prissi

In standard the problem only arose, when  the client was too slow to keep up with the server. Of course a very long delay set by the server will do the same.

I suppose the timeing routines of SDL on MAC are not the best. Thus thing may improve, if Timothy finished the native Mac-Port.

sdog

i can confirm the same symptoms on linux (64), at least it was present when i tested it last when the last stable version was released.