How to run a multiplayer server?

Join us, meet players from all around the world, challenge the strongest top players, practice and be one of them!
That One Guy
Posts: 1
Joined: Wed Jun 07, 2017 4:02 am

How to run a multiplayer server?

Postby That One Guy » Wed Jun 07, 2017 4:09 am

I wanted to start a private multiplayer game with some of my friends but didn't know how to do it. I checked the wiki but it is very unclear. Halp me.

User avatar
Corbeau
Elite
Posts: 744
Joined: Mon Jan 13, 2014 11:13 pm

Re: How to run a multiplayer server?

Postby Corbeau » Wed Jun 07, 2017 6:21 am

Firstly, start the server. It's a program that is included in the standard FreeCiv Windows package. Then find out the IP address of the computer you're running it on. Then have everybody who wants to play start the client (another program, basically the first one you see) connect to that IP with port 5556, and that's it.

NateDogPack12
Posts: 18
Joined: Fri Jun 02, 2017 5:17 pm

Re: How to run a multiplayer server?

Postby NateDogPack12 » Thu Jun 08, 2017 2:38 am

How do we start the server when the command prompt screen comes on? How do we know that it's on?

User avatar
Corbeau
Elite
Posts: 744
Joined: Mon Jan 13, 2014 11:13 pm

Re: How to run a multiplayer server?

Postby Corbeau » Thu Jun 08, 2017 7:44 am

If the command prompt is on, it means you started the server. If you mean start the game, you can do that from both the client and the server (I think) by typing /start.

NateDogPack12
Posts: 18
Joined: Fri Jun 02, 2017 5:17 pm

Re: How to run a multiplayer server?

Postby NateDogPack12 » Sat Jun 10, 2017 6:14 pm

Corbeau wrote:If the command prompt is on, it means you started the server. If you mean start the game, you can do that from both the client and the server (I think) by typing /start.


Thanks for all your help. If I START the server and THEN load a scenario within the client to edit options and things like that, will my friends be able to connect to the scenario I created in the client? In other words, are the server and the client separate, or does my server allow them to connect to the games I customize in the client?

User avatar
Corbeau
Elite
Posts: 744
Joined: Mon Jan 13, 2014 11:13 pm

Re: How to run a multiplayer server?

Postby Corbeau » Sat Jun 10, 2017 8:24 pm

I'm not an expert, but I'd say there is only one game running on a server and whatever you do on it, it is *that* game on *that* server. If yuo can control it via client, you are still controlling that game, the same way you'd control it via the server.

So, in short, I'd say the answer is "yes", but, again, I'm not an expert.

cazfi
Elite
Posts: 1505
Joined: Tue Jan 29, 2013 6:54 pm

Re: How to run a multiplayer server?

Postby cazfi » Sat Jun 10, 2017 9:32 pm

NateDogPack12 wrote:Thanks for all your help. If I START the server and THEN load a scenario within the client

If you really mean loading a scenario file, and not just changing game settings (or editing map in the built-in editor), then you do that in the server. The "Start Scenario Game" button in the client actually starts a new server internally, and loads a scenario to it.
While you can mix and match separately launched server and adjusting some server settings from the client UI, it's probably simplest to do everything for such separately launched server in its own command prompt.

1) Launch server
2) Launch client -> Connect to Network Game -> host: localhost, port: 5556, Connect
3) The others do (2), but with a "host:" that is your computer network name / IP address

NateDogPack12
Posts: 18
Joined: Fri Jun 02, 2017 5:17 pm

Re: How to run a multiplayer server?

Postby NateDogPack12 » Sun Jun 11, 2017 4:16 am

How can they connect to my game if I don't use the "server" in step one at all? Can I set everything up from the client and have people join me?

We had a great time on CivWeb tonight, but there are limitations.

Here is what I want to do: I want to play the BigEarth 500x25 scenario and I want two people to be able to join me. They are not on a local area network.

User avatar
Corbeau
Elite
Posts: 744
Joined: Mon Jan 13, 2014 11:13 pm

Re: How to run a multiplayer server?

Postby Corbeau » Sun Jun 11, 2017 6:35 am

You can't eat soup with a fork and you can't run a multiplayer without the server. That's what the server is for.

louis94
Hardened
Posts: 193
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: How to run a multiplayer server?

Postby louis94 » Sun Jun 11, 2017 9:06 am

NateDogPack12 wrote:Here is what I want to do: I want to play the BigEarth 500x25 scenario and I want two people to be able to join me. They are not on a local area network.


You'll need to find where the scenario file is located in your computer. It's a file called "earth-500x250-v1.1.sav". I don't know where they are stored on Windows. Let's call the full location (ie the file path beginning with C:\) SCENARIO_FILE.
  1. Start the server. (When you get to the command prompt, the server is started. You can check it by entering "/help" and hitting Enter.)
  2. Start the client, choose "connect to network game"
  3. Hit the "Connect" button
  4. In the chat bar at the bottom, type "/load SCENARIO_FILE"
  5. You should see messages about players being added
  6. Change any other option as usual, in the settings dialog
  7. Find your public IP (click here, it looks like x.y.z.t where all x, y, z and t are numbers)
  8. Open another client and choose "connect to network game" too
  9. In the "Host" field, enter your public IP
  10. Hit the connect button
  11. If it works, you should see the player list and so on (else come back here and we'll help you)
  12. Close the second client, you won't need it anymore
  13. Tell your friends about your public IP and steps 8-11
  14. The game starts when everyone (connected) has pushed the "Start" button
If you have any problem, feel free to ask. Don't post your IP.

Louis