Skip to main content

Instant tournaments

Unlike social tournaments, which are joined by invitation, instant tournaments are joined automatically through matchmaking. The game client only has to specify the bet amount and the number of opponents a player is willing to compete against and the matchmaking system will find other users for a competition with the given parameters.

Specific configuration for an instant tournament is defined by the following parameters:

  • number of players that will participate in the tournament
  • currency used to pay the tournament entry fee and pay out the prize to the winners
  • percentage of the reward pool each of the top players will receive

Note that the reward distribution can be set up in any way you like, which means that 100% of the prize pool can go to the best player or it can be distributed in any other way among any number of the top performing players. Instant tournaments can also be configured with number of participants set to 2, making it possible to use them as asynchronous duels.

From the user perspective it boils down to two steps that can be repeated in a loop:

  1. Select an instant tournament configuration offered by the game.
  2. Play a match.

Each player can play only one match in the given instant tournament, but many instant tournaments can exist simultaneously, so a player can join as many competitions as they want, even with the same configuration. Each time enough players join the given instant tournament it will be concluded and rewards will be distributed. In a rare case where there are not enough players to complete an instant tournament within 24 hours, the tournament will be cancelled and the entry fees will be returned to the players.

Creation

New instant tournaments are created by the matchmaking system as needed, whenever a game client requests to join an instant tournament with specified parameters and there are no matching active instant tournaments. This means that the number and type of instant tournament configurations available to players are defined by the game developer on the client side.

Fetching fees

To enter an instant tournament a player needs to pay an entry fee. Most of that fee is made up of the prize pool for the tournament divided by the number of participants. It also includes a commission for the game developer and Elympics as well as a fee for processing the blockchain transaction (gas fee). Before the exact entry fee for an instant tournament with the given configuration can be displayed, it needs to be fetched from the backend, which holds the up-to-date information about all the elements of the fee mentioned above. To get that information, call the ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.TournamentCommunicator.GetInstantTournamentsFee method. This method takes an array of instant tournament configurations as a parameter, so you can fetch fees for all the configurations you want to offer to your players with one query.

Matchmaking

The simplest way to start a match in an instant tournament is to call the Elympics.ElympicsLobbyClient.RoomsManager.StartQuickMatch method and pass a properly configured instance of the Elympics.Communication.Rooms.PublicModels.CompetitivenessConfig class to it. To create the desired configuration for an instant tournament use the CompetitivenessConfig.InstantTournament static method. To get a coin ID required by that method, you can use the ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.VirtualDepositCommunicator.UserDepositCollection property. This property is a list of all available battle wallets and coins used by them. More information about battle wallets can be found in the battle wallet section of this document.

History

A user can be enrolled in several instant tournaments at once. Instant tournaments are not included in the list of social tournaments a player is participating in. To get a list of the instant tournaments a user participated in you need to call the ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.TournamentCommunicator.GetInstantTournamentHistory method. This method has two required parameters:

  • maxCount - limits the number of fetched history entries
  • skip - number of most recent history entries to skip

Battle wallet

Each player has a battle wallet to which they can transfer the funds they want to spend on entry fees and to which they will receive any prizes they win. Funds stored on a battle wallet can be withdrawn by the player at any time. To get information about the current state of a player's battle wallet, you can use the ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.VirtualDepositCommunicator property. Before entering matchmaking for an instant tournament, a player's battle wallet must contain enough funds to cover the entry fee. If there are not enough funds, PlayPad will show a prompt asking the user to add funds. If the process fails for any reason, entering matchmaking will fail. To give your user a chance to withdraw their funds from the battle wallet or to top it up you can call the DisplayDepositPopup method which will display a PlayPad popup with the necessary UI. Users can also manage the funds on their battle wallet on their own, by expanding the PlayPad island displayed at the top of the screen.

UI/UX sample

There are many different ways in which a game can present instant tournaments to a player and this section provides an example of one of many possible UI/UX flows.

info

All UI examples in in this section use $ as the currency symbol, but in an actual game it would have to be replaced with a symbol matching the specific coin used in the tournaments.

List of all instant tournament configurations available in the game allowing a player to select one of them and join matchmaking. The entry fee displayed for each configuration is fetched using the GetInstantTournamentsFee method, as described in fetching fees.

List of all instant tournaments a player has participated in. Some of them can still be ongoing, waiting for other players to join, and some can be finished, with final results available. Each of those entries can be clicked to open a panel with more detailed information. All the information displayed in this panel can be fetched using the GetInstantTournamentHistory method, as described in history.

Detailed view of a finished instant tournament with the local player's score highlighted. This panel can be accessed from the previous one and displays information that was already fetched there.

Detailed view of an ongoing instant tournament with the local player's score highlighted. This panel is an alternative version ot the previous one. This version is displayed for instant tournaments that have not finished yet.