Introduction to PlayFab
The PlayFab Master Collection is an addon collection that provides cloud network and realtime multiplayer features for Construct 2 and Construct 3 game application projects.
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 report system, analytics, virtual currency, virtual stores, real currencies, google play iap verification, ios iap 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.
1. The first step is to add the PlayFab API addon into the project.
2. The second step is to add the Authentication addon into the project.
3. The third step is to add the addons with features you want included in the project.
4. The PlayFab Master Collection is designed separated into modules, this is to allow only adding the features needed in a project.
Each addon covers the complete features of its designated module.
Each addon is complete, although still easy to use.
The PlayFab Master Collection has the following addons:
PlayFab API - The module that holds and manages the PlayFab SDK.
Authentication - The module that implements PlayFab Authentication. Login and initial account registration for new users.
Leaderboards - The module that implements PlayFab Leaderboards.
User Data - The module that implements game cloud storage for each players.
Account Info - The module that retrieves the player's account information.
Account Manager - The module that manages and controls the player's account.
Player Manager - The module that manages the player's status and information.
Title Manager - The module that manages and control the title, also known as the game.
Publisher - The module that manages and control the studio and implements studio cloud storage for each player.
Sync Manager - The module that implements account syncing to other authentication methods.
Friend Manager - The module that implements and manages a friend system.
Virtual Currencies - The module that implements virtual stores and virtual currencies into a game application managed by the PlayFab Server.
Real Currencies - The module that implements real currencies with real monetary values and verifying in-app-purchases for both android and ios.
Analytics - The module that implements PlayFab Analytics.
CDN - The module that implements PlayFab's Content-Delivery Network (CDN).
Cloud Script - The module that implements PlayFab Automation - Cloud Script using the Server API.
Photon Realtime - The module that implements realtime multiplayer using Photon, a playfab partner, with PlayFab full-backend network system integration.
Photon Chat - The module that implements chat multiplayer using Photon, a playfab partner, with PlayFab full-backend network system integration.
The PlayFab Master Collection uses the PlayFab service to implement cloud features. It integrates with both Construct 3 and Construct 2 smoothly through the addon collection, as its client-side.
For the server-side, PlayFab provides a console where you can easily adjust the settings with a visually friendly interface. Features include the players control, multiplayer control, groups control, automation control, addons control, economy control, leaderboards control, content control, analytics control, data control, etc.
PlayFab is a cloud service very compatible with Construct's architecture and game development.
A very good example for this compatibility are the automation rules, which are created through conditions and actions, similar to Construct's event sheet system.
PlayFab is a great choice for a backend service for Construct 3 and Construct 2 projects. It has the features you would need for a multiplayer or online game, from massive multiplayer games (mmo) to small online games.
The instructions below will get you started!
Step 1 : Create an account in PlayFab, login if you already have one.
Step 2 : If you don't have an account yet, this should appear.
Step 3 : Input your credentials, remember to take notes of the inputted credentials since this will be the access for your company, studio and game applications.
Step 4 : Select the game application from the studio selection.
And input the title-id, under the name, into the PlayFab API addon.
Step 5 : This will launch the PlayFab Console for the selected game application, under a studio.
Step 7 : It's time to follow the guide for the PlayFab API addon. To setup the client-side, which is also the term for the Construct 3 or Construct 2 game application.
Step 8 : It's best to also read the actual PlayFab documentation, I have some references posted on the right, which will help you get started on which to read.
1. The PlayFab Master Collection supports various platform and service integrations, hence more authentication and account sync methods. This is important for a full-backend network solution to have the means to allow the sync of all game data or studio data across all platforms and solutions.
The PlayFab Master Collection supports the following platforms and network services:
PlayFab Company - this is your company's allocated dedicated server account system.
Cryptography - 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.
Google Play - using either the Google SignIn or Web Google SignIn to integrate and sync the player's account with his or her Google account.
Game Center - using the Game Center ID from a Game Center addon, the player can integrate and sync the player's account with his or her Game Center account.
Steam - using the Steam Ticket from a Steam addon, the player can integrate and sync the player's account with his or her Steam account.
Facebook Instant Games - using the FacebookInstantGamesSignature from a Facebook Instant Games addon, the player can integrate and sync the player's account with his or her 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 his or her Xbox Live account.
Kongregate- using the Kongregate ID and Auth Ticket from a Kongregate addon, the player can integrate and sync the player's account with his or her Kongregate account.
If ported, console support:
Nintendo Switch - using the Nintendo Switch Device ID, the player can integrate and sync the player's account with his or her Xbox Live account.
Play Station Network - using the AuthCode and RedirectUri , the player can integrate and sync the player's account with his or her Play Station Network account.
2. The integration is easy to do, and there's no limit to how many integrations you apply. If you cannot find a specific integration platform you have in mind, please contact support.
The integration starts with your initial registration of any authentication method you prefer. The login of a not yet linked platform account will automatically create an account, hence initial registration.
Otherwise, if a platform account has a linked PlayFab account, it will simply just login. This is done through the Authentication addon.
Once an account is created and the player is logged in. The player can add or remove authentication methods. The authentication method is where the player can access his or her account.
This is done through the Sync Manager addon.
The term for adding or removing authentication methods are (binding or unbinding), (linking or unlinking) and (syncing or unsyncing).
Adding an authentication method into a PlayFab account allows the account to inherit the platform's shared information. For example, linking Facebook allows you to access the facebook account's display name, email and friends list.
And that is it, now you are done!
You have now successfully implemented authentication and platform integration into your players account.
What is a conditions category?
It is the category of a set of trigger conditions that resembles the name of the action that fired. One action is only equivalent to one response from the conditions category. Ideally, there will be no multiple trigger condition response in the PlayFab Master Collection unless it is of special case.
What is a positive response?
It is the equivalent positive response under a conditions category, of an action request you've made. This condition trigger is also named similar to the action that ran and it will be the positive or successful condition of your action. There is only one positive response per condition category.
What is a negative response?
It is the equivalent negative response of the action you've made under a conditions category. This condition trigger is NOT named similar to the action that ran, except the one with the Error at the end, which is also a negative response.
Action : Request
Most actions in the PlayFab Master Collection are a request to the server. An action is the request part of the event making pattern of request-response.
It should only fire one (1) trigger (green arrow condition) from the condition category named after the action. Ideally, it should be noticeable which conditions category corresponds to the action, after looking at the conditions list.
Condition : Response
Most conditions in the PlayFab Master Collection are a response from the server. A condition trigger is the response part of the event making format of request-response.
An action should only fire one (1) trigger (green arrow condition) from the condition category named after the action.
It's recommended to cover all available condition triggers for that action to make an application reaction for every possible response from the server.
In some cases, a general error trigger fires in a condition category, this means that it is an error that is not covered as a separate negative response.
The reason can vary, it could just be a user input error. Or an event-making error, playfab configuration error or a failed credential.
This could be nothing to worry about, where you would use it as another general failure condition for your game application, or it could be a configuration or event-making error.
This is where the built-in debugger comes in. It logs the server response and errors in the console, for debugging purposes. You can enable this from the PlayFab API addon, but don't forget to turn it off for production, although there won't be any major consequences if left enabled.
The PlayFab Master Collection has a format of making events, it's a request-response. This is a format where ideally, each action request of an addon corresponds to a conditions category response. This is due to each action having a different kind of response depending on the input and situation.
On a 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 condition trigger would be the response. A trigger is a condition that will only fire once on the instant it happens and it has a green arrow to its side to easily identify it, it usually starts with the word "On", for example "On Company Register".
It is recommended to cover all the triggers of an addon from the PlayFab Master Collection, since in any request, you would want the application to do be able to react on any response from the server.
Although, when you are debugging, if you ever want to know what condition trigger responded, there is always the PlayFab Master Collection's built-in console debugger, which can be activated by setting the PlayFab API module's debug mode property enabled.
More details of the event making procedure will be explained below:
The PlayFab Master Collection has a built-in debugger which can be enabled from the PlayFab API addon's debug mode property toggle.
The debugger logs all necessary processes in the PlayFab Master Collection addons, most especially the server response data. This includes the positive responses and negative responses, which also includes the harmless common error log for all the negative responses.
The PlayFab Common Error Log is harmless and it even has a reminder for that on the debugger.
It shows up when a negative response is received from the server.
The PlayFab Master Collection has a request-response pattern of event making. There are also two (2) types of responses, a positive response and a negative response.
The positive response can only be one (1) condition trigger, that is similarly named with the called action request. The rest of them are negative response condition triggers.
There can only be one trigger response that is fired for every action, one from the belonging condition category. It is only either a positive or a negative response.
In a case where a negative response trigger is fired, there will be what we call the Common Error Log. This is a harmless error log which is the basis data for the negative responses.
This should just be ignored as this is not something that can cause problems with PlayFab's functionality.
Rather it even is the source data for the negative response condition triggers.
Common Error Log
The PlayFab Master Collection implements cloud network and realtime multiplayer features to applications made with either Construct 3 or Construct 2 for all major platforms supported.
It can implement features for a wide range of online multiplayer game types, from massively multiplayer online games (mmos) to small online games.
It's a full backend-network system that major game companies use, so implementing this with your application can help you create your dream professional game application!
The main online feature here is to store the user's data into the cloud server, which is a feature of the User Data addon.
You could also use the Publisher addon if you want to store the user's data for the entire studio, instead of just the game application. ( This is not allowed by mobile platforms.)
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 - the authentication for integration of an auth method.
User Data - store cloud data for a player.
Title Manager - retrieve game global data and the server time.
Mobile Info - retrieve the mobile device's info, to add as an authentication method.
Clock - to convert the server time to the local date and time.
The Clash of Kings is a great example of a massively multiplayer online (mmo) game. The PlayFab Master Collection has the tools to implement the online features of this game.
This game utilizes most, if not all the addons in the collection, main features for this game are account syncing, account switchi, virtual currencies, real currencies, photon realtime & chat integration, player manager, player info, account info, account manager, content-delivery network and friend manager.
The feature showcase images shows the switching of accounts and binding of accounts, which translates to the PlayFab Master Collection's login using the Authentication addon and syncing of new authentication methods using the Sync Manager addon.
The Clash Royale is a great example of a massively multiplayer online (mmo) game. The PlayFab Master Collection has the tools to implement the online features of this game.
The feature showcase images show the company authentication method. Either logging in or registering for a new account using an email address, which is sent to your own company server database, provided and allocated automatically by PlayFab.
This can be implemented using the Authentication addon.
Firebase requires understanding in programming, database designing and security.
If you plan to do game development, you would also need to take into consideration a game focused database workflow and security in the design.
In contrast with Firebase, PlayFab has a user-friendly interface for non-programmers.
It even has a rule creation system that is managed with Actions and Conditions.
It is a familiar environment for Construct 3 users.
PlayFab vs Firebase
Firebase has been popular for Construct 2 projects, for a while. Unfortunately, few know that Firebase is just a general-purpose cloud service.
PlayFab on the otherhand is a game focused cloud service, which has the tools for implementing games from small online games to massively multiplayer online games.
PlayFab has been worked on for years to be an optimal tool for game developers, it even has a user-friendly console. It is a familiar environment to Construct's interface.
This works well with game development, as you get an admin console that is visually intuitive, while coding is optional.
It is a recommended cloud network service for game developers who wish to create their own online games, whether small or massive.
Firebase is general-purpose, it doesn't have much specific tools for game development. It is made in-mind of all fields of development.
A developer would have to do everything manually and it requires a higher technical knowledge aside from just game development.
It is kind of recreating PlayFab manually from scratch using databases, which is time consuming.
It is not that Firebase is a bad service, it is a great service.
Although, it is important to choose wisely which service to use, and in terms of game development, PlayFab is a wiser choice.