To turn a machine into a game server, you need to do the following:
Step 1: Provision the game server binaries
There are two ways to accomplish this:
- Automatically via the Bootstrapper. Refer to this: http://wartothecore.com/blog/2017/06/17/how-to-use-server-agent-bootstrapper/
- Manually.
- Copy the server binaries to the machine. Get them from Jenkins: http://build.forgottenmines.com:8080/job/Ballistic/lastSuccessfulBuild/artifact/Ballistic/Server/Photon/Server/deploy/deploy.zip.
- Put a server ID for the server in the registry key: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Forgotten Mines\GameServer under an “ID” String value. Put a GUID in that value.
- Launch the photon socket server either directly via the command line or via Photon Control.
Step 2: Setting Networking
- Open up port 5055 (or whichever port you configured for the server) in the Windows firewall in public domain, assign it to the Photon Socket Server executable.
- If the server is behind a router, then open the same port and forward the target port (which could be anything) to the server’s IP internal address to port 5055 for UDP & TCP.
- If you want to make the server available to others easily then it needs a static IP or hostname. If you don’t have a static IP, then use No-IP or another Dynamic DNS server to give it a fixed name that resolves to the IP. See http://wartothecore.com/blog/2018/07/17/adjusting-local-server-to-work-over-the-internet-public-using-no-ip/ for more details.
Step 3: Exposing it in the game
If you want to make the server show up in the game’s servers list, then you need to add it to our API (WebApiHost\Controllers\ServerInfoController.cs at the time of this writing). Then publish the API. This should make it accessible via http://api.wartothecore.com/api/ServerInfo.
Step 4: Test your server
Launch the game and try to connect to the new server or use the Test Client to test it.
Recent Comments