Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by afroninjamx · Nov 27, 2017 at 03:28 AM · CloudScript

Cloudscript limits? | Can I link two frictionless logins?

After a bit of research I saw that Cloudscripts have a limit of 5s execution time. (as of 2016)

Is this still the case? Are there any other limits? Total lines of cloudscript? Number of cloudscript files? Cloudscript requests per user? I know that CS shouldn't be called frequently (as in per second, frame, etc).

Can I connect to my own backend service from cloudscript? Let's say I want Playfab to be the main BaaS for my game. But after running a cloudscript to access your api, is it feasible to offload a heavy computation to my own server (like an AWS instance) if need be?

Lastly, can I link frictionless logins together? It looks like the first device login should always be frictionless (which is great). But after that it seems like the way to link accounts is by providing 3rd party logins- like twitch or facebook. But is it possible for the first device to just generate a "link" code that the second device can use to connect with?

Thanks for your time!

Comment

People who like this

0 Show 2
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image afroninjamx · Nov 26, 2017 at 12:21 AM 0
Share

Hey- sorry guys, I tried to ask this in the middle of signing up for an account. I thought I lost my original post, so I wrote a second one. When I finished, the two were combined together into one (?) looking for a way to edit it.

avatar image Brendan ♦♦ afroninjamx · Nov 27, 2017 at 03:54 AM 0
Share

I fixed it, no worries. From what the AnswerHub folks have said, their major UX update (hopefully in 2018Q1 will fix this).

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Nov 27, 2017 at 03:53 AM

So, in order:

The limits for Cloud Script (and other things) are available in the Settings->Limits tab of your game. In addition to the max CPU time limit, there's also a max number of Server API calls that can be made, and a max bytes of Cloud Script per revision.

For calling out to your server, it's technically possible, but I'm not quite clear on what your intended logic flow is. You can make Web API calls to external services from Cloud Script via http.request. If you need something more complex, your best bet would be to simply have that logic on your own server, and have the client call it directly. You can then use the Server API from your server to do validation on user sign-in state, player data, statistics, etc.

For linking to a PlayFab account, you need to be signed into that account. So for linking to an account from two different devices, there does have to be some way to have the player signed in on the second device in order to link to the original account. That could be via a Facebook/Google/Twitch/etc. login, or it could be by having a GUID that you use as a Custom ID, which you provide to the user when they're signed in - that would be the way to do a "link" code.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image afroninjamx · Nov 28, 2017 at 12:33 AM 0
Share

Thanks for the response, that clears some things up. I didn't realize I could access the Playfab API from my own server. I figured maybe it was only accessible through cloudscript. Glad there's a way to implement a "link code" if I decide to go that route.

Lastly: how feasible is it to "ping" all active players with a message? I'd like to have a feature where I start a stream on twitch, and notify all players currently in the game that they can watch. Do I write one cloudscript to loop through all active players and push a message out? And would I just run it directly from my playfab dashboard? Or do I need to have the users poll the server every x minutes to check for something like this.

avatar image Brendan ♦♦ afroninjamx · Nov 28, 2017 at 12:37 AM 0
Share

No, any operation that attempts to iterate across all players and take an action (apart from a scheduled task, which is specifically set up to do that) is going to fail, as it would consume far too many resources.

The real question is, how do you plan to notify players, and when will these things be announced? The simplest thing to do is to have a Title Data key/value pair that lists all the upcoming dates you want players to know about, so that you can just read that on sign-in (or once an hour or so, if players tend to stay signed in). If you mean sending players a Push Notification or an Email, you could do that through a Scheduled Task. But if you mean notifying players in realtime of things happening, your best bet right now would be to drive that via your own custom game server, as we do not maintain a socket connection to the client currently. So you would have that server (or servers) message out to all the connected players as soon as you know that you need to.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Photon Webhook url config 1 Answer

    How to deserialize a cloudscript server call back to the client? 2 Answers

    Cloud Script response gets a MultipletypeError (MultiTypeVar) error in Cocos2d-x 1 Answer

    how can i Update Player statistics using my code in c#? is there any clear tutorial for this? icant understand the documentation. 1 Answer

    Change Player Avatar URL using Playfab CloudScript 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges