rkacalski avatar image
rkacalski asked

TCG - Trading System

Hey everyone so I am developing a TGC and need some help planning and figuring out the best approach for a trading system. Essentially the player will have a trade list and a wishlist that looks like this.


The player would click on the card they want to find in their wish list in this case the one circled in green. The player would then be sent to a scene where any user with that card on there for trade section will appear.


The player can then view that players Wishlist, to see if a trade is possible. If two players agree on a trade (Done through messaging system), one of the players would hit trade and select the given cards. Then the other player would receive the trade and add their cards to trade. The trade then gets sent back to the player that initiated the trade to accept or refuse the trade. The traded cards then get sent to their new owners. The whole system is very similar and essentially a simpler version of the trade system found in this video here.

The biggest hurdle I'm facing has to do with the wish list aspect. Is there a simple way to implement this? Would it have to be stored as playerData JSON? And if so can you even search all players through that without killing your API calls?

I also see PlayFab has some trading features built in, but not sure how I would implement them in this exact scenario.

Any help here would be appreciated and would love if someone can help steer me in the right direction.


capture.jpg (79.2 KiB)
capture1.jpg (65.4 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Neils Shi avatar image
Neils Shi answered

Even if you store wish list data as the player Data JSON, PlayFab does not provide the feature which let you search all other players’ data. And the built-in trading feature of PlayFab does not provide a list of trades that are available to you from other players. As a workaround, you can store the wish list data in ugc item’s Display properties, because the User Generated Content (UGC) feature empowers your players to create, upload, and search for moderated content. And please note that the Display properties field has a 10000 character limit. If player A initiates a transaction request to player B through the messaging system, and player B agrees, then player B can call the API TransferInventoryItems to transfer items between two players via Azure Function. For more info, please refer to PlayFab Inventory APIs - PlayFab | Microsoft Learn. And if you haven't decided how to implement the messaging system, you may also consider using PlayFab Party. And if this doesn't meet your needs, you may need to use an external database to implement this functionality.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.