Unity PUN2 matchmaking and the LIMIT keyword?
Options
Hi,
i try to fetch rooms with a sqlight statement. this works fine but i want to limit it
by 10 rows. I try the below statement but it dos not work. Some suggestions how can i do this?
without the LIMIT keyword it works but i want to limit it.
thx for every help.
i try to fetch rooms with a sqlight statement. this works fine but i want to limit it
by 10 rows. I try the below statement but it dos not work. Some suggestions how can i do this?
PhotonNetwork.GetCustomRoomList(GameManager.defaultLobby, "C0 = "+(int)PlayMode.ALLvsALL+ " LIMIT 10");
without the LIMIT keyword it works but i want to limit it.
thx for every help.
0
Best Answer
Answers
-
LIMIT is not supported, sorry.
Pretty much everyone would get about the same 10 rooms (when asking at the same time) and thus there would be more race conditions to join the (few) returned rooms and more failures to join (we expect).
It's better to do the matchmaking right on the server or get a slightly longer list and show it randomized.0 -
@Tobias Thank you for answering. Yes, you are right this is exactly what I desire to doo I will fill up the rooms with players and when the game starts, the room disappears from the list. Is there no way to limit in PUN? This is very data consuming when every time get hundreds of rooms loaded but I nee just a few to let the player choose.0
-
Again: LIMIT is not supported and there is no way to get this short of a list.
If you worry about the traffic, use server-side matchmaking with the parameters.
If you fetch just 10 rooms, a player will look at "random" room names, all with the same ping. Users will either pick a room semi-randomly (by a hunch of liking one room name better than others) or refresh and poll X times, which then again causes traffic.0