Integration best practices

This topic guides you on how to get the most out of Multiplay's services. This is not an exhaustive list of recommendations but rather the top tips to get your project working its best.

Process cleanup

At the end of a game session, Multiplay recommends you use one of the following methods to “clean up” and prepare the game server for the next session.

  • Return to a lobby or a ready state.
  • Exit the process gracefully (for example, exit code 0), then Multiplay restarts the process to a ready state.

Returning to the lobby (or a ready state) is preferable to restarting the game server process. Terminating the game server process at the end of a match is a less optional resource use because it’s typically more expensive to restart a process than it is to clean up a process.

Executable names

Multiplay specifies the name of your executable on its back-end to allow the system to locate your binary at startup. If you change the name of your binary files, you must let Multiplay know. Otherwise, your server instances won’t start correctly.

Ports

Multiplay doesn’t block any ports on its platform in the range of 8100 to 65355. To learn more about bindable ports, see Why does Multiplay require bindable ports?.

Note: Contact the Multiplayer Support team if you want to block any ports within the allowed range.

Universally unique identifiers (UUIDs)

If you want to use allocations for backfill requests, you must configure your binary to read the Session ID from a file (for example, serverconfig.json) on an event trigger. You can configure Multiplay's matchmaker to use any JSON formatted file by specifying it at startup with the -serverjson=<file> command-line argument.

Event triggers vary across operating systems. You can use a library to watch the file system for changes or you can continuously poll the file for changes. Keep in mind that continuously polling for file changes might lead to performance issues.

Child processes

Multiplay advises against starting additional programs (for example, DataDog, Filebeat) as child processes beneath your game server process. Starting third-party programs in this way increases the likelihood of rogue processes that consume unnecessary compute power if your game server process crashes without initializing garbage collection operations.

Game image updating format

Multiplay requires you to upload your game server files to an AWS S3 bucket, GCP bucket, or Steam. Multiplay recommends uploading your game server as loose files as it allows for easier image comparison and upload to your fleet machines.