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 Adam Mann · Oct 01, 2021 at 02:20 AM · Player Datadataentities

Is PlayFab (and its Player Entity Data system) able to support my city builder game?

Hi!

I've been poking around the forum for answers, but I thought that it might be easiest to lay out some high level requirements and get answers to the questions:

  • What would be the best approach to fulfill these requirements?
  • Can PlayFab support these requirements, or are they too taxing?
  • Are there any plugins/addons (Azure or otherwise) which could make this feasible

Brendan's answer 4B seemed to be the best relevant match I could find in the forums so far:

https://community.playfab.com/answers/12288/view.html

Not sure if the 1000 Byte player entity object data size limit is a "demo-only" constraint (is it more for paying accounts?), or if it applies to each object vs all objects totalled. If it's totalled across all objects for a given player, that could be a pretty tricky constraint.

Anyhoo, here is the high level jist of it:

  1. City builder
  2. Each player has N maps/levels. These are proc-genned, so not just canned entities that are linked to player profiles
  3. Individual buildings on each map have timers (need to track timestamps) for when their construction is complete, and for actions that can be taken on each building (recruit, farm, etc).
  4. In a session, a player could view their city, and for each building that is READY (N), trigger an action which may change resource totals and set a new READY timestamp
Comment

People who like this

0 Show 1
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 Adam Mann · Sep 30, 2021 at 06:04 PM 0
Share

I did a quick test via the dashboard and found that the 1000byte limit is for each object. So that mystery is solved at least.

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Gosen Gao · Oct 01, 2021 at 09:09 AM

To be clear, Title player account(Entity) can store up to 5 Object(s) at a size of 1000 bytes.

PlayFab has three ways to store data which are Entity Files, Entity Objects and Player Data. In the common scenario, we use Player Data for the most time. For data with big size and don’t change frequently, we suggest you to use Entity Files. For data you want to control the access policy, you can use Entity Objects.

Player Data has three different types which are Player Data, Read Only Data and Internal Data. This document describes their differences. And it has a larger value size(300000 bytes). Please navigate to [Game Manager]-[Title settings]-[limits] to check the limits' info.

>>Each player has N maps/levels. These are proc-genned, so not just canned entities that are linked to player profiles

I assume these data are generated by progress, and won’t change frequently. So you can use Entity Files.

>>In a session, a player could view their city, and for each building that is READY (N), trigger an action which may change resource totals and set a new READY timestamp

You can implement a CloudScript/AzureFunction(CSAF) to modify the data. The advantage of this is that you can verify the request and avoid cheating.

Comment

People who like this

0 Show 4 · 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 Adam Mann · Oct 01, 2021 at 02:59 PM 0
Share

And it has a larger value size(300000 bytes)

I assume that the 300000 byte limit is the max size of the player entity, including all the different types of associated data? So to best use those 300000 bytes, we'd need to chop up and our data between public KVP's, read-only KVP's, server KVP's, data files and data objects? Let me know if I'm off here.


>>Each player has N maps/levels. These are proc-genned, so not just canned entities that are linked to player profiles
I assume these data are generated by progress, and won’t change frequently. So you can use Entity Files.

Entity Files should work for the base size and layout of maps, but the contents of maps will change frequently. It wouldn't make sense to save buildings (of various types) and their timers in an Entity File, would it?

avatar image SethDu ♦ Adam Mann · Oct 04, 2021 at 06:47 AM 0
Share

>>300000-byte limit

It is the limit for a single value for a key. You can have multiple keys for a player.

>>contents of maps will change frequently.

We recommend storing the large and basic data as Files, while storing those upgrades, modification data in Player Data.

avatar image Adam Mann SethDu ♦ · Oct 04, 2021 at 05:06 PM 0
Share

Wow! I didn't believe you when you said it applied per/key, but I did a quick test via the dashboard and that seems to check out.

So if I wanted to save a large amount of data (such as the dynamic parts of a map including timestamps and whatnot), it would be better to encode it and shove it in a KVP than to use a relatively shrimpy data object?

I feel like I am missing something here. Why would I ever want to use Player entity objects over saving everything in encoded KVP strings? What are common use cases and advantages of using entity objects?

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

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    How to block data operations on player objects until azure function finished? 1 Answer

    Best way to store large amount of JSON objects 1 Answer

    How to convert Entity in group models to profiles models? 1 Answer

    Where to store Minecraft-like world data? 1 Answer

    Storing custom game data specific to a player (card game example),Inventory management data structure in a card like game 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