Blog

Cloud Script Updates

We've updated Cloud Script with several changes, to make using it easier and to provide a better development experience.

First, in case you missed it, we recently enabled GitHub synchronization for Cloud Script, so that you can manage your Cloud Script code with real source control tools. Definitely worth checking out.

Second, we have a new Client API call, ExecuteCloudScript, which replaces the previous calling pattern of GetCloudScriptUrl followed by RunCloudScript. With the new call, we take care of the setup for the logic server endpoint, in order to simplify its usage. The documentation page contains all the details on how to use the call, but some key highlights are:

The RevisionSelection lets you specify whether you want to run the revision of your script which is currently marked live, the most recently uploaded revision (for most of your testing), or a specific revision (for targeted testing or older client compatibility).

Errors are now returned in a more structured format, with API call and HTTP request errors written to the logs automatically. We’ve also added more context to the returned info, calling out the number of API and HTTP requests made, and how much memory was consumed.

There’s also an option for generating a PlayStream event, so that you can fire off your own custom events which can then be used to segment your users and trigger other custom actions. You can read more about PlayStream in our blog post, here.

Further, we’ve updated the V8 engine we’re using to version 4.7.80.25, to make sure we provide compatibility with your current development efforts.

But best of all is that we’re making all your Cloud Script handlers available in PlayStream, as well. This will allow you to perform custom actions, using your own server-authoritative logic, based upon any trackable behavior your players perform. Between this, and the existing ability to call your own custom webhooks from Cloud Script, this opens up a tremendous range of possibilities in terms of per-user custom game behaviors and community management. Keep your eyes on this blog, as we’ll be providing a walkthrough of using Cloud Script as an action in PlayStream shortly.

Since launching Cloud Script last year, titles have used it to do everything from player referral rewards, to managing skill trees, to calling external servers to work with user data that by policy has to be maintained in the publisher’s servers. We can't wait to see what you'll do with it!