Civ4 PitBoss Available

Just a heads up - I finally got pitboss and the .net component working on my 98 machine. The .net component needed installing first and then civ 4 - then all is fine. Install civ 4 first and it breaks pitboss when you install .net - i'm guessing this is a 98 quirk.

That said I did all of the above for the turn notifer but it appears that the .net code with respect to 98 and smtp don't work :(

Tals
 
Ok, so let me try to summarize.....

Situation.....
A) PITBOSS is running on a "dedicated" machine behind a router(i.e. machine separate from any of the clients.
B) Multiple game clients attempt to connect concurrently in a "mixed network" (i.e. at least one client behind the router and at least one on the internet side of the router)
C) The game is not a Gamespy mediated game.

The result is that some of us are having problems with the the second or higher client connecting.

One suggestion is that there is (at least at some point in the game) a peer to peer connection required between game clients which is not routed through PITBOSS. Obviously if this is true then the whole idea won't work as two PC's behind the router cannot make use of the same forwarded port. This peer to peer connection seems not to make sense (or at least be required) because game clients seems to work fine when they connect asynchronously.

I won't have time to test this for a couple of weeks since I am traveling so can someone start a game and have the players connect separate in-turn for the first turn or two and then try connecting simultaneously. It may also make sense to be clear and specify how the game turn section of the game is setup (timer, simultaneous turns etc...) Does this make sense to do?
 
ok, a bit of testing with Ethereal has proved interesting.

FIRST, IT APPEARS THAT ANY TIME YOU START A DIRECTIP GAME, CIV4 SENDS A PACKET TO A GAMESPY SERVER CONTAINING YOUR PRIVATE INTERNAL IP ADDRESS. THIS IS RED-FLAG BEHAVIOR FOR THOSE OF YOU WHO ARE CONCERNED ABOUT SPYWARE AND/OR PRIVACY.

Second, civ4 is definitely a peer-to-peer program, even when using PitBoss. in the game we just started (2 humans, 8 AIs, 2 players per team, simultaneous turns) there was nearly constant bidirectional traffic between my machine and both the PitBoss server and the other player. both my machine and the server were on my 'inside' network; the other player was connecting from outside. to make this work, I changed my machine from port 2056 to 2057, and defined forwarding rules on my router to direct traffic for udp 2056 to the PitBoss server, and traffic for udp 2057 to my own machine. I did not forward any tcp ports. this is consistent with the requirement in a peer-to-peer network for all participants to have a unique address/port combination.

Third, if you try to run both a PitBoss server *and* a game client that are both on the inside of a NAT, and you try to use the same port on both, it doesn't work. for our test, I started the server (listening on udp 2056), set a forwarding rule for udp 2056 to go to the server, then had a friend connect from the Internet. once he confirmed that he was connected, I tried to connect using the internal IP address of the server. my client (which was set to udp 2056 also) immediately connected to the server (as well as phoning home to GameSpy; who knew that they're literally spying on my gaming?) then spent 15 seconds sending packets to the other player, trying to initiate a connection. after receiving no replies (presumably because replies were being sent to the server rather than my own machine, since the router was forwarding udp 2056 traffic there), my client spent 30 seconds trying to send packets to the other player USING HIS PRIVATE IP ADDRESS. I'm sure he never got any of those packets. after 30 seconds of that, my client gave up and sent me back to the host/join screen.

so, it appears that the secret to making things work when you have multiple users sharing an IP address is, assign each user a unique udp port. I recommend that you do not attempt to change the PitBoss server port (if it's even possible); I'm pretty sure it must listen on udp port 2056 in order for other players to be able to reach it, unless there's some syntax I don't know about that lets you specify a port when you connect to a server. once you've connected to the server on the 'known' port, it will tell you the addresses and 'unknown' ports for all the other players, so that the rest of the peer-to-peer mesh network can be set up.

-ken
 
It's just as easy to change the port pitboss operates on, using the same ini setting as a game. And I'm operating my pitboss app on 2057 right now as 2056 is routed(using WinXP ICS in my case) to my normal Civ4 machine. So either way works fine.

CS
 
if you change your pitboss to 2057, how do the clients know how to reach it? is there some syntax to tell the clients what port pitboss is listening on? addr : port perhaps?

-ken
 
Well if it's a "internet" game listed in the lobby then it's transparent to the joining player. But if it's a DirectIP game you must add the different port, i.e. 123.45.567.99:2057. The same thing is used on a LAN side join but it'd be 192.168.xx.xx:2057 etc.

CS
 
Great work troubleshooting!!!! I'll give this a try as soon as I get back to my server.
 
CanuckSoldier said:
Well if it's a "internet" game listed in the lobby then it's transparent to the joining player. But if it's a DirectIP game you must add the different port, i.e. 123.45.567.99:2057. The same thing is used on a LAN side join but it'd be 192.168.xx.xx:2057 etc.

CS

So just to clarify if I change my game servers port to 2057 and advise all the players to connect to that (port forwarding that port and using the syntax above) Then I shouldn't have issues with some players connecting within the LAN and others outside the LAN?

Tals
 
Tals -

Yes, setting your server port to 2057 will allow you have a client locally (on the same private network) to the server with their port left at 2056. The real issue is "sharing" of any port when using NAT behind a firewall.

As long as both machines behind the firewall on the same network use different UDP ports for Civ you will be in good shape.

***EDIT***

After reading your post again, it sounds like you want to have multiple clients on the private network participating with multiple clients via the internet?

Each client that is local to the server will need to have a unique UDP port for Civ because they need to use NAT to communicate with the Internet clients. In that scenario I would configure each LAN clent to have a different UDP port and leave the server at 2056.
 
Ahh no my situation is:
1 Server - hosting pitboss
1 PC - playing the game/ never serving (unless as a backup for pitboss)
External users connecting to Pitboss

I only ever use direct connect not gamespy

Do I need to have different UDP ports or is 2056 fine for the above

Tals
 
OK I have a bit of a connundrum that I am hoping someone has an idea on. As you know I have a windows 98 pitboss server. Now I have discovered that if I restart the pc pitboss will then not run:-
falls over witha page fault in msvcr71.dll in step 6/9 (init XML) Now I had previously thought this was down to .Net but it's not its the fact I reboot the pc.

The solution is amazingly to reinistall Civ iV and the 1.52 update and then it is fine! But that is quite a long process to handle a simple reboot of a pc :(

Any thoughts what I need to be looking at

Tals
 
Is there any chance that we can start maybe a Q&A post or something at the start of this thread? I really think there's a lot of good information here, but it'd be nice if there was a summary at the beginning of the thread so we didn't have to try to sift through 11 pages before posting a simple question.

Not sure how many of you have ever been to fatwallet, but they have a kind of neat "Quick Summary", which basically allows anyone to edit the second post in the thread. That way you can find things without having to spend a day reading all of the posts.
 
For your situation Tals, just make sure that the server and the client operating on the same private network use different UDP ports. I would leave your server at 2056 and set your client machine to port 2057 in the ini file.

If you are firewalled then there will be additional work like Ken mentioned above to open the ports and make sure the forwarding rules are correct.

Leaving the server on 2056 makes it easier for your internet clients to connect... No changes needed for them, just DirectIP to your PitBoss Server IP address.
 
Felix928 said:
For your situation Tals, just make sure that the server and the client operating on the same private network use different UDP ports. I would leave your server at 2056 and set your client machine to port 2057 in the ini file.

If you are firewalled then there will be additional work like Ken mentioned above to open the ports and make sure the forwarding rules are correct.

Leaving the server on 2056 makes it easier for your internet clients to connect... No changes needed for them, just DirectIP to your PitBoss Server IP address.

Excellent that is what I thought - I do think there is an issue with multiple internet clients + a local client but i've not tested enough. I have a game on Thursday with pitboss so will know more

Tals
 
quick status update -- after posting our test results last night (testing a pitboss server with 1 inside client and 1 outside client), we managed to get a game running with the pitboss and 3 clients total (1 inside, and 2 outside) and 9 AI players.

for the most part, everything worked fine. the only issue we had was that for some reason the second outside client was trying to use port 62455, rather than 2056. we don't yet know whether this was due to an error in the .ini file, or a port being remapped by that player's network equipment, but once we became aware that it was happening and made adjustments to deal with it (putting a forwarding rule on his router for 62455 I think, though I don't know for sure what he did exactly) everything worked fine.

we played without incident for 2 hours.

-ken
 
verdin77 said:
Ok, so let me try to summarize.....
Excellent! Has anyone tried multiple pitbosses on the one server then? I guess the following issues would stand in the way:
-Pitboss not taking a port option, so you'd have to either have multiple copies of the game files, or change the ini file after the first pitboss has started.
-Is it neccesary to actually install the game to run pitboss, or is a copy of an installed game directory enough? If you need to install it (ie if pitboss requires registry entries), it'd also hinder running under WINE.
 
It is possible to have a more than one copy of Civ4 on a machine, I've used this myself to keep different versions of Civ4. So it might be possible to make a copy of Civ4 and use different pitboss.exe that are set to use different ports, I haven't tested this, and it would take a large chunk of your HD.

As far as running under WINE, I'm not a Linux guru so you'llhave to run those experiments yourself.

CS
 
I installed PitBoss last night and so far so good. 3 users have successfully connected and we'll start running through some turns after the last one joins up.

The only problem I've had so far is one time during my initial testing the server appeared to "lose" the password for my nation. I had to reload in a save file I had and it worked fine after that. I'll shout out here if I hit this again.

If there's anything else I can do to help the beta testing process then please let me know.

Thanks,

Bernout
 
Top Bottom