question

jaymales avatar image
jaymales asked

FindLobbies filter rules

Hey Guys,

Just setting up a list of all lobbies that people can join.
I really like to hide lobbies that are currently full.

I can filter it in the call back of FindLobbies based off the lobby player count.

But that kinda messes with how much data we get back from the server in these pages.

It would be nice to be able to use these filters on FindLobbiesRequest.

As far as I can tell, the Odata stuff only works on keys inside of the searchdata. IE:

"string_key1 eq 'something' and string_key2 ne 'somethingelse'"

Which is great for making it so only people with the same version can join each other, but it can be pretty hard to work out what values we can and can't search for.

I could do a call to update lobby and set a new value there when someone joins but I really want to avoid that.

So is there a nice way we can search for the max players using these filters?

Also what other things can we do/search for with them?

Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Xiao Zha avatar image
Xiao Zha answered

>>I can filter it in the call back of FindLobbies based off the lobby player count.

It is a common way to filter according to the lobby player account in the FindLobbies callback.

>>but it can be pretty hard to work out what values we can and can't search for.

You can only search for the value that you set in the searchdata.

>>So is there a nice way we can search for the max players using these filters?

You can set a status field in search data to indicate if the lobby is full, then after a player joined the lobby you can check the player count and change the status field. In this case, the fully lobbies will be hided when you use the status field as filter to search. If this can't meet your requirement, then I'm afraid there is no better way.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.