The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: chicken on March 18, 2012, 09:52:19 PM

Title: Trouble with multiplayer
Post by: chicken on March 18, 2012, 09:52:19 PM
I tried the "Play Online" option but the only server it shows won't let me connect. The "Join" button is greyed out.


So I compiled my own Linux server from git and attempted to load a saved game according to the thread in the other forum. Then I connected to it from a Win7 copy of Simutrans-experimental 10.10.



build/default/simutrans-experimental -log 1 -debug 5 -server 13353 -lang en -load ~/mygame.sve



The client did detect the server when I typed the name in, but the game settings were all wrong. The map was different, the year was not what I had saved. Then when I tried to join the game, I got "Protocol Error (expected NWC_GAME)".


Meanwhile, on the server side:



Message: check_activity():      Accepted connection from: 209.xxx.yyy.zzz
Message: socket_list_t::add_client:     add client socket[9] at address d1.........
Message: network_command_t::rdwr:       read packet_id=2, client_id=1
Warning: network_check_activity():      received cmd id=2 nwc_join_t from socket[9]
Message: nwc_join_t::execute:   
Message: nwc_join_t::execute:   client_id=1 active=1 pending_join_client=-1 active=1
Message: network_command_t::rdwr:       write packet_id=2, client_id=0
Message: packet_t::send:        sent 15 bytes to socket[9]; id=2, size=15
Message: network_command_t::rdwr:       write packet_id=3, client_id=0
Message: packet_t::send:        sent 26 bytes to socket[9]; id=3, size=26
Message: network_command_t::rdwr:       write packet_id=3, client_id=0
Message: nwc_join_t::execute:   pending_join_client now 9
Message: karte_t::reset_timer():        called, mode=$4
Message: network_world_command_t::execute:      do_command 3 at sync_step 1 world now at 0
Warning: karte_t::interactive:  wanted to do_command(3) in the past
Desync for attempting past execution
Warning: karte_t::network_disconnect(): Lost synchronisation with server. Random flags: 0
Message: network_close_socket():        Close pending_join_client [-1]
Warning: nwc_routesearch_t::reset:      all static variables are reset
Message: karte_t::reset_timer():        called, mode=$0
Message: announce_server():     status: 2
Message: network_http_post:
Warning: nwc_routesearch_t::reset:      all static variables are reset
Message: network_open_address():        Preparing to bind address: ::
Message: network_open_address():        Invalid socket, skipping...
Message: network_open_address():        Preparing to bind address: 0.0.0.0
Message: network_open_address():        Potential local address: 0.0.0.0
Message: network_open_address():        Potential remote address: 82.aaa.bbb.ccc
Message: network_http_post:     2
Message: network_http_post:     3
Message: network_http_post:     received header: HTTP/1.1 400 Bad Request
Message: network_http_post:     received header: Content-Type: text/plain
Message: network_http_post:     received header: Content-Length: 31
Message: network_http_post:     received header: Connection: keep-alive
Message: network_http_post:     all headers received, message body follows
Message: network_http_post:     5
World finished ...
Message: simmain:       show banner
Show banner ...
ERROR: modal_dialogue():        called without a display driver => nothing will be shown!
Please report all errors to
http://forum.simutrans.com/
Message: simmain:       banner closed
Message: simmain:       set_message_flags
Running world, pause=0, fast forward=0 ...
Message: karte_t::reset_timer():        called, mode=$0
Message: karte_t::reset_timer():        called, mode=$4
Message: announce_server():     status: 0
Message: network_http_post:
Message: network_open_address():        Preparing to bind address: ::
Message: network_open_address():        Invalid socket, skipping...
Message: network_open_address():        Preparing to bind address: 0.0.0.0
Message: network_open_address():        Potential local address: 0.0.0.0
Message: network_open_address():        Potential remote address: 82.aaa.bbb.ccc
Message: network_http_post:     2
Message: network_http_post:     3
Message: network_http_post:     received header: HTTP/1.1 400 Bad Request
Message: network_http_post:     received header: Content-Type: text/plain
Message: network_http_post:     received header: Content-Length: 31
Message: network_http_post:     received header: Connection: keep-alive
Message: network_http_post:     all headers received, message body follows
Message: network_http_post:     5
Title: Re: Trouble with multiplayer
Post by: jamespetts on March 18, 2012, 11:01:38 PM
May I ask - how did you attempt to connect to the server from the client?
Title: Re: Trouble with multiplayer
Post by: chicken on March 18, 2012, 11:15:18 PM
Hi,


I opened up Simutrans-experimental from the complete package for 10.10. Then I clicked "Play online" and clicked "Add" and typed in my server's hostname. This caused the info window to show a map that had incorrect info (wrong map, wrong year, wrong size). When I clicked Join, I got the error.

Title: Re: Trouble with multiplayer
Post by: jamespetts on March 19, 2012, 12:49:34 AM
Hmm - do you have any idea where the wrong map came from? Is it a map that you recognise?
Title: Re: Trouble with multiplayer
Post by: chicken on March 19, 2012, 03:51:17 AM
No it looks like something completely arbitrary. My map has a lot of land and a little water around the edge. The displayed map view has a lot of water and a small island. I have no idea how it came about. Maybe it decided to expand the oceans by 5x?

Title: Re: Trouble with multiplayer
Post by: dustNbone on March 19, 2012, 06:18:42 AM
Sounds like sea level might have changed?
Title: Re: Trouble with multiplayer
Post by: jamespetts on March 19, 2012, 10:45:38 AM
Can you upload your saved game and then the game to which you seem to be taken by the server so that I can compare them?
Title: Re: Trouble with multiplayer
Post by: chicken on March 19, 2012, 01:59:05 PM
I didn't get to join the game, I just got the error unexpected error "NWC_GAME" instead. Other settings were wrong too (wrong year, map size). I'm guessing that numbers got screwed up when it sent info about the game to the client.
Title: Re: Trouble with multiplayer
Post by: prissi on March 19, 2012, 02:36:44 PM
Sound more like the game was not loaded but you saw the default map. And this is due to load is always relative to your personal simutrans path. You cann specify other locatetions like "~" You have to copy your game to ~/simutrans/save/mygame.sve and then load it with "-load mygame.sve".
Title: Re: Trouble with multiplayer
Post by: chicken on March 19, 2012, 03:05:23 PM
That was it, thank you. I assumed that the argument was a path, but I see that it was not meant to be.