Matchmaking
RGNCoreBuilder.AddModule(new
MatchmakingModule());
MatchmakingModule module = RGNCoreBuilder.I.GetModule<MatchmakingModule>();
string gameType = "practice";
StartMatchResponseData response = await module.StartMatch(gameType);
- string gameType - game mode for match
Return StartMatchResponseData object, which contains following fields:
- string matchId - empty if finding match is failed by any reason
MatchmakingModule module = RGNCoreBuilder.I.GetModule<MatchmakingModule>();
string gameType = "practice";
string matchId = "matchId";
float score = 322;
SubmitMatchScoreResponseData response = await module
.SubmitMatchScore(gameType, matchId, score);
- string gameType - game mode for match
- string matchId - identifier of current match
- float score - score to submit
Return SubmitMatchScoreResponseData object, which contains following fields:
- int status - 200 if ok
MatchmakingModule module = RGNCoreBuilder.I.GetModule<MatchmakingModule>();
GetMatchmakingHistoryResponseData response = await module.GetHistory();
Return GetMatchmakingHistoryResponseData object, which contains following fields:
- List<MatchmakingRecord> history - detailed list of previous played matches
Details of MatchmakingRecord:
- string id - unique address of wallet
- long createdAt - time of start match
- long finishedAt - time of finish match
- string gameType - game mode which was selected when finding match
- string hostId - user id of match initiator
- float hostSkill - level of play skill of match initiator
- float hostScore - score of match initiator
- string opponentId - user id of connected player
- float opponentSkill - level of play skill of connected player
- float opponentScore - score of connected player
- string appPackageName - game identifier where was match
Last modified 5mo ago