Hi there,
We use PlayFab for player management of our game, which includes both a game client and a web portal where most users will be. Users can engage with game content, and we'd like to build in a tipping system and are wondering if PlayFab is a viable option for managing this. Looking through the forums and documentation, I'm not sure how we could implement, but I'm keen to find a way - hopefully with some help :)
Here's the general premise:
1. "GameSessions" are created (there may be hundreds a day), and while playing a game session other users can watch & engage.
2. Users can purchase virtual currency with real currency outside of a GameSession, and it's stored on their account.
3. Users can tip VC towards a GameSession, and so we need to store that GameSession_ID with each transaction / tip that is made.
4. At the end of a GameSession, we loop through all purchases with that GameSession_ID and note that total on the GameSession (GameSessions objects are handled outside of PlayFab).
The real goal is to have many purchases associated with an object, and then many of those objects with unique IDs (possibly enough to go over the item cap in a single day, if each object was it's own item). Having a reliable ledger of all those individual transactions (PlayFab) and being able to tie it back to a GameSession is also critical.
I was thinking of having a single "tip" item, and then storing the GameSession_ID in the ItemInstance CustomData - however, that raises a few questions:
1. Having variable tip amounts, rather than a fixed item price - I could solve this by having a "tip" item be just 1 VC, then you purchase multiple of them to add up to the custom tip total. Or would each ItemInstance happen for each QTY that a user purchased, so a 100 VC tip would result in 100 line-items...?
2. Once a GameSession is over, we can document the tip total then close out the GameSession - so we could clear out resources if necessary, i.e. if we instead had to have a unique item for each GameSession, maybe we could create the item with the GameSesion_ID tagged on it, total the purchases, store that data on the GameSession, then delete the item? We still face the 3K item limit though in an extreme case of having 3K simultaneous GameSessions...
3. How would we / can we loop through all transactions of the "tip" item to get the GameSession from the custom data? Maybe over a certain timeframe of when the transactions occurred? This would be required to document the total amount associated with a GameSession.
4. We need to be able to process hundreds of tips on hundreds of unique GameSessions daily, so I'm not sure IF we can loop through all those transactions IF this would prove difficult.
I'm open to any creative ideas that you may have, and appreciate any help!