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.
Create a PlayFab account
Before you can call any PlayFab API, you must have a PlayFab developer account. If you already have a PlayFab account, you can skip this step.
Once you have a PlayFab account, navigate to the PlayFab home page, https://playfab.com, and log in.
Since PlayFab does not know the name of your game studio or the title of your game, initial values for these fields are assigned.
Unnamed Studio is the default name of your game studio, and Unnamed Title is the default Title of your game, as shown in the following screenshot. You can rename these at any time.
The Title ID is unique to your game, which we call a title. You will use this value when you make PlayFab API calls (your title ID will not be BCFE).
Your first title is auto-generated by us. If you need a new title later, you can create additional titles by selecting Create a new game (but don't do this yet).
The current title and user can be found in the top right of your screen. An Admin menu appears when the User is selected.
Open the Game Manager for your title
Before installing your SDK, select any title and the Game Manager will open for it. Take the time to familiarize yourself with the various sections in the Game Manager dashboard.
For a more detailed overview, visit the Game Manager quickstart.
The PlayFab Game Manager allows you to do whatever you need with your game title. Once you have a grasp of the aspects of the Game Manager, install the SDK so you can start using APIs.
Making your first API call
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 guides will 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++
Updating your login mechanism
The first step in adding PlayFab to any game is always logging in the player. Logging in the player returns a security token that is needed for all other API calls.
The quickstart guides utilize a test TitleId - but from now on, you should be using your own.
Create a Title in Game Manager, and update your environment with your own TitleId.
Obtaining your TitleId
Once you have logged in, select Settings. The TitleId for your game should already be present in the field below the Name column.
The SDK guide that you followed in the first step should have included instructions on how to enter your Title ID.
Login and account basics
Now that you're set up to make API calls, the starting point for any PlayFab integration is authentication.
You have to 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.
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:
Send feedback about: