docs/multiplayer.txt
changeset 543 e3b43338096b
parent 224 f4ec30638c90
child 786 aa75e1682d39
equal deleted inserted replaced
542:2f35c4770b06 543:e3b43338096b
    16  
    16  
    17  - if there were more then one server 
    17  - if there were more then one server 
    18    - select one in the list below the buttons
    18    - select one in the list below the buttons
    19    - click on "join game".
    19    - click on "join game".
    20 
    20 
    21  - if you want to play over the internet you should have the ip of the game server you want connect to.
    21  - if you want to play over the internet you should have the ip or hostname of the game server you want connect to.
    22    - click direct connect
    22    - click add server
    23    - type in the ip address or hostname
    23    - type in the ip address or hostname
    24    - if you want to add a port use :<port>
    24    - if you want to add a port use :<port>
    25    - if you want to connect as an special player use #<player-no>
    25    
       
    26  - now you can select a company and press: "Join company", to help that company
       
    27  - or you can press "Spectate game", to spectate the game
       
    28  - or you can press "New company", and start your own company (if there are slots free)
       
    29  
       
    30  - you see a progressbar how far you are with joining the server.
       
    31  
       
    32  - happy playing
    26    
    33    
    27 3. Connecting to a Server over the Console
    34 3. Connecting to a Server over the Console
    28 
    35 
    29  - open the console and type in the following command:
    36  - open the console and type in the following command:
    30   
    37   
    31     ]connect <ip/host>:<port>#<player-no>
    38     ]connect <ip/host>:<port>#<player-no>
    32 
    39 
    33 
    40 
    34 4. Playing Internet-Games
    41 4. Playing Internet-Games
    35 
    42 
    36  - since OpenTTD 0.3.4 you can also play internet games over higher latency connections.
    43  - since OpenTTD 0.3.5 the network protocol has been rewritten and is very stable, even over slow connections.
    37  - to do this the gameservers sync frequency should be highered to a decent value.
       
    38    - open the console [on the server]
       
    39    - type in the following command:
       
    40    
       
    41     ] *net_sync_freq = <4-80>
       
    42     
       
    43     default value: 4
       
    44     
       
    45    - this is lowering the sync frequency of the server and your game should be less laggy.
       
    46    - this is a server variable: it has nothing to do with the clients
       
    47    
       
    48  - you can also change when the clients ready packet is sent if you still have lags.
       
    49    - open the console
       
    50    - type in the following command:
       
    51    
       
    52     ] *net_ready_ahead = <1-8>
       
    53     
       
    54     default value: 1
       
    55     
       
    56    - in that way your client is sending its "i am ready for next sync" a bit earlier
       
    57      thats quite good for games where some players have higher latencies than the others.
       
    58    - this is a client variable: it has nothing to do with the server
       
    59  
    44  
    60  - to change the client timeout time
    45  - it can happen that a connection is that slow, or you have that many clients connected to your server, that your clients start to loose their connection. Some things you can do about it:
    61    - open the console [on the server]
    46  
    62    - type in the following command:
    47  - net_frame_freq:
    63    
    48     change it in console with: net_frame_freq = <number>
    64     ] *net_client_timeout = <30-x>
    49 	the number should be between the 0 and 10, not much higher. It indicates the delay between clicking and showing up. The higher, the more you notice it, but the less bandwidth you use.
    65     
    50 	
    66     default value: 300
    51  - net_sync_freq:
    67    
    52     change it in console with: net_sync_freq = <number>
    68    - warning: a too low value will disconnect your clients if they have a short lag
    53 	the number should be between the 50 and 1000, not much lower, not much higer. It indicates the time between sync-frames. A sync-frame is a frame which checks if all clients are still in sync. When the value it too high, clients can desync in 1960, but the server detects it in 1970. Not really handy. The lower the value, the more bandwidth it uses.
    69    
    54 	
    70   
    55  NB: changing net_frame_freq has more effect on the bandwidth then net_sync_freq. You should never change net_sync_freq!
       
    56  
       
    57 
       
    58 5. Some useful things
       
    59 
       
    60  - You can protect your company so nobody else can join uninvited. You do this with opening the console and then enter: protect <password>, where <password> is your password.
       
    61  
       
    62  - You can give other players some money via the ClientList (under the 'head' in the mainbar).
       
    63  
       
    64  - You can chat with other players via SHIFT+T or via the ClientList
       
    65  
       
    66  - Servers can now kick players, so don't make them use it!
       
    67  
       
    68  - From 0.3.5, desyncs should not happen anymore
       
    69  
       
    70  - From 0.3.5, patch-settings are also synced. You can now play without deleting openttd.cfg, and with, for example, extra large trains enabled.
       
    71