This page says what the plugin’s server code does. To build and upload your server, see Unreal Engine.

When it runs

The server part only runs when your game runs as a server. In a player’s game it does nothing.

Match details

When the server starts, the plugin reads its_simpl.json from /simpl/its_simpl.json. It reads it once. Only server_id is required in the file. The plugin logs a line if the file is missing and keeps running. In C++ or Blueprints, get the details with GetItsSimpl(). It has the match ID, queue ID, region, version tag, ports, lobby IDs and players. Each player has a Team, a Role and a state. IsOnSimpl() tells you if the file was read. To read the file from another place, start the server with -SimplItsSimplPath=<file>.

Saying the server is ready

The plugin tells Simpl the server is ready, one time, when the server starts listening for players. You do not need to do it yourself. If it does not, Simpl marks the server ready by itself after a 30 second grace period.

Ending the match

Call EndMatchAndExit() when the match is over. It tells Simpl the server is empty, waits a short time for the answer, and then closes the server. Simpl then stops the server. In Blueprints it is the End Match And Exit node. There is also a console command, Simpl.EndMatchAndExit. To close the server when the last player leaves, start it with -SimplExitWhenEmpty. This is off by default. It works like this:
  • It calls EndMatchAndExit() when the number of players goes back to 0.
  • It only starts counting after at least one player has joined.
  • It does not wait. A player who drops for a moment can end the match.
Closing the server in any other way does not send that message. See Stop a server and billing.

Heartbeats

The plugin sends no heartbeats. If your game sends its own heartbeats and then goes silent for 120 seconds, Simpl removes the server.

Ports

Your game port must be named game. The client only reports the server as ready when it finds a port with that name. For how to set ports and what to listen on, see Ports and environment.

Server settings

These are in Config/DefaultGame.ini, in the section [/Script/SimplServer.SimplServerSettings].