Rooms Overview

In order for any two clients to communicate in Strix, they must join the same room.

Rooms

A room of Strix is a virtual space connecting several clients. You can think a room is similar to a matching lobby as seen on many online multiplayer games. However, rooms in Strix are basic building blocks to implement various aspects of multiplayer games and are more flexible than a lobby. You can use a room to represent a lobby, a chat channel, a party in an instance dungeon, or entire players in a field in a battle royal game, depending on your game design.

While a room server can hold many such rooms, they are isolated from each other. A room member is a representation of a client (i.e., a player) that holds its information particular to a specific room. This means that when a client leaves a room and joins another room, a new room member will be created for it, and the new room member has no relation to the room member in the original room. When joined a room, each room member can get information about other room members, send RPCs to them, replicate game objects, and synchronize their properties in real-time. At the same time, members of a specific room have no knowledge of what happens in other rooms.

Room operations

A client (player) can create a room, join an existing room, search for a room (or rooms), or get or set information of rooms or room members.

A room is always created by a client, and for a room to exist on the server, it must have at least one member. A client that created a room defines its properties, and the client automatically joins it as well as becomes the room’s room owner after the creation is finished.

The room owner can change the room’s properties, kick other room members, and destroy the room. When the room owner leaves the room, another member automatically becomes the room owner. When all members leave the room, it is automatically destroyed.

Note

The consequence of the room owner leaving a room with any other room members remained in the room is configurable by the server-side option. You can disable the Room owner migration enabled option available on Strix Cloud Application Dashboard to make the room to kick all remaining members and destroy itself when the room owner leaves the room.

Room properties

Each room has a set of properties. They are visible from both inside and outside the room. This means you don’t need to join the room in order to check its properties. Any property can be changed at any time by the room owner. Strix defines a fixed set of standard properties for rooms, and semantics of some of them are open for your game design. A room can also have an additional set of custom properties, which are completely up to you.

Kind of properties

Example

Available in search?

Standard properties with predefined semantics
name,
capacity

Yes

Standard properties with custom semantics
(standard custom properties)
key1 - key8,
stringKey

Yes

Custom properties (with custom semantics)
(any name)

No

Note

properties is a special property. It is a single standard property of dictionary type with predefined semantics, and the semantics (its purpose) is to hold a set of custom properties. The names of your custom properties are keys in this dictionary and the property values are values in this dictionary.