Game Center and Google Play integration

Is there an example anywhere of connecting to game center and integration with achievements and/or a leaderboard?

Posts

  • RamiTabbaraRamiTabbara AUMember, Xamarin Team Xamurai

    Hi Steven,

    While there's currently no CocosSharp sample (to my knowledge) that showcases how to connect a game to the iOS
    game center, there is this MonoGame guide here that describes how to do this which should be equally applicable.

    In particular, MonoGame interfaces with Game center via the Gamer and Guide classes. Both these classes contain a host of static public accessors so there should be no issue with accessibility from a CocosSharp app.

    Please let me know how it goes --- if it looks to be too clunky to do from within CocosSharp then we might look to make the interfacing a bit cleaner.

  • Thanks for the pointer, I'll check it out and post back how it goes.

  • rene_ruppertrene_ruppert DEXamarin Team, University, XamUProfessors Xamurai

    I am using GameCenter in a CocosSharp game, however I use the native iOS APIs directly, that's the most flexible way and easy to achieve with shared projects.
    Do you have any particular questions about GameCenter usage?

  • I'm working on isolating my game center activity so that I can use leaderboards and achievements in a cross platform way over to google play as well, but I was tackling iOS first.

    I'm not getting a clear picture of how the authentication process is supposed to work in conjunction with the cocossharp system startup. For example, there's a ViewController that is passed to the AuthenticationHandler property that the examples set, but I'm not sure how I'm supposed to use this to actually log in from the game.

    I assume that once I get everything logged in I can just call the methods for acheivements and leaderboards, but I'm stalled out at authentication.

  • pierreDurantpierreDurant USMember ✭✭

    @rene_ruppert said:
    I am using GameCenter in a CocosSharp game, however I use the native iOS APIs directly, that's the most flexible way and easy to achieve with shared projects.
    Do you have any particular questions about GameCenter usage?

    Hi Rene

    do you have an example of cococharp/monogame integrating the Game Center management ?
    I'm more than interested !

    Pit

  • rene_ruppertrene_ruppert DEXamarin Team, University, XamUProfessors Xamurai

    I cannot give you the full game but maybe these here can help you getting started. I am using a shared class called GameService that is hiding the platform differences for me. For Android a bit of additional setup is required.

    https://gist.github.com/Krumelur/842f7aed2becde403fbb77e80322d265

    Other than that: read into iOS and Android specific documentation.

Sign In or Register to comment.