Giter Club home page Giter Club logo

mogade-windowsphone's Introduction

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

mogade-windowsphone's People

Contributors

jgable avatar

Watchers

James Cloos avatar cva78 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.