Hi, this is Erik of Upstairs Digital, we are currently making a game about wrestling with space ships.
We are using Photon to build out our online multiplayer, but I have stumbled into a wall it seems.
We have 3 ways to get an online game going.
1. Click a button and it matches you up with an opposing team (1 or 2 people).
2. Invite a friend and play with them.
3. Have the friend you invited play on your team against an opposing team.
The way it's implemented currently:
1. Game starts in offline mode -> player sets up their team -> Connects to online -> Fetches the room list -> picks a game (if none exists it creates a room and waits) -> match found -> starts the game.
2. Game starts in offline mode -> player may set up their team -> clicks invite friend -> creates a hidden room -> friend joins -> players set up their teams. -> game starts.
3. Game starts in offline mode -> player may set up their team -> clicks invite friend -> creates a hidden room -> friend joins -> players set up their teams. -> clicks search for online game -> gets the room list -> changes the room to be visible if no game was found and waits for a match. ---- OR ---> master client sends the name of the room it has found to the friend -> both disconnect -> both connect to the found room -> (notice no setup team step) game starts.
The first 2 have been trivial to make, but the 3. one seems impossible. The problem is the step were the master client tries to fetch the game list. When that happens Photon prints two errors:
There was a post back in 2013 discussing this. It begins with a snippet of the documentation where it says "/// Not available while being in a room.". However, this is no longer in the documentation (or I cannot find it).
So is it possible now to get the room list while in a room? Is there another way (perhaps a better way) of merging two rooms?
Thanks.
We are using Photon to build out our online multiplayer, but I have stumbled into a wall it seems.
We have 3 ways to get an online game going.
1. Click a button and it matches you up with an opposing team (1 or 2 people).
2. Invite a friend and play with them.
3. Have the friend you invited play on your team against an opposing team.
The way it's implemented currently:
1. Game starts in offline mode -> player sets up their team -> Connects to online -> Fetches the room list -> picks a game (if none exists it creates a room and waits) -> match found -> starts the game.
2. Game starts in offline mode -> player may set up their team -> clicks invite friend -> creates a hidden room -> friend joins -> players set up their teams. -> game starts.
3. Game starts in offline mode -> player may set up their team -> clicks invite friend -> creates a hidden room -> friend joins -> players set up their teams. -> clicks search for online game -> gets the room list -> changes the room to be visible if no game was found and waits for a match. ---- OR ---> master client sends the name of the room it has found to the friend -> both disconnect -> both connect to the found room -> (notice no setup team step) game starts.
The first 2 have been trivial to make, but the 3. one seems impossible. The problem is the step were the master client tries to fetch the game list. When that happens Photon prints two errors:
Operation failed: OperationResponse 217: ReturnCode: -2 (Unknown operation code). Parameters: {} Server: GameServer
UnityEngine.Debug:LogError(Object)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Imported Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1567)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Imported Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:157)
GetGameList failed: OperationResponse 217: ReturnCode: -2 (Unknown operation code). Parameters: {}
UnityEngine.Debug:LogError(Object)
NetworkingPeer:DebugReturn(DebugLevel, String) (at Assets/Imported Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1518)
NetworkingPeer:OnOperationResponse(OperationResponse) (at Assets/Imported Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1876)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback(Byte[])
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands()
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands()
PhotonHandler:Update() (at Assets/Imported Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:157)
There was a post back in 2013 discussing this. It begins with a snippet of the documentation where it says "/// Not available while being in a room.". However, this is no longer in the documentation (or I cannot find it).
So is it possible now to get the room list while in a room? Is there another way (perhaps a better way) of merging two rooms?
Thanks.