4

Google announced in December 2016 that Google+ is no longer integrated in Google Play Games Services: https://android-developers.googleblog.com/2016/12/games-authentication-adopting-google.html And as a result, a call of Unities Social.localUser.LoadFriends() method returns zero friends. Now with no friends available, how do you invite other players to a multiplayer match using Googles Play Games Services?

SePröbläm
  • 5,142
  • 6
  • 31
  • 45

1 Answers1

0

In the Google Play Game Services documentation, there is a code example on how to invite G+ friends and anonymous players at this link: https://developers.google.com/games/services/android/realtimeMultiplayer#invite_players_option, btw this is a deprecated example and is not reflecting the actual changes to the APIs.

Update August 2017

Currently RealTimeMultiplayer.getSelectOpponentsIntent(...) and a lot other methods are marked as deprecated in the docs too. (They weren't when this answer was posted). Read here for more info about this

MatPag
  • 41,742
  • 14
  • 105
  • 114
  • Thank you for sharing this. I'd like to stick with a custom UI. Do you have any ideas how the SelectOpponentsIntent gets the list of opponents? – SePröbläm May 29 '17 at 18:02
  • I think that GPGS performs some logics based on the logged user. Probably using some sort of algorithm like GPS position, G+ friends, random selected players and other things (this is a my supposition). Sincerely i was not able to find the exact algorithm used. If you need a more controlled player to player invitation system i think you need to build your own one – MatPag May 29 '17 at 18:51
  • Thank you MatPag! I've feared that... The strange thing is, that except the above mentioned announcement, there's no other information around. Even the (usually exceptionally good) docs don't reflect the latest changes yet. Writing our own player invitation system would be possible, but wiring it to GPGS for multiplayer matches could be quite challenging - if even possible (haven't checked the docs yet tbh). Again, thank you. – SePröbläm May 29 '17 at 19:37
  • getSelectOpponentsIntent() is the one that is depricated – ivy_the Aug 04 '17 at 14:42
  • it wasn't 2 month ago :D, i will update my answer, ty – MatPag Aug 04 '17 at 15:01