Page 1 of 2

How to run a multiplayer server?

Posted: Wed Jun 07, 2017 4:09 am
by That One Guy
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.

Re: How to run a multiplayer server?

Posted: Wed Jun 07, 2017 6:21 am
by Corbeau
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.

Re: How to run a multiplayer server?

Posted: Thu Jun 08, 2017 2:38 am
by NateDogPack12
How do we start the server when the command prompt screen comes on? How do we know that it's on?

Re: How to run a multiplayer server?

Posted: Thu Jun 08, 2017 7:44 am
by Corbeau
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.

Re: How to run a multiplayer server?

Posted: Sat Jun 10, 2017 6:14 pm
by NateDogPack12
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?

Re: How to run a multiplayer server?

Posted: Sat Jun 10, 2017 8:24 pm
by Corbeau
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.

Re: How to run a multiplayer server?

Posted: Sat Jun 10, 2017 9:32 pm
by cazfi
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

Re: How to run a multiplayer server?

Posted: Sun Jun 11, 2017 4:16 am
by NateDogPack12
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.

Re: How to run a multiplayer server?

Posted: Sun Jun 11, 2017 6:35 am
by Corbeau
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.

Re: How to run a multiplayer server?

Posted: Sun Jun 11, 2017 9:06 am
by louis94
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