question

Basheir avatar image
Basheir asked

Quiz Game Data,Quiz Game Questions Storage

We are developing a game in Unity where we need to save Questions data. Is this not supported by Payfab?

If you recommend a third party DB , how best to integrate it with the game client which is built on Unity in a way that avoids performance issue as we will need to fetch data from Playfab and the question DB

Many thanks

,

Hi there, we are developing a question based multiplayer quiz game. Do we have to use an external DB apart from playtab? And if that is a must how best to integrate it into our app given the fact that we will have two sources of data: game stats coming from playtab and questions coming from the database and answers

data
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

>> We are developing a game in Unity where we need to save Questions data. Is this not supported by Playfab?

Could you please clarify that how do you interact with the question data? Does the players’ behavior affect the data in storage? How do you manage the data file? If you only need to store the data, and don’t want to query it or do the concurrent operations to it. You can consider storing the data in CDN or Entityfiles.

If you need any database feature, PlayFab is unsuitable to store the large amount of data, such as a question library that has thousands of questions. We just support using PlayFab API to interact with stored data and doesn’t support the database query feature. Looping the large amount of data using PlayFab API would cause some limits to be exceeded. An external database would be better suited for your requirement.

>> If you recommend a third party DB , how best to integrate it with the game client which is built on Unity in a way that avoids performance issue as we will need to fetch data from Playfab and the question DB

For the clarification, PlayFab backend would run the database operations for PlayFab data source, game developers can only use the API call to set the data or get the queried data. So, you only need to query the data of external database on your own, then you can call the PlayFab API GetPlayerStatistics to get the statistics for the player. They won’t affect each other’s performance.

To avoid performance issues, you can try not to do the query in a loop. And the frequency of PlayFab API calls need to meet the PlayFab title limits, you can navigate to [Game Manager]->[Settings]->[Limits] (https://developer.playfab.com/en-US/[YourTitleID]/limits) to check the limits for your title.

10 |1200

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

Basheir avatar image
Basheir answered

Hi Sarah, many thanks for your detailed response. Please see here a summary of our requirements, we have storage requirements for three types of content, A, B, C

[A] Game Content:

  • This will be the question sets for each category: science, history and so on. Although each game instance will contain under 100 questions at a time, the whole game contains 10k questions, each with 4 possible answers
  • Content format: text + images

[B] User Content

  • Profile info, interests

[C] Game Stage

  • When a user exit the game, we need to save where they have stopped up to that point of progress: as they go up from one level to another or a topic in the quiz game to another

We would like to use Playfab so that we can keep track of achievements, rewards and improve engagement so that we can recommend a match up between players who are in a certain level and share interest (history, science or math for example)


My questions:

[1] Based on the above, which DB should contain each one of the above? I mean between an external DB and the built-in DB of Playfab, which should manage what type of data A, B, C

[2] If we use an external DB to manage user content and profile (B), how can we then map users into playfab so that we leverage its engagement and analytics engine?

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.

Sarah Zhang avatar image Sarah Zhang commented ·

Thanks for the reply.

>> [1] Based on the above, which DB should contain each one of the above? Between an external DB and the built-in DB of Playfab, which should manage what type of data A, B, C.

[A] According to your game design, you can store a part of question content including text and images in the game original package. And you can store the remaining content as the incremental update packages. The incremental packages can be uploaded to the PlayFab CDN for players to download.

[B] PlayFab account system contains many types of user profile. You can store the basic personal inform in PlayFab user account profile such as the avatar URL, locations, statistics, etc. You can store them with different API methods, and retrieve these inform using API GetPlayerProfile. Other configures that can be modified by players can be stored in the Player Data.

[C] As for the data that doesn’t allow players to modify but need to be read by players, such as interest, achievements, etc. You can store them in the Read-Only Player Data.

According to your requirements, you can just use PlayFab bult-in storage system now.

0 Likes 0 ·

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.