Readme if you have problems with multiplayer
Moderator: OpenTTD Developers
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
-
- Engineer
- Posts: 3
- Joined: 29 Jun 2004 16:16
Arrrrgh!!
A friend and me are trying to play over the internett, but we encounter problems.
When He tries to connect to me, it says: "Connect failed"
Same when i try to connect to him.
We have same openttd.cfg
We use the -n -p 0 on server and -n ip on the joiner.
I can connect to my self over my internet IP
WHATS WROOOOONG!!??!
I really love this game, especially over a network
We got broadbands, may it be a build-in firewall stopping us? We have changed our port to 253 or something..
When He tries to connect to me, it says: "Connect failed"
Same when i try to connect to him.
We have same openttd.cfg
We use the -n -p 0 on server and -n ip on the joiner.
I can connect to my self over my internet IP
WHATS WROOOOONG!!??!
I really love this game, especially over a network
We got broadbands, may it be a build-in firewall stopping us? We have changed our port to 253 or something..
OpenTTD
Play for fun everyone
Play for fun everyone

-
- Engineer
- Posts: 3
- Joined: 29 Jun 2004 16:16
ahh..... rait..
Hmm.. And how should I do that ?
I know a little about computers, but I never heard about that problem..
Do u mean ping or IP ?
I know a little about computers, but I never heard about that problem..
Do u mean ping or IP ?
OpenTTD
Play for fun everyone
Play for fun everyone

Re: ahh..... rait..
If you want to play over the internet you have to create a direct connection between those 2 computers. If you're behind a router you'll have to configure port-forwarding on this device (inside: port 12345 ~ outside: port 12345). Then if the other person is also behind a router, then he has to do the same.Goat_of_fun wrote:Hmm.. And how should I do that ?
I know a little about computers, but I never heard about that problem..
Do u mean ping or IP ?
At last... you don't have to use "-p 0" on the server because you're allready player 0!
-
- Engineer
- Posts: 3
- Joined: 29 Jun 2004 16:16
:D
Ok. That makes sense.
But my fu**ing ISP got their (The router belongs to them, sick or what) router locked. There are no way to change the router
But thanks anyway
But my fu**ing ISP got their (The router belongs to them, sick or what) router locked. There are no way to change the router

But thanks anyway

OpenTTD
Play for fun everyone
Play for fun everyone

i tried patching it into the current svn, and noticed a problem:lucaspiller wrote:Finshed the patch, get it from http://sourceforge.net/tracker/index.ph ... tid=636367. Also posted a topic about it.
Code: Select all
CloseClient();
Code: Select all
CloseClient(&_clients[0]);
and added a declaration in front of this function:
Code: Select all
static void CloseClient(ClientState *cs);
i've now tested this with a friend for several hours.
it seems to work great, at least we didn't notice any desyncs. of course this could be of some bugfixing in the latest nightly build, but when we changed some settings on one machine to provoke a desync, your autoreconnect worked fine.
i just noticed one problem: when you shutdown the server, the client hangs infinitely (i guess it's trying to reconnect all the time). i then had to kill the client with the taskmanager.
it seems to work great, at least we didn't notice any desyncs. of course this could be of some bugfixing in the latest nightly build, but when we changed some settings on one machine to provoke a desync, your autoreconnect worked fine.
i just noticed one problem: when you shutdown the server, the client hangs infinitely (i guess it's trying to reconnect all the time). i then had to kill the client with the taskmanager.
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
tecxx, a zip file would do fine, for the source. A tarball is just the standard unix file compression format! 
I'd like the binary too, but the source is the most important thing, as me and my friend both run Mac OS X. I guess you don't have a binary for that, so I'll just compile it myself if you could provide a patched openttd source... Zip is fine

I'd like the binary too, but the source is the most important thing, as me and my friend both run Mac OS X. I guess you don't have a binary for that, so I'll just compile it myself if you could provide a patched openttd source... Zip is fine

- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
Ok I am trying to implement the changes you suggested tecxx but whenever I do and the client tries to reconnect I get a Broken Pipe error and the server quits.
Can you see if it works for you - if so hmmmmm, if not can you see if you (or I) missed out anything? Also it is against the latest SVN so you shouldn't have any problems merging it.
Also the client hanging when the server quits is a problem with the game not my patch.

Also the client hanging when the server quits is a problem with the game not my patch.
- Attachments
-
- no_crash_on_sync_error-1.1.patch
- Broken patch for tecxx to look at. Doesn't appear to work on Linux.
- (6.32 KiB) Downloaded 291 times
Please no "silent" recovery
One of the changes between Railroad Tycoon 2 Platinum Edition and earlier Versions of Railroad Tycoon 2, including TSS, was the suppression of the "Out of sync - #" error message that would pop up when the game came out of sync. The number, without knowing the exact meaning of it, signified how bad the desync was - higher number == worse.
The developers had decided to remove this error because "it almost never had any significance anyway" (quote from an email from one of the developers).
Contrary to their experience, however, in my experience and that of my friends, the error was alsways significant, and without this simple way to tell the game was out of sync, we were actually left with a much worse game than earlier.
My point being, please do not just make it reconnect automatically without the playing knowing, as this might hide network related problems or other issues that are better brought to the attention of the players.
Simply make it flash or show some simple message about "attempting to recover from network sync error" or similiar.
The developers had decided to remove this error because "it almost never had any significance anyway" (quote from an email from one of the developers).
Contrary to their experience, however, in my experience and that of my friends, the error was alsways significant, and without this simple way to tell the game was out of sync, we were actually left with a much worse game than earlier.
My point being, please do not just make it reconnect automatically without the playing knowing, as this might hide network related problems or other issues that are better brought to the attention of the players.
Simply make it flash or show some simple message about "attempting to recover from network sync error" or similiar.
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
Imediately after the game relalises there is a desync (usually within a second or so) it will disconnect, or with my patch reconnect. The only reason (I think) why you get these is because of a bug in the code or because you have rather high ping times. I don't know what other errors could cause this, but if it does desync and reconnect you will realise because it will, a. pause for a little while (if you are playing over the net this could be a long while) and b. show a message on the console.
Who is online
Users browsing this forum: No registered users and 1 guest