Multiple Rooms and Channels

Strix restricts synchronization, messaging, and actions to individual rooms. Players in room A cannot interact with players in room B. This keeps networking logic simple.

However, sometimes a game has some multiplayer functionality that extends beyond a single match. For example, chat systems may allow players to contact each other while they are in different matches, or MMOs may allow communication and interaction with players that are many in-game miles away.

Strix solves this problem by allowing multiple room connections. Players are not restricted to a single match but may be connected to different rooms that are independent of each other.

Channels

In the Strix Unreal SDK, this is facilitated by the concept of channels. A channel is a specific room connection and is identified by a channel ID. Channel ID arguments are present in many functions, events, and components.

When connecting to a room server or a room, Strix functions take a channel ID as an argument. If the connection process is successful, the given channel is now registered with the new connection. Calling a connection function with a different channel ID will create a different room connection.

All subsequent actions that take place with a channel ID will operate on the connection belonging to that channel. All components with a channel ID will perform their logic for that connection only.

There is an example of this in the Strix Unreal Sample. The Channels sample connects to a couple of additional chat rooms. All of the synchronization takes place on the main room channel, and because of this, it is not duplicated within any of the other rooms, but players are still capable of communicating independently of this main game room through chat messaging.

Note

Channel ID is an Integer value that you determine during your game development. You decide like “Channel #1 is to a room representing a party in the dungeon, channel #2 is to a guild chat room, channel #3 is …”, and you specify one of the channel numbers you determined when you call functions.

It is different from the notion of a handle as seen in common low-level APIs, where an opening of a file, for example, returns a handle whose value is determined by the library and unpredictable during the design time in general, and your application needs to save it in a variable and specify the handle value when you read from the file.

Room Server vs Room Connections

It is possible to have an open channel while not being connected to a room. This occurs when the player is connected to a Room Server but has yet to join a room.

There is a distinction in the SDK between operations that are performed on Room Servers as to those performed on the Master Server. Master Server operations don’t require a Room Server connection, and joining a room using one of these methods automatically connects to the relevant Room Server and the room.

When the player instead connects to a specific Room Server manually, the connection will not be connected to a room. Operations using the registered channel ID will operate using this Room Server connection, but room operations cannot function until the player has joined a room.