Planetary Annihilation: TITANS

Planetary Annihilation: TITANS

Not enough ratings
Hosting a Local Server
By Quitch
How to host a lobby, configure the number of players, and make sure people can connect to it.
2
   
Award
Favorite
Favorited
Unfavorite
Introduction
As of build 116242 the default for any non-ranked lobby, multiplayer or single player, is to host the server on your machine i.e. a local server. This can allow for bigger systems, more players, and better sim speeds, so long as your machine and connection is up to it.

Any server in the browser which shows its region as "Custom:local" is using a local server.

This guide will explain:
  • The difference between a local server and an online one
  • The requirements of a local server
  • How to disable local servers
  • How to configure the maximum number of players
  • How to check that players are able to connect to your server
  • How to resolve UPnP errors
Local vs. online servers
Planetary Annihilation: TITANS (PA) operates using a client-server model[en.wikipedia.org].

Local server
PA local servers are listen servers, a server that is running on the same machine as the client. You are hosting the server with one process, while joining it with another. The server process is then able to utilise the power of your machine for optimal performance. PA's biggest bottleneck is a CPU's single-threaded performance, and modern PC's will provide a higher performance ceiling.

This is the default for single-player and non-ranked multiplayer games.

Pros
  • Higher performance ceiling
  • No additional latency for the host
  • Other lobbies cannot impact your game
  • Control over the total player slots
Cons
  • Possible higher latency for other players
  • Anything that affects your hardware will affect all players
  • Increases local hardware requirements
Online server
An online server is hosted by PA Inc and means the simulation's (sim) performance is independent of your PC hardware, only frame rate is impacted by your PC. Other players will not see the sim slow down because you're running a potato. Each server will host multiple games, and the actions of players in one game may affect players in another.

This is the default for ranked games.

Pros
  • Higher reliability
  • Lower local hardware requirements
Cons
  • Multiple games per server means other lobbies can impact your experience
  • Limited to 10 players
  • Lower performance ceiling
Local server requirements
The recommended specifications for a local server are:
  • Quad core CPU
  • 8GB RAM (PC with dedicated GPU)
  • 12GB RAM (PC with integrated GPU)
  • 2Mbs upload bandwidth for each non-AI player
If you are running the minimum amount of recommended RAM you should also close any other running applications to ensure enough of that memory is available for use.

To minimise latency, stop any other process which is using your Internet connection.
Any server mods you are running will be upload to every client that joins your server, the more upload bandwidth you have the faster this process will occur. Be sure to disable any non-essential sever mods before hosting,

Your GPU will have no impact on the performance of the server.
Changing the maximum number of players
By default, you can only host six players on a local server, but this can be changed. An online server has a maximum of ten players and cannot be changed.

You can change the maximum number of slots for a local server using the launch option --local-server-max-players=## where ## is the number you want e.g.
--local-server-max-players=32
Remember that you will need approximately 2Mbs of upstream bandwidth per player.
Failed to set UPnP
PA attempts to automatically open ports for local server hosting. If it cannot do so, either because your router doesn't support UPnP, or your OS doesn't, then you will see the following error.



See the section "Checking players can connect to your local server" for details on how to resolve this.

Conflict In Mapping Entry


If the description of the error is conflict in mapping entry then first try restarting both your PC and router. If the error continues it could mean that your router or ISP does not support mapping of the port PA requires. You will need to speak to your ISP about mapping port 20545. One user had to switch to a static IP for their ISP to provide this functionality.

Or you can switch to using online servers. See "Switching from a local server to an online server".
Checking players can connect to your local server
PA uses the following ports:
  • UDP 8192 (LAN beacon)
  • TCP 20545 (server)
Windows
PA uses UPnP[en.wikipedia.org] to automatically configure your router to forward connections to port 20545 to your PC for the duration of your PA session. The Windows Firewall rules are set up at time of install.

To see if people will be able to connect to your local server check the connection[www.portcheckers.com] to port 20545. You will need to have set your server to be accessible to FRIENDS or PUBLIC before testing, a PRIVATE server will report the port as closed. Make sure you create your game via MULTIPLAYER and not SINGLE PLAYER.

If the test fails then UPnP is either disabled on your router or is not supported. You will need to manually configure port forwarding on your router[www.noip.com] if you wish to use a local server for multiplayer.

If you prefer not to use UPnP and to set up port forwarding manually, you should disable UPnP in Settings - Server by setting Disable UPnP to ON.

MacOS & Linux
UPnP is not supported. You will need to manually configure port forwarding on your router[www.noip.com] if you wish to use a local server for multiplayer. You should disable UPnP in Settings - Server by setting Disable UPnP to ON.
Switching from a local server to an online server
A local server is recommended where possible, but you can use the methods below to opt-out.

Method 1 (recommended)
This method only applies to multiplayer lobbies.

Before creating a game from Multiplayer - Custom, uncheck the "Host game locally" box under CREATE GAME.

Method 2
To disable the local server component for both single-player and multiplayer, navigate to Settings - Server, and set the LOCAL SERVER setting to OFF.

It is recommended that you keep this setting to ON or AUTO, as a local server is almost always the better choice for single player. For multiplayer, method 1 is a better way to opt-out.