Creating a New Room

Without rooms, there can be no gameplay in a multiplayer game.

Room creation in Strix is straightforward. The functions Create Room and Create Node Room create rooms on a Room Server.

Property Requirements

Both functions require both room properties and member properties (see Rooms Overview and Room Members respectively).

The room properties are the initial properties of the room. Here you can specify custom values to define your room in the context of the game. Member properties are necessary as the player is always connected to the new room automatically.

Required Member Properties:

Name

Type

Description

Variable Name

name

String

The name of the room member

Name

Required Room Properties:

Name

Type

Description

Variable Name

capacity

Integer

The number of players allowed in the room

Capacity

name

String

The name of the room

Name

Note

You will receive no error even if you omit any of the above required properties. However, the default values supplied by the server are 1 for capacity and an empty string for name, which are unsuitable for practically all games.

Please don’t forget to specify both properties for any room you are creating.

Note

When setting a property value in Strix Property Map struct, you should use a Name, not Varaible Name, in the above tables. For example, you should specify “capacity” but “Capacity” to the Property Name.

Required properties when creating a room

Room vs Node Room

Create Room operates on an existing Room Server connection specified by the channel ID. You need a Room Server connection to use Create Room function.

Create Node Room connects to a Room Server through the Master Server and creates a room, so the channel ID argument designates the channel for the new connection. You have no need to connect to a Room Server beforehand.

Note

When using Create Node Room on a cluster with two or more Room Servers, the server the new room is created on is chosen automatically. Contact Strix support regarding specific load balance requirements if you require a custom method.