newbie question - On UdpSessionFilter

hello,

could anyone please explain to me how i am to define the UdpSessionfilter so that i can search all rooms which satisfy the conditions, for example 2 player game, [gameType], with 1 player in room..

i didnt understand the way this is first created (the udpSessionFilter) and how it is brought to be used in anyscript where i might use a search servers available option in my scripting..

Best Answer

  • ramonmeloramonmelo mod
    Accepted Answer
    Hello @Elias992,

    You can find information about how to use the "UdpSessionFilter" on our Bolt Matchmaking page, look on the section "Join A Random Session With Filters", here: https://doc.photonengine.com/en-us/bolt/current/lobby-and-matchmaking/bolt-matchmaking

    The usage of such filter only makes sense if you are using custom properties on the room (also shown on the page, look at the Creating And Updating A Session section). Using the UdpSessionFilter you can join any room that has the same values as your filter as properties, so you don't need to list all sessions to choose one to enter.

    For your use case, you can use the filter to select only games from a specific gameType, and about the number of players, you can either use the Manual Accept mode (https://doc.photonengine.com/en-us/bolt/current/community-wiki/bolt-essentials/accepting-and-refusing-connections) or you can also use the room custom property to signal in the lobby that the session has only one player.

    Keep in mind that the custom properties can be updated anytime only from the game server, and it can take a few seconds to be replicated across any player that is trying to join a game.

Answers

  • ramonmeloramonmelo mod
    Accepted Answer
    Hello @Elias992,

    You can find information about how to use the "UdpSessionFilter" on our Bolt Matchmaking page, look on the section "Join A Random Session With Filters", here: https://doc.photonengine.com/en-us/bolt/current/lobby-and-matchmaking/bolt-matchmaking

    The usage of such filter only makes sense if you are using custom properties on the room (also shown on the page, look at the Creating And Updating A Session section). Using the UdpSessionFilter you can join any room that has the same values as your filter as properties, so you don't need to list all sessions to choose one to enter.

    For your use case, you can use the filter to select only games from a specific gameType, and about the number of players, you can either use the Manual Accept mode (https://doc.photonengine.com/en-us/bolt/current/community-wiki/bolt-essentials/accepting-and-refusing-connections) or you can also use the room custom property to signal in the lobby that the session has only one player.

    Keep in mind that the custom properties can be updated anytime only from the game server, and it can take a few seconds to be replicated across any player that is trying to join a game.
Sign In or Register to comment.