Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Windows Phone Platform Driver for Mogade

branch: master
README.textile

Important Notice For Developers Upgrading form V1

If you are upgrading from version 1 and you were either using the UserId UniqueIdStrategy or you were using the default strategy (ie, not specifying anything), you must configure the client to use the LegacyUserId strategy. You do this by calling the following on startup

MogadeConfiguration.Configuration(c => c.UsingUniqueIdStrategy(UniqueIdStrategy.LegacyUserId));

Mogade For Windows Phone

Mogade is a free service web-based service which allows game developers to quickly enchance their games with auxiliary functionality (such as leaderboards).

This is the official Windows Phone library. The library wraps the core .NET driver. It is currently a very thin wrapper, but we do plan on adding features.

Other Libraries

For a list of other libraries, please visit http://mogade.com/manage/libraries

Support

The http://groups.google.com/group/mogadedev google group is the best place for developers, either of games or libraries, to visit.

Configuration

You can configure how the library works through the MogadeConfiguration.Configuration fluent interface.

Unique Id Strategy Configuration

The anonymous authentication which mogade currently supports relies on the generation of a unique id by the client library. 3 methods of generating a unique id are currently supported.

First, the default, is for mogade to generate a guid and store it using isolated storage. This approach is the least intrusive, but some features may be limited or unavailable.

Next, is to use the device id. In order to work, the ID_CAP_IDENTITY_DEVICE capability must be added to your manifest file.

Finally, we can use the user’s anonymous live id, which requires the ID_CAP_IDENTITY_USER capability.

While we default to the generated strategy (since it requires no additional configuration), we generally recommend developers to adopt one of the other two options.

To configure the strategy, on startup, call:

MogadeConfiguration.Configuration(c => c.UsingUniqueIdStrategy(UniqueIdStrategy.UserId));

Usage

The library should be straightforward to most .NET developers. The main entry point is the MogadeClient class (which implements IMogadeClient for you DI junkies).

You instantiate MogadeClient via the static Initialize method, supplying your game key and game secret (available from the details view of your game on the mogade.com website):

Once created you can use the various methods to interact with the mogade service. As a general rule you’ll want to execute the following at startup:

   //configure
   MogadeConfiguration.Configuration(c => c.UsingUniqueIdStrategy(UniqueIdStrategy.UserId));
   //intialize (thread-safe, so keep one around)
   var mogade = MogadeClient.Initialize("GAME_ID", "SECRET_KEY");         
   //log, assuming you are interesting in basic analytics
   mogade.LogApplicationStart();

Note that the methods which actually interact with the server will fire asynchronously (though its possible for many to fail quickly given invalid input):

mogade.GetLeaderboard("leaderboardId", LeaderboardScope.Daily, page, leaderboard => { //do something with the leaderboard});

UserName Management

Some of mogade’s API calls require a username to be provided. In the case where your game doesn’t provide user management, this can be frustrating for users to have to retype. The library provides basic userName management –
stored locally, indepedent of the backend mogade service. You can simply use the MogadeClient to GetUserNames, SaveUserName and RemoveUserName.

API Overview

Mogade is based around a RESTish API, accepting and returning JSON messages.

A full API overview can be read here http://mogade.com/manage/api

Something went wrong with that request. Please try again.