game-common / pragma.matchmaking / MatchmakingPlugin /
The MatchmakingPlugin is an extension point for defining all custom matchmaking logic within the engine. From here, the plugin author can manipulate every PotentialMatch as it enters matchmaking, as well as perform comparisons between two Matchables, checking to see if a complete match can be made.
Called during the main matchmaking loop. The ActiveMatch represents a live match that has re-entered matchmaking, and this method will not be called until a ActiveMatch has re-entered matchmaking requesting more players. The Matchable contains parties that could be added to the ActiveMatch. This method is called many times, evaluating each party that has joined the matchmaking queue.
Called during the main matchmaking loop. The PotentialMatch represents a collection of parties that could form the teams for a match. The Matchable are parties that could be added to the PotentialMatch. This method is called many times, evaluating each party that has joined the matchmaking queue. If the PotentialMatch is marked as ready to start, it will be removed from the matchmaking queue and sent to the game server. If a PotentialMatch is compared against every other Matchable in the queue and not marked as ready to start, the next matchmaking loop will run with a new PotentialMatch seeded with a different set of parties.
Called after completing a matchmaking loop to give the plugin a chance to start a match even if the match was not filled during the iteration.
Called with a new PotentialMatch before it enters matchmaking. Perform any validation logic or initial transformations to the PotentialMatch here. If the PotentialMatch is not valid, prevent it from entering matchmaking by throwing an ExtException.