Lobby

Overview

AccelByte lobby services provide continuous connection between the players and the game by using WebSocket. WebSocket ensures reliable, real-time data transfer by allowing two-way communication between the server and clients. Our lobby includes the following services:

  1. Presence enables players to see what other players are doing in real-time. This feature is critical in online multiplayer games, because player interactions rely on knowing which players are available.
  2. Party is used as the basis for multiplayer matchmaking. The party can be integrated with other lobby services such as presence, friends, and chat, to enrich the multiplayer experience.
  3. Friends lets players connect and interact with each other. AccelByte supports both in-game friends and platform or launcher level friends. In-game friends can chat and play together within a game title, whereas platform level friends allows players of different games to interact with each other.
  4. Chat enables real-time text based communication in-game. We support global, party, and individual chat.
  5. Matchmaking is responsible for matching multiple players based on the selected matchmaking channel configurations.

Tutorials

Connect to Lobby

Before you can use social services, you must set up a lobby connection by using the command below.

var lobby = AccelBytePlugin.GetLobby();
lobby.Connect();

Once you have set up a lobby connection, you will be able to use other Social features such as user presence.

Handle the Connect / Disconnect Event

This feature notifies the game of any changes to the connection to the Lobby server. The SDK already provides an auto-reconnect mechanism, but when the auto-reconnect times out you must reconnect manually.

var lobby = AccelBytePlugin.GetLobby();
lobby.Connect();
lobby.Connected += () =>
{
// doing something when connected, for example: update UI status to online
};
lobby.Disconnected += () =>
{
// doing something when disconnected, for example: update UI status to offline
};

What’s Next?

  • Check out the API Reference for more information about Lobby services.