Slot reservation [C++]

Hi there,

I've been reading a lot info here on forums about slot reservation, etc etc. But It is always related with PUN, not eh native SDK in C++.

We are working with our integration in UnrealEngine using Native C++ SDK of Photon. So, Is any native implementation about slot reservation in C++ SDK?, because I've looking for any expetecUsers member in Room or MutableRoom and I can't find any similar.

In case of a negative answer for the question, Did you based the implementation in PUN in PlayerCount and MaxMember concept for slot reservation feature?

Also, I've notice about the parameter maxPlayers in opJoinRandomRoom "virtual bool opJoinRandomRoom(const Common::Hashtable& customRoomProperties=Common::Hashtable(), nByte maxPlayers=0, nByte matchmakingMode=MatchmakingMode::FILL_ROOM, const Common::JString& lobbyName=Common::JString(), nByte lobbyType=LobbyType::DEFAULT, const Common::JString& sqlLobbyFilter=Common::JString());"
does this parameter means the max player capacity on room or is meant to be the available "slots" in the desired room?

Thanks in advance

Comments

  • Btw, we are using "4.1.1.0" version of Photon.
  • Hi @jmartinez.

    'expectedUsers' have not yet been implemented in the C++ Client.
    I will have a look if we can add this feature for the next release.

    maxPlayers is the maximum player capacity of a room. This is not directly related to the number of reserved slots (of course the number of reserved slots can't be higher than the overall max number players, but just specifying a maxPlayers of i.e. 4 would not reserve any slots, but allow the creator + 3 more other players to be in the room at once).
  • Hi @Kaiserludi:

    "but allow the creator + 3 more other players to be in the room at once", but how?, I've read about a list passed as param to opJoinRoom or opJoinRandomRoom where if you add the PlayerID's, success will result in a situation where the four players join at the same time to the room, but I can't find this "list".

    Thanks!
    Juan,
  • Hi @jmartinez.

    We have a misunderstanding here I meant that a maxPlayers of 4 means that overall 4 players are able to be in the room at once, NOT 4 specific players.

    The difference is:
    When you create a room with maxplayers=4, then up to 3 other players who know the name of the room or, if the code can join it or if the room is visible (which is the default setting), then even 3 random players, that don't even know the room name, could join it through random-matchmaking, if your game uses Photons random matchmaking (through opJoinRandomRoom()).
    However when you create a room with maxplayers=4 and supply a list of 2 expected users, then only those 2 specific users + 1 other user could join that room. If your would keep the same maxplayers, but if you supply a list of 3 expected users, then no one else beside those 3 users could join (as long as you stay in the room yourself to count as 1 of the at max 4 allowed players, of course). If you would supply a list of 4 users, then you would get an error response from the server, as the room creator + the 4 expected users are 5 users, which is more than the 4 that are specified as max players. However if you would set maxplayers to 5, then it would be OK.
    I hope this clears up the difference between maxPlayers and expectedPlayers.

    As mentioned in my previous post, maxPlayers are supported in the C++ clients, but expectedPlayers are not supported yet (state from version 4.1.4.1). We will add them in 4.1.5.0.
  • Hi @jmartinez.

    4.1.5.0 now has officially been released in our download area.