The International Simutrans Forum

 

Author Topic: Trouble with multiplayer  (Read 2238 times)

0 Members and 1 Guest are viewing this topic.

Offline chicken

  • *
  • Posts: 62
Trouble with multiplayer
« 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.


Code: [Select]
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:


Code: [Select]
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

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Trouble with multiplayer
« Reply #1 on: March 18, 2012, 11:01:38 PM »
May I ask - how did you attempt to connect to the server from the client?

Offline chicken

  • *
  • Posts: 62
Re: Trouble with multiplayer
« Reply #2 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.


Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Trouble with multiplayer
« Reply #3 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?

Offline chicken

  • *
  • Posts: 62
Re: Trouble with multiplayer
« Reply #4 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?


Offline dustNbone

  • *
  • Posts: 99
Re: Trouble with multiplayer
« Reply #5 on: March 19, 2012, 06:18:42 AM »
Sounds like sea level might have changed?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Trouble with multiplayer
« Reply #6 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?

Offline chicken

  • *
  • Posts: 62
Re: Trouble with multiplayer
« Reply #7 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9565
  • Languages: De,EN,JP
Re: Trouble with multiplayer
« Reply #8 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".

Offline chicken

  • *
  • Posts: 62
Re: Trouble with multiplayer
« Reply #9 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.