question

panayiotismilios avatar image
panayiotismilios asked

City building Game / Worlds

Hello,

I'm in the process of creating a city-building game and i have stumbled upon an issue. I want to have several "worlds" in my game. For instance every player will be able to choose if he wants to play on World A or World B or on both worlds. Every world must hold different data for every player.

For instance:

Player 1 logins on World A. Then he logs out and proceeds to login to World B. How can i efficiently distinguish his data between the two worlds? Secondly every world will have some static settings. Where can i save these settings?

Now i wanna be clear that nothing in the game is real time (most of the things that happen are time scripts), thus i don't think i need an actual server just an efficient way to distinguish player data between worlds.

10 |1200

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

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

You can create two titles to manage two worlds’ data. And use Title Data to store your static settings. By default, all titles within a studio share a single master account namespace. Players can log in different titles in one studio with their master player accounts. And use player publisher data to save information about a player relevant to all titles in your studio. Title Data is a set of key/value pairs that you can use to manage configuration. Please check the quick start about Title Data to learn more about it.

6 comments
10 |1200

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

panayiotismilios avatar image panayiotismilios commented ·

Ok thank you for clearing that up cause i was thinking about doing it with segments.

Now i have another question. Every city's data will belong to a player in the Shared Group Data, since the city can have a different owner from time to time. My problem is that when it comes to the map, i need to be able to show information about the cities regardless on who owns it.

So i have to implement multiple calls using the GetSharedGroupData. Would that cause a delay if i call it let's say 100 times or more? Or is there another way i could do this?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang panayiotismilios commented ·

I’m sorry this feature that you want isn’t supported. There is no system that would allow a player to read all data for all other players. Please refer to this thread: https://community.playfab.com/questions/9472/i-want-to-save-my-gamess-world-map-data-to-server.html. We don’t suggest you have every client making dozens or hundreds of calls to read out all the data. It would get your title throttled or blocked, as it would be a violation of our Fair Use policy.

0 Likes 0 ·
panayiotismilios avatar image panayiotismilios Sarah Zhang commented ·

Actually i simply wanna know the player that each city belongs to. Definitely not all the data of every city. I migrated from GameSparks and they had a query function where you could call multiple data documents. Is there something similar here? If not what would be a way around this?

Basically i want to know the owner of every city in the map. Can i store this information in title data and call it from there? That would require to update the title data daily

0 Likes 0 ·
Show more comments

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.