PlayFab recipes and samples
Here are some links to recipes and samples that you can download and run, to gain a better understanding of how to use PlayFab features in code.
This collection of examples shows familiar patterns and mechanics implemented using PlayFab.
- Daily Prize Wheel - Give players a randomized gift every day, based on the values on a "Prize Wheel".
- Progressive Reward System - Players that sign in consecutively over several days are granted an item, depending on how long their login streak is.
- Referral Code Bonus - Generate and send codes to friends that they can redeem and unlock a bonus for both the referrer and themselves.
- Cross-Promotional Rewards - Reward players participating in more than one of your games.
- Regenerating Currency Mechanic - A play-limiting mechanic (similar to Candy Crush lives), that slowly refills to a maximum over time.
These samples provide complete code snippets that demonstrate various PlayFab features.
|Sample Name||Platforms||Engine||Description||Demonstrated Capabilities|
|PlayFabCommerce||Android||Android Studio||This sample uses Android's in-app billing API and PlayFab client API, to demonstrate an in-app store that exchanges real money for virtual items in PlayFab Economy.||
|PlayFabSignIn||iOS, Android, PC||Unity||This sample demonstrates a simple PlayFab sign in flow. You may log in with an email/password, create an account, or log in as a guest. Sign in information may be remembered across executions of the sample.||
|PlayFabEventsUnity||Android, iOS, PC||Unity||This sample demonstrates sending events from within a Unity title. The sample covers player events, title events and character events.||
|PlayFabLeaderboardsUnity||Android, iOS, PC||Unity||This sample demonstrates reading and writing from/to leaderboards from within a Unity title. The sample covers lowest score/best time, high score and cumulative score leaderboards.||
|SpaceRumble||Android, iOS, PC||Unity||This sample demonstrates a simple single-player mobile game.||
|ThunderRumble||PC, Xbox||C++ DirectX Native||This sample demonstrates scalable cloud dedicated server functionality, using the PlayFab Multiplayer Servers technology to build a complete end-to-end game experience.||
Send feedback about: