question

perepechenko@gmail.com avatar image
perepechenko@gmail.com asked

Migration from Parse

In connection with the statement of the imminent closure of the service Parse.com we have seek a replacement. Found your service, we really like it, great statistics and system of content in the store. We plan to move our projects to you, but have a few questions.

1. Save binary data. At the forum, I read that it is possible to store binary data (up to 400 KB), but did not find an example of how to do it (we are has 10-12 small files up to 50 KB). Plus about 150 text files up to 20 kb (levels progress). Can you show little sample how to do this via your service?

2. Adding items. The specifics of our game is that items can be thousands (they are generated by a given algorithm) with different parameters. And they often drop out. To transfer our project at your service if we can make some workaround to be able to add items directly to your inventory. Also we did not get to use droptable because we drop the parts of the body armor and those that generated monsters, and monsters around 30 types and 30 sets of armor, so everything is generated programmatically. May fall only those things that are put on the current monster. It may be a lot of options, to make droptable for every impossible. Can you suggest any way for the addition of a given thing in your inventory and change of money. At the moment it is the biggest problem when moving to your service.

10 |1200

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

James Gwertzman avatar image
James Gwertzman Deactivated answered

Hi there.

We are already working on a migration kit from Parse to PlayFab, and should have it ready by the end of next week. We will be making it very easy for developers to move from Parse to PlayFab, most likely even with direct compatibility thanks to the opensourced Parse server.

To answer your questions, though:

1) For file storage, see this blog post (https://playfab.com/blog/how-use-playfabs-content-management-api/)

2) To grant items to the player, see https://api.playfab.com/Documentation/Server/method/GrantItemsToUser. This is a server-based API (instead of client based) and you can call it using CloudScript (https://api.playfab.com/docs/using-cloud-script/).

3) For customized items, every item in the inventory can have custom data properties. See https://api.playfab.com/Documentation/Server/method/UpdateUserInventoryItemCustomData. You can use this to customize items in the inventory -- create some basic item types in the catalog, grant the item to the player using CloudScript, and then set custom properties on the item to personalize it.

3) You are right -- a drop table is not enough for the sort of programmatic drop you need to do, but that's again where Cloudscript can come in. Create a function where you pass in the name of the monster that was killed, and then use logic to figure out what items to drop. You can store the table of item drops in TitleData -- that's where you should store game configuration data.

Hopefully this is helpful!

10 |1200

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

perepechenko@gmail.com avatar image
perepechenko@gmail.com answered

Thanks for the detailed answer.

Clarification about binary files - I mean how to upload file from the game? Saved game for example.

Another question:
For example, a player is playing in the subway, and the connection is lost periodically. Now we have a game resistant to loss of connection. When device connect again game synchronizes data with parse.com. Is it possible to Playfab?

10 |1200

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

brendan avatar image
brendan answered

For data coming from the client, you would use User Data:

https://api.playfab.com/Documentation/Client/method/UpdateUserData

https://api.playfab.com/Documentation/Client/method/UpdateUserPublisherData (if you want to be able to share it across titles)

This is string/string Key/Value pair data, so for binary data, you would encode it to string (Base64, UUEncode, etc.). We're looking at providing additional options for binary data, as well. If you have specific scenarios in mind, feel free to detail them and we can advise on the best approach.

We don't currently provide client-side caching (like the ParseObject cache) out of the box in our SDKs, but that is in our backlog and we prioritize in part based on community feedback. So if that's a critical feature you need, please be sure to let us know in our Feature Requests forum.

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.