Skip to main content

Rolling tournaments

Unlike global tournaments, which are joined by invitation, rolling 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 a rolling 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 winner
  • Amount of the currency that will be awarded to the winning player

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

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

Each player can play only one match in the given rolling tournament, but many rolling 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 rolling tournament it will be concluded and rewards will be distributed. In a rare case where there are not enough players to complete a rolling tournament within 24 hours, the tournament will be cancelled and entry fees will be returned to the players.

Rolling tournaments can be configured with number of participants set to 2, making it possible to use them as asynchronous duels.

Creation

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

Fetching fees

To enter a rolling 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 a rolling 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 elements of the fee mentioned above. To get that information, use ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.TournamentCommunicator.GetRollingTournamentsFee. This method takes an array of rolling 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 a rolling tournament is to call Elympics.ElympicsLobbyClient.RoomsManager.StartQuickMatch and pass a properly configured instance of Elympics.Communication.Rooms.PublicModels.CompetitivenessConfig to it. To create desired configuration for a rolling tournament use CompetitivenessConfig.RollingTournament static method. To get a coin ID required by that method, you can use ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.VirtualDepositCommunicator.UserDepositCollection. The 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 rolling tournaments at once. Rolling tournaments are not included in the list of global tournaments a player is participating in. To get a list of the rolling tournaments a user participated in you need to call the ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.TournamentCommunicator.GetRollingTournamentHistory 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 ElympicsPlayPad.ExternalCommunicators.PlayPadCommunicator.VirtualDepositCommunicator. Before entering matchmaking for a rolling 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.

UI/UX sample

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

note

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 rolling 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 GetRollingTournamentsFee method, as described in fetching fees.

List of all rolling 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 GetRollingTournamentHistory method, as described in history.

Detailed view of a finished rolling tournament with 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 rolling tournament with local player's score highlighted. This panel is an alternative version ot the previous one. This version is displayed for rolling tournaments that have not finished yet.