Matchmaking Guide
使用Photon,進入一個房間與人遊戲(或對戰)是非常容易的。
基本上有三種方法:
要麼告訴伺服器找到一個匹配的房間,要麼跟隨朋友進入她的房間,要麼獲取一個房間列表,讓用戶選擇一個。
所有這三種變數都被Photon支持,您甚至可以推出您自己的。
我們認為,對於大多數遊戲來說,最好使用快速和簡單的匹配,所以我們建議使用隨機匹配,也許還可以對技能、等級等進行過濾。
Matchmaking Checklist
If you run into issues matching players, here is a quick checklist:
- Verify clients are connected to the same
Region. Note: Best Region results are not deterministic. - Use the same
AppIdand AppVersion in all clients and builds. - Verify that clients use unique userIDs. Photon avoids matching the same userID into rooms.
- Before trying to join a room by name, make sure that this room is already created. Alternatively use
JoinOrCreateRoom. - For random matchmaking, use the same lobby (name and type) for creating and joining rooms.
- For random matchmaking with a properties filter, create rooms with fitting
Custom Properties in Lobbystring-array. - For random matchmaking with SQL filters, use the SQL lobby type and create rooms with the fitting pre-defined keys (C0 and up) as
Custom Properties in Lobbystring-array.