game center confusion

ok I’ve found a couple of game center tutorials
and no documentation

the guides seem incomplete.
The one that you come to via a google search easily


builds but does nothing - it seems to not do any set up so theres no checking to see if they are a user at start up etc. it runs but all the tests fail so it does nothing.
which is a shame as it seems super simple.

the xamarin one
https://github.com/xamarin/monotouch-samples/blob/master/MTGKTapper/MTGKTapper/MTGKTapperViewController.cs
is a port of a objective C apple example
its using lots of mono libs and ui kit stuff - i don’t use any of these views / controllers in my pure monogame title.

confused.

Ok so I have something kinda working in a few lines of code.


though it says hello (sandbox mode) at the top
then says I’m not logged in

Not sure if you figured this out, but MonoGame does most of the heavy lifting for you with Game Center.

// Define gamer variable
SignedInGamer gamer;

// Launch Game Center authentication
gamer = new SignedInGamer();

// Later on, interact with Game Center in various ways
gamer.UpdateScore(category, score);
Guide.ShowLeaderboard();
Guide.ShowAchievements();

Thanks picobots, that looks great I’m looking forward to trying that tomorrow :slight_smile: