[Feature]: LobbyRoom more filter options
Context & Description
Currently the LobbyRoom can only filter on name and metadata. It would be helpful to filter based on more room parameters.
The following parameters come with the room:
One would filter the LobbyRoom using the following code:
client.joinOrCreate("lobby", { filter: { name: "battle", } })
It would be nice to be able to filter on locked. (and maxClients).
For example for the project I am working, it would be nice to be able to filter games on whether they are locked, as I could then filter out matches that are ongoing or full.
The solution should then be able to do the following:
client.joinOrCreate("lobby", { filter: { name: "battle", locked: false } })
Use cases
By providing this extra parameters there is no extra work needed on the server-side to handle these built-in LobbyRoom parameters. Previously one would need to set a metadata variable for when a game is locked for example. As the rooms already manage locked state automatically it would be easier to just filter on this.
Proposed API
No response
Source: colyseus/colyseus