Getting started for developers
Thank you for either choosing PlayFab as your platform for back-end services and LiveOps, or evaluating the PlayFab offering. Welcome!
The purpose of this section is to shed some light on how PlayFab helps you - as a developer - to build your game using PlayFab.
PlayFab offers you a wide range of services, and has over 280 different APIs that you can leverage to make your game. This can be a lot to absorb in one session, so we'll take it slow.
Let's start with the first steps of making your game - and then move into the more advanced features as we go.
Before you can make your first API call, you need to create a PlayFab Developer account.
The first step in adding PlayFab to any game is adding code to login the player. Logging in the player returns a security token that is needed for all other API calls.
Your game is identified by its TitleId. The quickstart guides listed later on this topic use a test TitleId. When following the guides, use a TitleId for a game that you have created.
Retrieving your TitleId
If you haven't already, register for a free PlayFab developer account.
When you create a Title in Game Manager PlayFab generates a TitleId.
To retrieve the TitleId for your game, log into the Game Manager.
On the My Studios and Titles screen, locate your game. The TitleId is located just below the name of your game.
Login and account basics
Now that you have created a game and retrieved your TitleId, you're set up to make API calls.
The starting point for any PlayFab integration is authentication. You must authenticate your player to make further API calls. PlayFab offers a number of methods to authenticate and link your players.
Here are some resources that will help you with the initial authentication of your player:
- Login basics and Best Practices – Check this tutorial first to learn about the best practices to use various authentication methods in your game.
- Authentication Service Helper – Learn how this service can save you valuable time by leveraging building best practices in this authentication service for each SDK.
- Authentication quickstart – Use this guide to understand the basics of authentication calls into PlayFab.
- Account Linking tutorial - Learn about linking and unlinking different types of accounts to a single player profile.
Making your first API call with PlayFab
We have SDKs for all major game engines and languages.
Choose an environment from the links provided below, and follow it to the appropriate quickstart guide. These quickstarts walk you through installing your environment, creating a new test project, and making your first API call.
Pick your SDK:
- Flash (ActionScript3)
- Defold (Lua)
- Corona (Lua)
- Windows - C++
- Linux - C++
- Xbox - C++
Every game is fairly different, so you will have a unique set of features that you must build every time. It is important to know and understand how to map those features onto PlayFab.
This generally starts with the configuration of your game. You will want to store variables in PlayFab, and pull them down on to game clients. But these are not the only types of configurations that you'll want to make.
Some of the number of different ways that PlayFab maps onto a game are shown below, giving you the opportunity to find the combo tool set that is just right for your game:
- Title Data – Map variables containing data on PlayFab to data structures in your game clients.
- Entity Objects (aka: Player Data) – Store and retrieve data on a per player basis.
- Catalogs (Items) - Very useful for storing configuration data about your Items and potentially being able to sell them as virtual goods.
- Groups – Groups are generally used for things like guilds or clans. Groups are arbitrary and have members, roles and other guild-like features.
Mapping your game on top of PlayFab is a great start. But there is more power to be harnessed in PlayFab that can help your LiveOps team create better engagement, retention and monetization mechanics.
A majority of these features leverage PlayStream, an event system that drives real time events. This enables you to perform actions on player behaviors. Actions can occur in a number of ways - either via segmentation, or direct rules that are applied to specific events.
For more information, check out these resources to get you started with Cloud Scripting and Automation on PlayFab:
- Automation – A hub for information on CloudScript, Scheduled Tasks, PlayStream and Action & Rules.
- CloudScript quickstart – Get up and running quickly with your first CloudScript call.
To leverage rules in the automation system, write custom events in your game which will create a PlayStream event.
Get to know PlayFab features
There is much more you can do with PlayFab. Check out each of our feature areas in the links provided below to find the right feature set for your game: