Backnd Match

From 1:1 matches to team matches, it is the first real-time PvP service in Korea.
Implement PvP modes you want with various options provided by Backnd.

  • Service without traffic issues

    Even if the number of users increases suddenly due to unforeseen events such as influencers, the server size automatically scales up, unlike other services.

  • Various matching modes and types

    Match users according to various conditions such as 1:1, solo, and team matches.
    In addition, you can match without criteria or match users according to their skill levels based on scores or MMR.

  • Real-time game environment

    Backnd Match is a service that creates a match between users according to set rules to provide a real-time game environment.

  • Additional features

    Various additional features such as result processing, reconnecting, and in-game chat are provided.

How to start Backnd Match

1. Activate Backnd Match in the console

Backnd Match is a service that matches game users based on rules.

  • Users must have nicknames.

  • Backnd Match must be activated in the console.

Read development documentation

2. Create a new match

Create a new match in the console.

Utilizing Backnd Match (Match Server)

1. Connecting to a matching server

Connect to a matching server.

// Matching server connection
Backend.Match.JoinMatchMakingServer(out errorInfo);
Backend.Match.OnJoinMatchMakingServer += (args) => {
  // Check the success or failure of the matching server connection
};

2. Creating a waiting room

Create a waiting room for match requests. Whether you request a match alone or with other users, you must create a waiting room.

  • The user who created the waiting room becomes the moderator.

Read development documentation
// Create waiting room
Backend.Match.CreateMatchRoom();
Backend.Match.OnMatchMakingRoomCreate += (args) => {
  // Check the success or failure of the waiting room creation
};

3. Inviting users

You can invite users to the waiting room. If you know their nickname, you can invite them.

//Invite user
Backend.Match.InviteUser(nickName);
Backend.Match.OnMatchMakingRoomInvite += (args) => {
  // Check the success or failure of the user invitation
};

4. Invited user’s entry

If the invited user sends an invitation acceptance message to the server, they will automatically enter the waiting room.

// Invite user
Backend.Match.AcceptInvitation(roomId, roomToken));
Backend.Match.OnMatchMakingRoomInviteResponse += (args) => {
  // Check the success or failure of the invitation acceptance
};
Backend.Match.OnMatchMakingRoomUserList += (args) => {
  // Receive waiting room information
};

5. Requesting a match

Request a match.

//Matching request
Backend.Match.RequestMatchMaking(
matchType, modeType, inDate);
Backend.Match.OnMatchMakingResponse += (args) => {
  // Check the success or failure of the matching request
};

6. Matching success

If the server finds users that meet the condition, a match is formed. The information below is then sent to all matched users.

  • Match success information (matching card inDate)

  • Whether or not there is a sandbox match

  • In-game server address to connect to

  • Information on the game room to access

//Matching success
Backend.Match.OnMatchMakingResponse += (args) => {
  // When matching is successful, the event is called once more as a success.
  // In-game information to proceed with the game is included in the event when matching is successful.
};

Utilizing Backnd Match (in-game server)

1. Connecting to the in-game server

When matching is successful, connect to the in-game server using the received in-game server address and port number.

// In-game server connection
Backend.Match.JoinGameServer(
serverAddress, serverPort, false, out errorInfo);
Backend.Match.OnSessionJoinInServer += (args) => {
  // Check the success or failure of the in-game server connection
};

2. Accessing the game room

Access the game room using the game room token value received when matching is successful. At this time, the list of users currently participating in the room and the game room connection success messages are received at the same time.

//Access game room
Backend.Match.JoinGameRoom(roomToken);
Backend.Match.OnSessionListInServer += (args) => {
  // Receive game room user information
};
Backend.Match.OnMatchInGameAccess += (args) => {
  // Receive game room user entry message
};

3. Starting the game

When all matched users access the game room, a game start message is sent to all clients after the game start waiting time set in the console has passed.

// When all users enter the game room,
  // the event below is called after the specified time on the console.
  Backend.Match.OnMatchInGameStart() += {
    // TODO
  };

4. Sending and receiving data/chat messages

After receiving the game start message, binary data and chat messages can be sent. Data sent to the server is broadcast to all users in the game room, including the users sent via the server.

// Send binary data
Backend.Match.SendDataToInGameRoom(data);

// Receive binary data
Backend.Match.OnMatchRelay += (args) => {
  // Process binary data
};

// Send chat message
Backend.Match.ChatToGameRoom(matchChatModeType, message);

// Receive chat message
Backend.Match.OnMatchChat += (args) => {
  // Process chat message
};
  

5. Reconnecting

If a user exits while the game is in progress or the client is terminated abnormally, the user can reconnect to the game in progress.

// Check if there is a game that can be reconnected
BackendReturnObject bro = Backend.Match.IsGameRoomActivate();
if(bro.IsSuccess())
{
  // Check if there is a game room that can be reconnected
}

// Reconnect based on the game room information checked in the above function
if(JoinGameServer(addr, port, true, out errorInfo) == false)
{
  // Error check
  return;
}

6. Game result aggregation/ending the game

The server aggregates the results based on the result messages and reflects them in the DB after receiving game result messages from each user in the game room.

Once all the game results are aggregated, the game is over. The users are immediately disconnected from the in-game server after the game ends.

// Game result aggregation
Backend.Match.MatchEnd(matchGameResult);

Backend.Match.OnMatchResult += (args) => {
  // Check the success or failure of the game result aggregation
};

Backnd — Global Top Game Backend

Contact us now to make a game backend for free!