Multiplayer Components and Customization #
Pragma Engine Multiplayer services manage the workflow for grouping players into parties, matching parties, and getting into a game. Let’s take a look at the components that must work together for a successful game flow.
Player client #
This is the software running on a player’s machine, which is how a player experiences a game. The player client is responsible for everything the player sees, and for sending and receiving data from your game service, which consists of Pragma Engine, your game server, and any other in-house or third party services you might be using.
Pragma Engine services #
The engine has several services working in concert to get players matched up and playing.
Service | Description |
---|---|
Party service | Allows players to group up and make pregame selections. These pregame selections may include settings such as difficulty, game mode, characters, or cosmetics. |
Matchmaking service | Responsible for comparing parties to form appropriate matches to send to the game server. |
Game Instance service | The middleman between the Pragma services. Responsible for coordinating everything that happens after the Matchmaking service successfully finds a match, such as requesting the start of a game session, communicating connection information to game clients, and processing the results of completed game instances. |
Fleet service | Keeps track of the status of game servers in order to allocate a game instance on an available game server. |
Some of these behaviors can be customized or extended through plugins.
Game server #
Studios are responsible for authoring the game server, which hosts the software responsible for everything a player sees and does while involved in a game instance. The game server is expected to report to the Pragma backend when the game instance is ready so the server and backend can link. The Pragma Match API provides functionality to assist with making these calls.
To learn about game servers, see Game Server Management topic.
Customizing multiplayer services #
Pragma provides SDKs for Unreal and Unity, as well as customizable backend plugins to facilitate multiplayer services.
Pragma multiplayer SDKs #
Pragma provides the following APIs that developers can use to facilitate multiplayer-related processes:
API | Used by | Example tasks |
---|---|---|
PartyApi | Player client | Join a party, send party invites, entering matchmaking |
GameInstanceApi | Player client | Create, join, or leave a game instance |
MatchApi | Game server | Connect players to a game instance, end a game |
To interact with the SDKs, you must first initialize them with the provided Initialize()
method in each API. For example, to use the PartyApi, call PartyApi.Initialize()
:
Player->PartyApi().Initialize();
Pragma Engine multiplayer plugins #
The following backend plugins allow you to customize how the Pragma multiplayer components work together. See Plugins and Extension Data for general information on Pragma plugins.
Plugin | Description |
---|---|
Party Plugin | Enables the customization of in-party behaviors. |
Matchmaking Plugin | Contains all matchmaking logic. |
Game Instance Plugin | Prepares custom data about the game instance. |
Game Instance Host Plugin | Called to prepare any custom data to be used by FleetPlugin.selectServerPool to help select a server pool for the game instance. |
Game Instance Matchmaking Plugin | Prepares custom data about a game instance that is entering matchmaking. |
Fleet Plugin | Facilitates allocating a game server for the players. |