Skip to content
James Gwertzman edited this page Nov 2, 2016 · 31 revisions

#Introducing Unicorn Battle This repository is the home of Unicorn Battle (UB), PlayFab's open-source, end-to-end demo project. UB is a complete game sporting dynamic gameplay, driven by PlayFab's back-end technology, showcasing how to build modern live-game systems.

##Key Features

  • Unified Player Profile - Accounts uses Device ID &/or Facebook Authentication
  • Cloud Saving - Store data on up to 10 characters per account
  • Inventory Management - Transfer items and currency between the player and its characters
  • Dynamic Gameplay - Drive client behaviors using TitleData
  • Virtual Items, Currencies, and Stores - Configured via PlayFab's Game Manager
  • Friend Lists - Import Facebook friends or add your own
  • Statistics Tracking - Used to drive Achievements and real-time leaderboards
  • Push Notifications - for re-engagement campaigns and special offers
  • Real-money, In-app Purchases - with Android or iOS receipt validation
  • CDN-hosted AssetBundles - Dynamically stream content to clients for new sales and events
  • Cloud-hosted Logic - Cloud Script methods that call a variety of protected APIs
  • Community Forums - with API access to your game; built by our partners over at [Innervate](https://playfab.com/marketplace/innervate/"A turn-key community solution that comes out-of-the-box integrated with PlayFab")

##Configuration and Setup ###Prerequisites: This is an advanced example and can be quite dense at times due to the many sub-systems.

  • You should be very familiar with Unity3d & UUI
  • Have a basic understanding of the PlayFab API
  • Be comfortable working with JSON-to-C# serialization & deserialization

####Back-end Setup: The Unicorn Battle data is distributed across many cloud-based technologies.

We built this handy tool to clone the Unicorn Battle back-end to a PlayFab title of your choosing.

After running, if no errors were reported, then you are ready to move on to the client setup.

See the Back-end guide for additional details.

####Client Setup: There are two ways to setup the Unicorn Battle client. You can download the Unity source code, compile it yourself, and run on the device of your choice. Or, you can download and install our precompiled Unicorn Battle app directly from the Google Play store for Android.

#####Download from Google Play:

  1. Go to the Unicorn Battle App on the Google Play store, and install it on your Android phone.
  2. Run the game, but do not yet press Play.
  3. Click the Settings button in the bottom left corner.
  4. Choose "Set Title ID" and enter your own custom title ID from above. This will tell the game to connect to your custom back end. Accept the new title ID.
  5. Press the red "back arrow" in the bottom left corner to return to the main menu.
  6. You may now press "Play Unicorn Battle" to start your game. If you have your browser open to the Game Manager for your Unicorn Battle title, you should see your phone connect in the PlayStream debugger. That's how you know it's working!

#####Download source and compile yourself: The Unicorn Battle Client was built with iOS and Android targets using Unity3d 5.3.4f. Testing within the Unity editor, on web or desktop works, but not all features are available. This game was designed to be viewed in 16:9 aspect ratio, but most common ratios should display reasonably well.

Prior to running Unicorn Battle you will need to set your TitleId in GlobalStrings.cs. This is the same value you used when setting up the back-end.

At this point you should be at a point where you can build and test the game locally.

See the Client Guide for additional details.

##Troubleshooting: For a complete list of available APIs, check out the online documentation.

Our Developer Success Team can assist with answering any questions as well as process any feedback you have about PlayFab services. Community, Forums, Support and Knowledge Base

##Copyright and Licensing Information:

Apache License -- Version 2.0, January 2004 http://www.apache.org/licenses/

License Details available in LICENSE.txt

###Third-Party Code Attribution: The asset creators below retain all rights to their assets. Please do not use without explicit consent. If you like any of the assets used in Unicorn Battle, support the creators:

##Community Development Ideas on how we can make our examples, documentation and services better? -- Contact Us

Want to continue developing on Unicorn Battle? -- Fork Unicorn Battle

We love to hear from our developer community!

##Version History: See GitHub Releases for the latest stable build and patch notes.

Clone this wiki locally