top of page

PlayFab Master Collection

The PlayFab Master Collection is a plugin collection that provides cloud network, account management system and realtime multiplayer features for game application projects in both Construct 3 and Construct 2 .


Features include cloud storage, user data, game data, studio data, account management system, player management system, friends manager, leaderboards, content-delivery network, multiplayer, photon realtime, photon chat, authentication, account linking or binding, company authentication, facebook integration, google account integration, cryptographic authentication, android auth integration, ios auth integration, google play integration, game center integration, steam integration, facebook instant games integration, kongregate integration, email system with company template creation, banning and reporting system, analytics, tracking, virtual currency, virtual stores, real currencies, google play iap verification, ios iap verification, google play subscription verification, ios subscriptions verification, trading system, guild management, cloud scripting, etc.


It supports all features for a typical online game, from multiplayer massive games to small online games.


It's a complete back-end networking solution for your online games, used for professional online game development.

PlayFab API v2.png

Introduction

Step 1.png

1. The first step is to add the PlayFab API plugin into the project.


2. The second step is to add the Authentication plugin into the project.


3. The third step is to add addition plugins in the Plugin List section, to include more features in your project.

The PlayFab Master Collection is designed separated into plugin modules, this allows you to have control in which features you want included in your project. This method allows your project to be clean, optimized and free from unused scripts.

Each plugin covers all the features of its designated PlayFab module, while remaining easy to use.

Introduction

Plugins List

Plugins List

Features

The PlayFab Master Collection supports various platform and service integrations, thus more account authentication and sync methods. This is essential for a complete backend network solution in allowing the sync of all user game data or studio data across all devices, platforms and services.



The PlayFab Master Collection supports the following platforms and network services:

  • PlayFab Company - this is your account's allocated company server account system, through the PlayFab service. You can register a user through their email address, username and password.

  • Custom ID - this is an identification system using a simple text or cryptographic string.

  • Android - using the Android device id, an account can be synced to the mobile device's info.

  • iOS - using the iOS device id, an account can be synced to the mobile device's info.

  • Facebook - using either the Mobile Facebook or Web Facebook to integrate and sync the player's account with the player's Facebook account.

  • Google Play - using the Google SignIn plugin to integrate and sync the player's account with the player's Google account.

  • Game Center - using the Game Center ID from a Game Center plugin, the player can integrate and sync the player's account with the player's Game Center account.

  • Steam - using the Steam Ticket from a Steam plugin, the player can integrate and sync the player's account with the player's Steam account.

  • Facebook Instant Games - using the FacebookInstantGamesSignature from a Facebook Instant Games plugin, the player can integrate and sync the player's account with the player's Facebook Messenger account.

  • Xbox Live - using the Xbox Token from an Xbox Live addon, the player can integrate and sync the player's account with the player's Xbox Live account.

  • Kongregate- using the Kongregate ID and Auth Ticket from a Kongregate plugin, the player can integrate and sync the player's account with the player's Kongregate account.

​ If ported to console, the following are supported: ​

  • Nintendo Switch - using the Nintendo Switch Device ID, the player can integrate and sync the player's account with the player's Xbox Live account.

  • Play Station Network - using the AuthCode and RedirectUri , the player can integrate and sync the player's account with the player's Play Station Network account.

Integration


The linking of an account authentication method is easy to accomplish. The linking starts with your initial origin registration of any authentication method you prefer, however we always recommend choosing a quick authentication method that doesn't require any interaction from the user, such as the custom id, android login and ios login authentication methods. Quick authentication methods allow your users to play your game application immediately without interruption, thus increasing the chance the player plays your game. Otherwise, there is a significant chance some players might uninstall your application once they are forced to login, either by email, username or password, or through social accounts.

Upon login through the Authentication plugin, if the login credentials are unique, and if allowed, the user is automatically created an account and immediately logged in. Otherwise, if the login credentials already exist, the existing account will be logged in.


Once an account is created and the player is already logged in. The player can add more authentication methods or remove existing authentication methods through the Sync Manager plugin.


By having multiple authentication methods in a single user account, a user can login to his or her account through more options. For example, if a user account was created by logging in through the Authentication plugin with a unique custom id, the user can now log in again into that account by doing the same process, logging in through the Authentication plugin with that custom id.

However, if the user intends to secure his or her account with Google login, the user can use the Sync Manager plugin and link his or her Google account. The next time the user intends to log in, the user has now two (2) options in logging in, one is to use the custom id, which the user used to create the account, through the Authentication plugin. And, another is through Google login, which the user recently added through the Sync Manager plugin.


In the future, the user can also unlink the Google login using the Sync Manager plugin, and the user can also add other authentication methods the user prefers.


The other terms for adding or removing authentication methods are (binding or unbinding) accounts, (linking or unlinking) accounts and (syncing or unsyncing) accounts.


Linking an authentication method into an account also allows the account to inherit the platform or service's shared information, for example the Google public profile information after linking Google login, through the Sync Manager plugin or account creation through the Authentication plugin.

Features

How to use?

The PlayFab Master Collection with the PlayFab service implements cloud and account management features. It has integration support for both Construct 3 and Construct 2 through the plugin collection.


The plugin collection supports the majority of features for your application's client-side implementations.

For the server-side, PlayFab provides a console where you can easily interact with a visually friendly interface, including cloud scripting. Features include the players interface, multiplayer interface, groups interface, automation interface, addons interface, economy interface, leaderboards interface, content interface, analytics interface, title interface, data interface, etc.

PlayFab is a cloud service that is easy to use for those who are familiar with Construct 3 and Construct 2's interface. This includes PlayFab's automation rules which is quite similar to Construct's event sheet system, which includes actions, conditions and expressions. The Cloud Script feature is also run using JavaScript, which is similar to Construct 3's scripting feature being written in JavaScript. If you are able to write JavaScript scripts in Construct 3, then it should be easy to use PlayFab's cloud scripting, especially with the Cloud Script plugin. The plugin collection takes cloud scripting a step further with the Cloud Script plugin being based on the design of Construct 3 and Construct 2's Function object, where you can easily call Cloud Script handler functions in Construct 3.

PlayFab is the ideal choice for a backend service for Construct 3 and Construct 2 game application projects. It has all the features you would ever need for game development and an online game, from account management systems to realtime multiplayer. The PlayFab service is scalable from minimalistic multiplayer online games to massively multiplayer online (mmo) games.


The PlayFab service is free and free to start for premium projects where you will only start paying for the service once you achieve growth in your projects.

By that time, you should already be successful enough and making enough profit with your projects that the pricing would be insignificant. Although, even then, PlayFab only charges you the features you use, at low costs.


To get started, please follow the instructions below.



Step 1 : Create an account in PlayFab, login if you already have one.



Step 2 : If you do not have an account yet, you will be redirected to the signup page.


Step 3 : Input your registration credentials to sign up. Remember to take notes of your inputted signup credentials since you will be needing these again to access your PlayFab account, with your new studios and game application titles.



Step 4 : Select one of your titles in one of your studios, then copy its title id.

Step 5 : From your Construct project, select the PlayFab API plugin. Then look over the Properties bar and then past your previously copied title id of your game application project in PlayFab, then paste it into the PlayFab API plugin's title id property field.



Step 6 : From your PlayFab console, you should already be in your title's dashboard after selecting the title from the My Studios and Titles page. Your title dashboard will show you the overall status of your title, through its built-in analytics and tracking. Not to be confused with the Analytics plugin, which is a different feature.


Step 7 : We highly recommend taking time to explore the PlayFab console features and options yourself.

  • You might also want to read the official PlayFab documentation.

  • You can also go to the Guide section for a walkthrough of the PlayFab Master Collection plugins.


Step 8 : It is time to add the PlayFab plugins into your Construct 3 or Construct 2 projects. Please click the links to each essential plugin below.

  1. PlayFab API

  2. Authentication

  3. Optionally, you can add more PlayFab features. Kindly visit the Plugins List section above to learn more.

Instructions

Guides

The PlayFab Master Collection uses a request-response syntax. This is a syntax where an action call has a corresponding conditions category response.

For any given request from calling an action, there will only be one trigger response condition that will fire from the category named after that action, the event condition trigger would be the response. An event trigger is a condition that will only fire upon the instant it happens and it has a green arrow to its side to easily identify it, and it usually starts with the word "On", for example "On Company Register".

It is recommended to cover all the event trigger conditions of a plugin in the PlayFab Master Collection to create a reaction for every server response circumstance that you would want the application to do.

However, during debugging, if you want to know which event condition trigger was fired during a server response, there is always the PlayFab Master Collection's built-in browser console debugger, which can be activated by setting the PlayFab API plugin's debug mode property enabled.

For more information about constructing events in the event sheet with the request-response syntax, please proceed below.



What is a conditions category?

The conditions category is a group of event trigger conditions that is named after the action that was called. One action call request only corresponds to a single response, firing one of the event trigger conditions in the conditions category named after the action that was called. Ideally, there should be no multiple event trigger condition response.



What is a positive response?

An action call request only corresponds to a single response, firing one of the event trigger conditions in the conditions category named after the action that was called. When the event trigger condition that is called is for a successful response, this is called a positive response. There is only one event trigger condition in a conditions category that is a positive response, and it is usually resembling the action name that was called.


An example of a positive response event trigger condition:

  • On company register



What is a negative response?

An action call request only corresponds to a single response, firing one of the event trigger conditions in the conditions category named after the action that was called.


When the event trigger condition that is called is for an unsuccessful response, it is either the requirements were not met, there are some alternatives or the request simply responded with an error.


In any case, there is only one positive response event trigger condition, the rest are negative responses.


Examples of negative response event trigger conditions:

  • On company register error

  • On email address not available

  • On invalid password

  • On name not available

  • On username not available

  • On invalid email address

  • On invalid username

  • On profane display name


Please note that there is a general negative response or simply called an error response. This happens when none of the other specific negative response event trigger conditions were called, hence the general negative response event trigger condition is instead called.


A general negative response event trigger condition usually resembles the positive response event trigger condition, but with an error label appended. For example:

  • On company register error


To learn more about the reasoning of the general error response, please take a look at the Built-in Debugger documentation section.


Request-Response


The PlayFab Master Collection uses a request-response syntax. This is a syntax where an action call has a corresponding conditions category response.

For any given request from calling an action, there will only be one trigger response condition that will fire from the category named after that action, the event condition trigger would be the response.



Request Action


Most actions in the PlayFab Master Collection are a request to the server.

Once an action request receives a response from the server, it should then fire one (1) event trigger condition (green arrow condition) from the conditions category named after the action.

Ideally, it should be noticeable which action corresponds to a conditions category after observing the conditions list.



Response Condition


Event trigger conditions grouped in a response conditions category in the PlayFab Master Collection are usually list of responses from the server, of a action request resembling the name of the conditions category.​

​It's recommended to cover all event trigger conditions in a response conditions category for an action request that is utilized, for the application to be able to cover all possible server responses and implement a reaction.

To get more information regarding the request and response of an action request, please take a look at the Built-in Debugger documentation section, which is a guide into debugging with the PlayFab Master Collection.



Built-in Debugger


The PlayFab Master Collection has a built-in debugger, which can be enabled in the PlayFab API plugin's debug mode property toggle.



The PlayFab API debugger logs all necessary processes happening in all the plugins in the PlayFab Master Collection, most especially the server response data. This includes the positive and negative responses, which also includes the harmless common error log for all negative responses. To learn more about the Common Error Log, please take a look at the Common Error Log documentation section.



Common Error Log


The PlayFab Master Collection uses a request-response syntax. This is a syntax where an action call has a corresponding conditions category response.


An action call request only corresponds to a single response, firing one of the event trigger conditions in the conditions category named after the action that was called.


When the event trigger condition that is called is for an unsuccessful response, it is either the requirements were not met, there are some alternatives or the request simply responded with an error.


In any case, the PlayFab plugins use the unsuccessful responses to create negative response event trigger conditions, such as:

  • On company register error

  • On email address not available

  • On invalid password

  • On name not available

  • On username not available

  • On invalid email address

  • On invalid username

  • On profane display name


These allow you to be able to program your application to handle and react to the server's negative responses, which is part of PlayFab's design. For more information about this, please look up the top-most portion of the Guide documentation section.


However, the PlayFab SDK leaves behind some error logs that sometimes developers mistaken as an error in PlayFab, their project or the plugins, although please note that these logs are common server negative responses and are completely harmless.



If you happen to see an error log similar to the one in the image above, with the reminder included by the PlayFab Master Collection indicating as harmless, please do ignore the error log as this is by design and completely safe, and does not indicate anything wrong with your application since it is part of PlayFab's negative server response feature.

Guides

Documentation

The PlayFab Master Collection is a plugin collection that provides cloud network, account management system and realtime multiplayer features for game application projects in both Construct 3 and Construct 2 .


To learn more about the PlayFab service, please click the references below to visit the official documentations.

Documentation

Showcase

The PlayFab Master Collection implements cloud network, account management and realtime multiplayer features for application projects made in Construct 3 and Construct 2, with all major platforms supported.


It has the necessary tools and features for a wide range of online multiplayer game types, from small online games to massively multiplayer online games (mmos).


PlayFab is a complete backend-network system that most game studios use for their online game application projects.


Simple Usage


Townsmen is a great example of a simple online game. PlayFab can easily implement this with its tools, using these addons:

  • PlayFab API - the PlayFab SDK integration.

  • Authentication - login or signup, and link your account to multiple authentication methods for all devices, platforms and services.

  • Mobile Info - retrieve the mobile device's info, to sync account with your Android or iOS device.

  • User Data - store player's game state data in the the user's allocated cloud storage.

  • Title Manager - retrieve game global game data and server time.

  • Clock - an optional feature to implement timers, rewards, daily rewards and other time related features.

  • Date - an optional built-in feature to convert server time to local time.



To create all the features, it requires the 5 specified plugins and 2 additional optional plugins for additional features. However, for the essentials, it would only require the PlayFab API, Authentication and the User Data objects.

The main online feature here is to store the user's data into the user's cloud data storage allocation, which is a feature of the User Data plugin.

You could also use the Publisher plugin if you want to store the user's data as shareable or migratable across all your games grouped in a studio, instead of just the current game application.



Mobile Cloud Save

If you only plan to implement cloud saves for mobile, including Android and iOS, with all the features in one plugin.

Then, we highly recommend using the Mobile Cloud Save plugin, which automatically saves your player's game state in their Google storage on Android storage and iCloud storage on iOS.

This cloud save storage service for applications is free, and is an allocated user data storage for Google and iCloud accounts.


Advanced Usage


The Clash of Kings is a great example of a more advanced usage of the PlayFab Master Collection. The PlayFab Master Collection has the tools to implement most features in most types of online games.



This game utilizes most, if not all the plugins in the collection, including account management system, device and social account linking, account switching, user data, game data, game economy, payment systems, multiplayer with photon realtime & chat integration, account information, account management player information, player management, content-delivery network and friend management.

The images above shows the linking and switching of accounts, which translates to the PlayFab Master Collection's linking and unlinking device, id or social accounts using the Sync Manager plugin. And, using the Authentication plugin to register or create new account for new credentials, login to existing linked (Sync Manager) credentials or switch accounts.



The Clash Royale is also a great example of an advanced usage of the PlayFab Master Collection. It is a massively multiplayer online (mmo) game. The PlayFab Master Collection has the tools to implement the online features of this game.

PlayFab vs Firebase