Skip to main content

beamable logo

Beamable can be configured to use Idem's matchmaking. To help setup we provide the following:

  1. Integration
  2. Unity package to create a microservice on Beamable that connects to Idem and makes its matchmaking available to your Beamable game.
  3. Demo
  4. Simple Unity integration to show usage of the integration.
  5. HATS Integration
  6. Fork of Beamable's sample game HATS, that uses Idem's matchmaker.

1. Integration

Git: beamable-integration
Idem integration into Beamable as a Unity package.

Installation

  • Install Beamable
  • Create an empty microservice with Beamable
  • Configure mandatory parameters in the Beamable portal:
    -> Your project -> Operate -> Config -> 'Idem' namespace
  • Install the package either from git link or by copying the source into the project
  • Deploy IdemMicroservice
  • Use IdemService methods to start/stop matchmaking and report game results
See parameters

Required configuration in 'Idem' namespace:

  • Username - Idem username
  • Password - Idem password
  • SupportedGameModes - comma separated list of supported game modes

Optional configuration in 'Idem' namespace:

  • PlayerTimeoutMs - inactivity delay in ms before a player will be removed from MM, default 5000
  • GlobalMatchTimeoutS - delay before a match will be considered abandoned and removed from MM, default 86400
  • MatchmakingTimeoutS - delay before matchmaking is stopped if no match found, 0 to disable, default 0
  • Debug - not empty value will enable verbose logging and allow to use debug endpoints, default disabled

IdemService

StartMatchmaking

  • Starts the matchmaking process for the client
  • Takes game mode name and available for the player servers list
  • Game mode must be one of the specified in the config game modes list
  • Servers list values can be any valid string: server names, ip addresses, etc
  • If there is only one server for your game, you can use any value as long as it is the same for all the clients

StopMatchmaking

  • Stops matchmaking process and cancels unconfirmed match if any
  • When a match is ready, use CompleteMatch to finish it

CompleteMatch

Takes game length in seconds, map teamId -> team rank, 0 means the best result, map playerId -> score for score per player

IsMatchmaking

Returns true if matchmaking is in progress

CurrentMatchInfo

Contains all the details of the currently found match if any

event OnMatchmakingStopped

Called when the matchmaking process is stopped by the server

event OnMatchFound

Called when there is a match candidate but not all players confirmed

event OnMatchReady

Called when the match was confirmed by all the players and gameplay can be started

MatchInfo

  • ready - true if the match was confirmed and gameplay can be started
  • gameMode - game mode name of the match
  • matchId - unique id string of the match
  • server - server chosen for the match
  • player - list of players with their teamId and playerId

2. Demo

Git: beamable-demo
Idem integration into Unity Beamable

This repository contains a simple examples of using IdemService and IdemMicroservice

IdemServiceTest scene

Contains an example of IdemService usage. This is the API that should be used in the most cases: start/stop matchmaking and complete match. Delete save button can be used from a built player to clean PlayerPrefs so that the next started instance of the player got another player id and could be used to create a match.

DirectMicroserviceTest scene

Contains an example of IdemMicroservice usage. This is the lower level API that is used by IdemService and should not be used directly. The example is provided only for information and testing purposes.

3. HATS integration

Git: beamable-hats_idem
This is a fork of Beamable's sample game HATS utilising Idem's matchmaker instead of the Beamable build-in one. It requires the Idem micro service (see above) to be running.