Hello everyone. Faced the following problem:
I use an authoritative server and RPC function to search or create a match. Each room is limited to 4 people and each room should be as full as possible. Each match join I update the label with a new playersCount.
Inside RPC function I search for matches where there are empty slots. Describing the flow:
The player calls the RPC function and calling match list with empty slots query. For example, it finds a match where there are 3 out of 4 players. Next, the server responds to the client with room_id, the player starts connecting to the room. The problem is that while the server responds to the client and the client connects to the room, other clients also see this room free for connection. As a result, it happens that a lot of people start connecting to one room at once.
Is it possible to somehow implement a seat reservation or take into account in the match the players who are already connecting to this room? Thanks.