question

Marc avatar image
Marc asked

Questions about Integrating high values, leagues and friend requests

Hi there!

In Corsegames, we are currently conducting a softlaunch of a game, but our current backend server does not seem to meet our needs. We are planning to move to playfab where we have another game in development (Wild Guardians).

The fact is that doubts are emerging in some specific points in the process and I wanted to ask your opinion.

Magnate is an incremental game, in some points similar to AdCap.

  • The first point that emerges is the player cash value accuracy. I mentioned this already in #general Slack and it seems that the alternative to a double is convert it to text. Another alternative would be to lose accuracy, using the "1xE105" nomenclature and use two statistics cash / exponentCash. Ex: 123456789 (cash) / 9 (exponentCash) = 123,456789 quadrillions aprox.
  • Point two, leagues. Currently our backend is basically a MongoDB server, and we use queries to divide players between leagues (Bronze, Silver, Gold, Diamond, Crystal). We do not use a player's value such as cash, we divide the total current players (60%, 24%, 10%, 5%, 1%). Do this in playfab, is a challenge. I suspect we will need support from an external server to perform the grouping process and then, enter the result in some SharedData. If I could have the total number of users currently on the system, with a simple operation and a call to GetLeaderBoard I would have enough.
  • Another feature we have is to connect with friends. To do this, what we allow is that the player can find another player by name and send him a friend request. I have not seen any function to do it and I do not know of another way to do it than having a separate server with a reference PlayfabID / username. For requests, maybe I could use SharedData, where that request will remain there for a while or until the other player accept or reject the request.

For now I think I could fit the other functionalities easily into playfab.

Thank you very much for your time and your help.

Marc Brugué

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

·
brendan avatar image
brendan answered

[Updated: Clarifying update frequency for values]

Yes, for many clicker games, the "money" isn't a VC or a statistic, since they want to be able to show the player as having values that can't be stored in 32 (or even 128) bits. There are some opensource "big number" libraries available online, or you could create your own. The simplest thing would be to store them as part of player save data, in a key/value pair with other relevant data about the player's game state. You would track this on the client (or a dedicated server), and periodically update the service-side data with the latest values - say, once a minute or so, though you'll occasionally need to do an early update due to a significant change. For example, if the player spends a "hard" Virtual Currency - one that can only be obtained with real money, or via rare opportunities in the in-game play (like Gold Bars in AdCap), you'll want to update the player's save with the modifiers purchased/applied. But for the rolling balance, and for purchases of new "shops" (again, using AdCap as the example), those are things you can just track locally and only sync to the service when needed, or when a significant amount of time has passed.

If your concern is specifically around having a statistic for comparisons between players, you would need to have a way to represent that which does fit within an int32, such as recording them based upon exponent or some similar factor (depending on the granularity you want to have).

For your leagues, it is possible to create a segment of "all users" and then query it using GetPlayersInSegment. Just set MaxBatchSize to 0, and you'll get back the count of profiles. However, I do believe that what you require is something more specific to your title's needs, since you need to have a way to "bucketize" players into groups - and preferably only active players, presumably. For that, I would recommend using an external database to track the bucketization for now. We will be providing a clan/guild system later in the year, which may address this need, depending on your requirements.

And yes, for a two-way (confirmed) friend request system, you could use Shared Group Data for that: https://community.playfab.com/questions/370/206712537-Two-way-friend-confirmation-with-Cloud-Script.html. To find friends, you could use Client/GetAccountInfo to look up players by username, email address, or title display name (as well as PlayFab ID).

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.

Marc avatar image Marc commented ·

Thank you Brendan

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.