Cloud Code

Interception Points for Cloud Code

The GameSparks platform uses the concept of interceptors to trigger the execution of Cloud Code scripts. There are 4 key interception points:

Request / Response Interceptors

Event / Challenge Event Interceptors

Event and Challenge Event interceptors are specialized versions of the standard Request interceptors:

Message Interceptors

When a message is created in the GameSparks platform, it contains a list of target players the message should be sent to. A player message object is then created for each player and sent directly to them. This process allows you to bind code to both global message creation and player message delivery. A good example of where this is useful is when a challenge starts - a single ChallengeStartedMessage is created that you can execute script against to ensure a particular set of code is only executed once for a challenge:

More Details on Cloud Code? For details on how to create and configure Cloud Code scripts, see the Writing Cloud Code page.

FAQs? You can review Frequently Asked Questions about creating and managing your Cloud Code scripts.