question

yogev avatar image
yogev asked

A few questions about the api and costs

On ConsumeItemRequest why am I forced to use ConsumeCount? If i set the Consume by count to 1?

if the player cheats and sets it to 0 will it consume nothing or it will choose the settings in the item itself?

And another thing, if a cheater somehow spams the API calls and calls multiple times or registers multiple times is there a way to prevent this? will it cost me money if something like this happens? if so is it something that I should be ready for in my budget? or like if I call it a lot let's say ConsumeItemRequest I am building a game like candy crush and every time they use booster I need to call it is it too much?

currently, I call playfab API in those situations :

  1. login (I have the anonymous with device id,facebook,google,apple)

  2. after login I read the profile on the same call with GetPlayerCombinedInfo

  3. each level they finish will be saved with Azure function

  4. On dailyReward and spin wheel

  5. when they use booster I will use ConsumeItemRequest

  6. They ability to buy boosters and Iap

and do the limits reset each month? like the profile read/write etc?

and the last thing is I tried calculating how much would it cost for let's say 10k players

Login API calls: 30,000 calls * $0.00001/call = $3.00

GetPlayerCombinedInfo API calls: 30,000 calls * $0.00001/call = $3.00

Level Save API calls: 1,500,000 calls * $0.00001/call = $150.00

ConsumeItemRequest API calls: 300,000 calls * $0.00001/call = $30.00

so it will be around 186$?

thank you

apis
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

·
Infer Wang avatar image
Infer Wang answered

For the mandatory require of consume count, it’s by designed, and I think it’s a rational design. If you set the consume count to 0, it will return error as picture shows. 6641-image.png

Actually, too many API calls will lead to title_client_rate_limited_alert - PlayFab | Microsoft Learn. This will prevent such ddos attack.

Yes, too many API calls means more cost, you may take this into consideration.

For the too many calls issue. I think you can record the times player use booster in one game. After they finish the game, you can call consume item to consume all the boosters they had used, this may reduce the times you call.

What you mean by saying “do the limits reset each month”? If you mean the usage, yes the usage will reset every month, and the cost is calculated by your usage. If you mean the API call request limit, it cannot be increased.

That’s not how the cost is calculated. API calls will lead to partial service such as events. The usage of all the services multiplied by their respective prices and the plan’s fee make up the total cost. You can see past and present estimated costs in studio-> billing summary. Also, you can refer to PlayFab Pricing Overview - PlayFab | Microsoft Learn to learn more about PlayFab pricing. 6627-image.png


image.png (31.8 KiB)
image.png (13.5 KiB)
2 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.

yogev avatar image yogev commented ·

thank you

so I have 2 ways

  1. If I want to cheap out I can send the new info when the user exits and then save it with a few checks but here the user can cheat because I save values with playerpref to Azure function 5 -6 api calls in total per invoke and I do a few checks but he still can cheat

  2. There will be many more calls but fewer cheats so when they use it will send the server mostly consume API and buy API , so it will be 1 per heart in total 4 and 1 per booster usage so it depends on the user could be 0 could be 10 or more but I think if they are offline it they can still cheat

hmm as an indie dev with not much budget, what do you think should I choose to start with?

0 Likes 0 ·
Infer Wang avatar image Infer Wang yogev commented ·

Unfortunately, I don’t understand the details of the description. Could you please tell me how you do the checks and how can players still cheat after checks? And How “ they are offline it they can still cheat”?

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.