Hi,
I'm setting up my economy and data handling. I stumbled upon "the 10 character limit" here and got some good feedback from @Andy. That also raised more questions...
(brief game concept):
Planning/Questions:
Thanks
Answer by Brendan · Sep 01, 2018 at 11:55 PM
Given your requirements, it sounds like you should indeed use the Economy system for the players in the team (so, each player is an inventory item in the player's account).
For your specific questions:
1. If the data is compact, storing it on the item would make more sense, yes.
2. If you intend to update the data on many team members at a time (UpdateUserInventoryItemCustomData), then you will need to use User Data instead, as updating all the item instance custom data would require too many API calls.
3. No, Title Data cannot be updated as a result of a player action - it is only intended to be updated periodically, and only by an action made by the developer/publisher. Trying to update it via player actions would result in too many calls, and you'd be losing data constantly. Title Data is a sharded and cached resource - that's what allows us to have millions of players reading it at once. So there's always going to be a delay from when it is updated to when that update is available on all shards. It sounds like what you're describing is a leaderboard. Why not just use statistics to store the best team member for each player (for clarity, I'm using "player" to mean the real-world person playing your game, and "team member" for the soccer team members which are inventory items on the player account).
4. Currently, no. We do plan to provide a marketplace that would allow for that in a future update, but we don't have a date for that just yet.
5. Trading of non-stacked inventory items does work fine player-to-player, and it can be used for gifting, as well. There is no "discovery" mechanism however, so no, as-is that system cannot be used for a "marketplace", unless you're storing all the information about available trades in an external data table.
6. There's an almost unending list of potential pitfalls for any non-trivial game. Based on what you've described, one key challenge is going to be making sure that you keep your call rate down to a reasonable level. But also, how are you planning on managing the multiplayer sessions? Hosted game servers? Photon? Something else? How are you planning on managing security for the game sessions?
Hi @Brendan,
first of all thanks for the detailed reply!
Answers 1 and 2 are good to know and I'll do it that way. Also the clarification about Title Data (3). I guess 3, 4 and 5 are possible with external database as you mentioned. These features are more advanced and I need to get the basic game working first. But I wanted to ask about implementation anyway to give you a better understanding about my concept and answers for me and others planning to do similar logics.
I've read about keeping API calls to a minimum (6). Btw. it's not possible to UpdateUserInventoryItemCustomData for multiple items with one call?
For 6: I'm going for Photon cloud for the moment (I saw you're working on making server(s) easier/better), but as mentioned above I'm working on the core gameplay right now. I saw lots of posts about security (like flagging cheaters, having an internal "cheat-score") and security checks (in CloudScript) in different posts. I'll collect them and see what I can implement. Not sure if you've got an official recipe for best practice. This could be nice, otherwise everyone has to search for the good advice in the threads about multiplayer/photon.
Thanks again!
Correct - at the moment, you'd need external data tables to support those three. The main idea to bear in mind is that a data system that requires read/write of arbitrary across all players really needs to be purpose-built for it to be affordable, so we'll be providing features that accomplish some of the things you describe (like a trading marketplace) in future updates, as we're specifically designing for those features.
But no, UpdateUserInventoryItemCustomData takes a single Item Instance ID and the data you want to post to it, so it's only for use with one item.
As to 6, my concern is that your game design sounds like it's a real-time action (sports) game. In that case, if you're not using a custom game server, you are inevitably trusting the client for the majority of the gameplay logic (occasional checks in Cloud Script will work, but you couldn't manage the real-time game session logic there). So if cheat prevention is a concern, I'd recommend using custom game servers.
Hi again on this Sunday ;-)
Well the game concept isn't about real-time action like FIFA or PES. It's a management simulation where the users choose the line-up of the teams and can change some tactics and make substitutions during the game. Of course there'll real-time logics in the background calculating the outcome of the game. A 90 minute soccer game will be simulated in 90-120 seconds. So maybe every "ingame" minute (90 times a game) a logic defines if team a or team b has a chance and if they score a goal.
The idea is to sync the player stats (via Photon) and then the non-masterclient can also calculate the outcome of a ingame event. So this non-masterclient get double-check the game event outcome which is send by the masterclient. I've to do some more testing if this is a valid way.
Still setting up getting PlayFab data into Unity and loading/saving tactics and line-up of the team.
Btw. I'm still heavily looking into UnicornBattle to understand all the PlayFab features. This sample game is a little bit older but it's the latest (huge) example, right? Or do you have a newer game to learn from?
About Set data OnApplicationQuit 2 Answers
Playfab Player Data Fields ? 1 Answer
Does playfab have features allow user to store user's profile data in a database? 1 Answer
Setting player data through ue4 blueprints 1 Answer
Is it possible to store data (tables), modifiable from the Playfab developer dash? 1 Answer