CDN
The CDN or Content Delivery Network plugin is specifically designed to fetch hosted files in PlayFab Azure servers, for games built using Construct 3 and Construct 2.
Requested files in Content Delivery Networks are hosted in different geographically distributed locations around the world for optimized worldwide access.
PlayFab's Azure CDN files is hosted in your Microsoft Azure servers in different regions across the whole world, this is designed to optimize performance into distributing your data, selected servers are based in the player's current network location.
This feature is useful for loading assets or files into your applications for updates or extending the game, availably distributed all across the world.
Introduction
The Construct Master Collection supports the full and easy integration of the PlayFab service for both Construct 3 and Construct 2.
Please click here to learn more about PlayFab.
Features
Here are some of the features of the PlayFab service:
Title Events
Player Events
Device Information Reporting
Built-in PlayFab analytics
Analytics Console
Dashboard Analytics
PlayStream Monitor
Analytics synced
Organized request and update features.
For more information about all the integrated PlayFab service features, please click here to learn the introductory lessons to PlayFab.
Network Services
Here are some of the platform services that can be linked:
PlayFab
Google Play
Game Center
Facebook
Facebook Instant Games
Steam
Xbox Live
Instant Games (Android Studio port)
Nintendo Switch (3rd party porting services)
PS4 (3rd party porting services)
Nintendo Switch (3rd party porting services)
Editor Features
Here are some of the features in the Construct editor:
All platforms support, including web, mobile and desktop.
Construct 3
Construct 2
How to use?
It is easy to use the CDN plugin, you will only need to follow the steps below.
Set up the PlayFab API plugin, please click to visit the documentation. This includes creating a PlayFab account, studio and title.
Set up the Authentication plugin, please click to visit the documentation.
Finally, you can now use the CDN object, and include more PlayFab addons for more features.
Documentation
There is currently nothing to show, we will add more in the future.
Server Setup
The CDN or Content Delivery Network works by distributing the files or assets you've uploaded to the PlayFab Server into its servers across the world in different regional servers. Ensuring the files or assets are distributed from the nearest server to the requesting player's device and network.
To upload your files into the Content Delivery Network, please follow the instructions below on how to use the File Management feature.
Step 1 : Select the Content menu option and then the File Management tab.
Step 2 : Click on the upload files button and upload your files.
Step 3 : Use the CDN plugin to retrieve the content files from the server, automatically selecting the nearest regional server.
Reminder!
There is now a new implementation for CDN in PlayFab, it is called Microsoft Azure CDN, which no longer relies on PlayFab's File Management feature. You will be managing the servers yourself through Microsoft Azure. Fortunately, this is an easy process as well, however you still need to do some technical server management unlike before.
While the previous PlayFab CDN is now a legacy feature, which only now exists for existing projects or for those who request through email to convert their titles back to the classic PlayFab CDN feature.
We will be updating the plugin along with the entire PlayFab Master Collection, to accommodate the new Microsoft Azure features, including tutorials to ease the transition. We will announce as soon as this project is finished, and the update made available.
Actions, Conditions & Expressions
Actions
The following action groups:
Content Delivery Network
Content Delivery Network
Get Download URL - This API retrieves a pre-signed URL for accessing a content file for the title. A subsequent HTTP "GET" to the returned URL will attempt to download the content. A "HEAD" query to the returned URL will attempt to retrieve the metadata of the content.
Key - The key of the content item to fetch, usually formatted as a path, e.g. "images/a.png".
HTTP Method - HTTP method to fetch item - GET or HEAD. Use HEAD when only fetching metadata. Default is GET.
Through CDN - True to download through CDN. CDN provides higher download bandwidth and lower latency. However, if you want the latest, non-cached version of the content during development, set this to false. Default is "True".
Tag - The tag name of the event request.
Conditions
The following condition groups:
Content Delivery Network
Content Delivery Network
On Get Content - Triggers when the "Get Download URL" request has succeeded.
Tag - The tag name of the event request.
On Get Content Failed - Triggers when the "Get Download URL" request has failed.
Tag - The tag name of the event request.
On Any Get Content - Triggers when any "Get Download URL" request has succeeded.
On Any Get Content Failed - Triggers when any "Get Download URL" request has failed.
Expressions
The following expression groups:
Content Delivery Network
Server Response
Content Delivery Network
getURL - Returns the URL for downloading content via HTTP GET or HEAD method. The URL will expire in approximately one hour.
retTag - Returns the tag name of the event request.
retKey - Returns the key of the request.
retMethod - Returns the method of the request. Either "GET" or "HEAD".
retCDN - Returns the boolean of the request if it is "Through the CDN". Either "True" or "False".
Server Response
ServerResponse - Return the "Server Response" from every request from the PlayFab Server. The server response can also be shown in the "Chrome Developer Tools : Console", if in "debug mode".
Showcase
There is currently nothing to show, we will add more in the future.
Game Projects
Instructions Kit
Specifications
-
Instructions - The game project contains instructions and steps on how to use the addon and its features.
-
Action, Conditions and Expressions - It covers the implementation of each action, condition and expression.
-
Tips and Tricks - It provides some tips and tricks on the recommended ways of using the addon.