Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by rainerlonau · Sep 01, 2018 at 04:46 PM · Player DatadataIn-Game EconomyCharacter DataTrading

Soccer Manager - Handling of soccer players / data

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):

  • 1 on 1 soccer management game (Using Unity, Playfab and Photon)
  • Each user has up to 25 soccer player (items) in his team
  • A game is about 1 1/2 to 2 minutes long
  • Best 11 soccer player feature (see items from other players)
  • Trading and/or auction of soccer players

Planning/Questions:

  1. I would go with the "each soccer-player is an item" approach. Andy mentioned that the soccer player data could be in user data. But depending on the different properties/skills/values a soccer player my have in the game, I think it makes more sense to manage that data in the item concept.
  2. On login the user loads his data. After a match (about 2 minutes) the data of soccer players will be updated. I think that time window is fine with PlayFab. However, I intend to "update" (give some skill points) to the player depending on the result of the match (win/lose). After the game, the player calls a CloudScript where the soccer player get some "points".
  3. Andy mentioned the problem of getting lots of item (data), causing lots of data (requests) from PlayFab. How would I implement something like the currently "best team", meaning the top rated 11 soccer players? I was thinking about some title data entry where the IDs of the items (soccer players) are saved. Whenever my soccer player (item) gets some skill points (e.g. won match), he would check if he's better than the "best team" soccer player. If he's better, his ID would replace the one in the best 11. It seems it's not possible to get Items by IDs directly? I would need to also save the users PlayFabID with the item ID and get the data via https://api.playfab.com/documentation/server/method/GetCharacterInventory in the CloudScript. Any other way?
  4. Is it possible with PlayFab to have some kind of marketplace for the soccer players? So a user can choose to put some of his soccer players (items) up for sale. In the marketplace the items for sale are listed and possible searchable for skills/properties etc. How would you implement it? How to have items and their custom data from lots of different players in a list? How to settle a purchase/transfer of an item if only one player is "online"? [Update: Found this feature request. Seems to be not possible at the moment]
  5. Trading one on one seems to work fine: https://api.playfab.com/docs/tutorials/landing-tournaments/trading. Maybe this can help for my question #4?
  6. Can you think about other topics/pitfalls and solutions for a game like this?

Thanks

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

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?

Comment
rainerlonau

People who like this

1 Show 7 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rainerlonau · Sep 02, 2018 at 06:00 AM 0
Share

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!

avatar image Brendan ♦♦ rainerlonau · Sep 02, 2018 at 09:31 AM 1
Share

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.

avatar image rainerlonau Brendan ♦♦ · Sep 02, 2018 at 02:33 PM 0
Share

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?

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    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

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges