My current issue is that on Photo, when in a room, we no longer get callbacks or the ability to find other rooms (Without having extra CCUs).
So I thought I would try and use the RegisterGame funcitonality of PlayFab with to register an almost 'dummy' game server, which I can then find through the PlayFab calls. I'm not sure whether this is the best method or if there is a better way to approach this, but I'm currently having some issues with getting the 'RegisterGame' to not throw an unexpected error.
PlayFab::ServerModels::FRegisterGameRequest RegisterGameRequest; RegisterGameRequest.ServerHost = "SomeIP"; RegisterGameRequest.ServerPort = "SomePort"; RegisterGameRequest.Build = "1"; RegisterGameRequest.pfRegion = PlayFab::ServerModels::Region::RegionEUWest; RegisterGameRequest.GameMode = "Standard"; Server->RegisterGame(RegisterGameRequest, PlayFab::UPlayFabServerAPI::FRegisterGameDelegate::CreateUObject(this, &APlayFabServer::OnRegisterPhotonGameToPlayFab), PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &APlayFabServer::GenericPlayFabError));
Are we required to have a build up on the PlayFab, as the build isn't actually a server build and isn't hosted anywhere (Hence my "SomeIP"/"SomePort").
My log looks like:
[2017.10.30-12.29.20:870][346]LogHttp: Warning: 00000203ED018100: request has been successfully processed. URL: https://35B9.playfabapi.com/Server/RegisterGame, HTTP code: 500, content length: 278, actual payload size: 278 [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Access-Control-Allow-Credentials: true [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Access-Control-Allow-Headers: Content-Type, Content-Encoding, X-Authentication, X-Authorization, X-PlayFabSDK, X-ReportErrorAsSuccess, X-SecretKey [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Access-Control-Allow-Methods: GET, POST [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Access-Control-Allow-Origin: * [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Cache-Control: private [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Content-Type: application/json; charset=utf-8 [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Date: Mon, 30 Oct 2017 12:30:12 GMT [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header X-RequestId: 83fe6cfcf7514d28ad1b2bc641758d75 [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Content-Length: 278 [2017.10.30-12.29.20:871][346]LogHttp: Warning: 00000203ED018100 Response Header Connection: keep-alive [2017.10.30-12.29.20:872][346]LogPlayFabServer: Generic PlayFab Error From Server An unexpected error occured while processing the request.,
We have recently setup both PlayFab and Photon as seperate parts of our game (Perform 2 different logins, which is fine). However, we wanted the ability to find rooms while already in a room using the realtime cloud methods, which isn't possible on Photon (or isn't easily done).
I found a 'RegisterGame' function in the PlayFab server API which looked like something we could call when using an External Hosted Game. My idea was, whenever we create a lobby, we RegisterGame with PlayFab, and make sure we keep pinging it to keep it open.
However, I'm having some issues with the setup as I'm not actually using a server build of the project with a hosted IP, but rather the Photon real time cloud.
I fixed up the error message of not having the GameMode setup but now get an unexepected error from:
PlayFab::ServerModels::FRegisterGameRequest RegisterGameRequest; RegisterGameRequest.ServerHost = "SomeIP"; RegisterGameRequest.ServerPort = "SomePort"; RegisterGameRequest.Build = "1"; RegisterGameRequest.pfRegion = PlayFab::ServerModels::Region::RegionEUWest; RegisterGameRequest.GameMode = "Standard"; Server->RegisterGame(RegisterGameRequest, PlayFab::UPlayFabServerAPI::FRegisterGameDelegate::CreateUObject(this, &APlayFabServer::OnRegisterPhotonGameToPlayFab), PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &APlayFabServer::GenericPlayFabError));