question

Matthew Sbar avatar image
Matthew Sbar asked

What are my options for storing randomized items?

I'm working on a Looter Shooter game with randomized items that have lots of different properties similar to items in a game like Diablo 2 or Path of Exile. In my game, I'm able to serialize a single item to minified JSON which should be about 280 bytes per item right now. If I want to be able to store an inventory of 100 items using playfab, how can I go about that? It's recommended new projects use entity objets, but Player Objects only supports 5 objects of 1000 bytes, and 5000 bytes is going to be enough to maybe hold the amount of items one play would pick up in 15 minutes or so. Is it fair to say I need an external database solution? The item catalogue does not seem like an appropriate solution because instances of catalogue items don't seem to allow the permutations that I'd need. I'm hoping I'm missing something here.

dataPlayer Inventory
1 comment
10 |1200

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

Matthew Sbar avatar image Matthew Sbar commented ·

It seems like player data is an option, with 300,000 bytes per player allowed with arbitrary keys. Why is it recommended projects use the option with 1/60th of the capacity?

0 Likes 0 ·

1 Answer

·
Ivan Cai avatar image
Ivan Cai answered

The Entity Objects are used to read and write small JSON-serializable objects attached to an entity. Compared with player data, entity objects have faster processing speed and better performance. In your scenario, so it is recommended that you use objects for storage. You can also use external database to allow the pernutations that you need and it supports byte capacity will also become larger.

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.