Searching for Rooms

Generally, games with matchmaking functionality provide their players with the ability to search for specific matches to join. In Strix, this is provided through several search functions.

Search Arguments

The search functions have the following common arguments.

Name

Type

Description

channelId

int

The connection ID to search on

limit

int

The max number of results to return

offset

int

The offset into the total results from which to return

condition

FStrixCondition

The condition to search with (see below)

order

FStrixOrder

The order to return results (see below)

Search Conditions

To narrow search results, Strix provides an FStrixCondition struct which contains the conditions to perform the search with.

Search conditions can be built using functions under the Strix BP Library > Adapter category, such as Field Not Equals, which return FStrixCondition structs. Conditions can be combined with functions such as Create And Condition for complex queries.

Search conditions operate on property values. For example, searching for a room with a minimum number of players can be done with the Field Greater Than function on the memberCount property of rooms.

Note

Conditions are type sensitive. Check the documentation such as Room Properties to determine which function is appropriate for a given property.

Note

Custom properties contained in properties special property are not searchable. The standard properties such as memberCount, including customizable ones such as key1, are, so use them instead when you need to search. Use custom properties for gameplay or display that are only needed after finding a room.

Search Order

Strix contains a FStrixOrder struct for specifying the order to return search results. The functions Create Ascending Order and Create Descending Order create an order on a given property in the respective directions.

Search Functions

The search functions for Strix rooms are Search Room, Search Joinable Room, Search Node Room, and Search Joinable Node Room.

Node room functions operate on the Master Server. The Master Server keeps track of all the rooms in its cluster, so that queries can be made before connecting to a Room Server. These functions return a list of FStrixNodeRoomInfo structs.

The standard functions operate on a Room Server, so the Room Server must be connected before using them. The channelId argument specifies which connection to operate on. These return a list of FStrixRoom structs.

The Joinable versions of these functions automatically include the condition that the room is not full (memberCount < capacity).